Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

Martin Vermeer-2
On Sat, Nov 03, 2007 at 12:35:08AM +0000, [hidden email] wrote:

> Author: younes
> Date: Sat Nov  3 01:35:07 2007
> New Revision: 21396
>
> URL: http://www.lyx.org/trac/changeset/21396
> Log:
> Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
> - Getting rid of some unneeded init() methods.
> - InsetCollapsable::layout_ is now a const pointer.
>
> Modified:
>     lyx-devel/trunk/src/CutAndPaste.cpp
>     lyx-devel/trunk/src/TextClass.cpp
>     lyx-devel/trunk/src/factory.cpp
>     lyx-devel/trunk/src/insets/InsetBox.cpp
>     lyx-devel/trunk/src/insets/InsetBranch.cpp
>     lyx-devel/trunk/src/insets/InsetCollapsable.cpp
>     lyx-devel/trunk/src/insets/InsetCollapsable.h
>     lyx-devel/trunk/src/insets/InsetERT.cpp
>     lyx-devel/trunk/src/insets/InsetERT.h
>     lyx-devel/trunk/src/insets/InsetFlex.cpp
>     lyx-devel/trunk/src/insets/InsetFlex.h
>     lyx-devel/trunk/src/insets/InsetNote.cpp
>
> Modified: lyx-devel/trunk/src/CutAndPaste.cpp
> URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/CutAndPaste.cpp?rev=21396
> ==============================================================================
> --- lyx-devel/trunk/src/CutAndPaste.cpp (original)
> +++ lyx-devel/trunk/src/CutAndPaste.cpp Sat Nov  3 01:35:07 2007
> @@ -448,7 +448,7 @@
>   InsetFlex & inset =
>   static_cast<InsetFlex &>(*it);
>   string const name = inset.params().name;
> - InsetLayout const il =
> + InsetLayout const & il =
>   tclass2.insetlayout(from_utf8(name));
>   inset.setLayout(il);
>   if (il.labelstring == from_utf8("UNDEFINED")) {
>
> Modified: lyx-devel/trunk/src/TextClass.cpp
> URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
> ==============================================================================
> --- lyx-devel/trunk/src/TextClass.cpp (original)
> +++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
> @@ -707,6 +707,9 @@
>   break;
>   case IL_LABELFONT:
>   labelfont = lyxRead(lexrc, inherit_font);
> + // The label font is generally used as-is without
> + // any realization against a given context.
> + labelfont.realize(sane_font);

Great. Did you also remember to change the labelfont
initialization (above) inherit_font -> sane_font?
(i.e., fix my mistake's first part)?

- Martin


>   break;
>   case IL_FORCELTR:
>   lexrc.next();
Reply | Threaded
Open this post in threaded view
|

Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

Abdelrazak Younes
Martin Vermeer wrote:

>> Modified: lyx-devel/trunk/src/TextClass.cpp
>> URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
>> ==============================================================================
>> --- lyx-devel/trunk/src/TextClass.cpp (original)
>> +++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
>> @@ -707,6 +707,9 @@
>>   break;
>>   case IL_LABELFONT:
>>   labelfont = lyxRead(lexrc, inherit_font);
>> + // The label font is generally used as-is without
>> + // any realization against a given context.
>> + labelfont.realize(sane_font);
>
> Great. Did you also remember to change the labelfont
> initialization (above) inherit_font -> sane_font?
> (i.e., fix my mistake's first part)?

No, as I think it is correct (but am not sure). We don't want to
override the parsed settings, do we?

Abdel.

Reply | Threaded
Open this post in threaded view
|

Re: [Cvslog] r21396 - in /lyx-devel/trunk/src: CutAndPaste.cpp TextCla...

Martin Vermeer-2
On Sat, Nov 03, 2007 at 10:09:52AM +0100, Abdelrazak Younes wrote:

> Martin Vermeer wrote:
> >>Modified: lyx-devel/trunk/src/TextClass.cpp
> >>URL:
> >>http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextClass.cpp?rev=21396
> >>==============================================================================
> >>--- lyx-devel/trunk/src/TextClass.cpp (original)
> >>+++ lyx-devel/trunk/src/TextClass.cpp Sat Nov  3 01:35:07 2007
> >>@@ -707,6 +707,9 @@
> >> break;
> >> case IL_LABELFONT:
> >> labelfont = lyxRead(lexrc, inherit_font);
> >>+ // The label font is generally used as-is without
> >>+ // any realization against a given context.
> >>+ labelfont.realize(sane_font);
> >
> >Great. Did you also remember to change the labelfont
> >initialization (above) inherit_font -> sane_font?
> >(i.e., fix my mistake's first part)?
>
> No, as I think it is correct (but am not sure). We don't want to
> override the parsed settings, do we?

No... you did it differently but right IMO.

- Martin