On Wed, Oct 19, 2016 at 12:18:08PM +0200, Jean-Marc Lasgouttes wrote:
> Le 18/10/2016 à 03:49, Enrico Forestieri a écrit :
> >commit 129459a71b52babb1a8e5a1e3de986976c93bde6
> >Author: Enrico Forestieri <for...@lyx.org>
> >Date:   Tue Oct 18 03:29:53 2016 +0200
> >
> >    Take into account font changes when striking out display math formulas
> >
> >    Font changes are brought inside the \lyxdeleted macro, just before
> >    outputting the latex code for the math inset. The inset writes a
> >    signature before itself and this is checked by \lyxsout for recognizing
> >    a display math. So, the font changes confuse \lyxsout, which also
> >    swallows the first macro at the very start of \lyxdeleted. The result
> >    is that the font changing command is not seen by latex and \sout is also
> >    used to further strike out the formula already striked out by tikz.
> >    This commit makes sure that the expected signature actually appears
> >    just after the opening brace of \lyxdeleted. It also accounts for a
> >    paragraph break occurring just before the math inset, in order to not
> >    introduce too much vertical space, which is noticeable when using
> >    larger font sizes.
> 
> 
> This commit gives me new warnings:
> 
> ../../master/src/Paragraph.cpp: In member function ‘void
> lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&,
> lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullNone’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullSimple’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullXAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullXXAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullRegexp’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullUnknown’ not handled in switch [-Wswitch]

I thought about that and deliberately omitted the cases for which
nothing has to be done, because with default compiler switches I get
no warnings. Adding them would simply make the source less readable,
IMO. A "default:" case would silence the compiler, but does this
also silence fundamentalists? ;-)

-- 
Enrico

Reply via email to