X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathNest.cpp;h=ecd823063e092fc357c7b9a4075c16623852671f;hb=02e82157ec583c3900e359de86be79fac6512387;hp=4216145e8a00d568db08f3a54824b0668bdacb06;hpb=cb7094696095236b9a7133f41901e90aee767544;p=lyx.git diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 4216145e8a..ecd823063e 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -48,6 +48,7 @@ #include "Encoding.h" #include "FuncRequest.h" #include "FuncStatus.h" +#include "LaTeXFeatures.h" #include "LyX.h" #include "LyXRC.h" #include "MetricsInfo.h" @@ -252,7 +253,7 @@ bool InsetMathNest::idxLast(Cursor & cur) const void InsetMathNest::dump() const { odocstringstream oss; - otexrowstream ots(oss, false); + otexrowstream ots(oss); WriteStream os(ots); os << "---------------------------------------------\n"; write(os); @@ -264,14 +265,13 @@ void InsetMathNest::dump() const } -void InsetMathNest::draw(PainterInfo & pi, int x, int y) const +void InsetMathNest::draw(PainterInfo &, int, int) const { #if 0 if (lock_) pi.pain.fillRectangle(x, y - ascent(), width(), height(), Color_mathlockbg); #endif - setPosCache(pi, x, y); } @@ -406,6 +406,18 @@ void InsetMathNest::latex(otexstream & os, OutputParams const & runparams) const WriteStream wi(os, runparams.moving_arg, true, runparams.dryrun ? WriteStream::wsDryrun : WriteStream::wsDefault, runparams.encoding); + wi.strikeoutMath(runparams.inDeletedInset + && (!LaTeXFeatures::isAvailable("dvipost") + || (runparams.flavor != OutputParams::LATEX + && runparams.flavor != OutputParams::DVILUATEX))); + if (runparams.inulemcmd) { + wi.ulemCmd(WriteStream::UNDERLINE); + if (runparams.local_font) { + FontInfo f = runparams.local_font->fontInfo(); + if (f.strikeout() == FONT_ON) + wi.ulemCmd(WriteStream::STRIKEOUT); + } + } wi.canBreakLine(os.canBreakLine()); Changer dummy = wi.changeRowEntry(TexRow::textEntry(runparams.lastid, runparams.lastpos));