X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FChanges.cpp;h=63bb021efeced935b10f40282b3e6527f1e84656;hb=25bcbe766601b7bbc5b9832858ab8e5874f5d2a2;hp=f7167a2ba9efb3158077976c3ed6e28ee3502398;hpb=8e62dcc20fc226deb7fb48a9934391d2f9a0c712;p=lyx.git diff --git a/src/Changes.cpp b/src/Changes.cpp index f7167a2ba9..63bb021efe 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -380,7 +380,7 @@ docstring getLaTeXMarkup(docstring const & macro, Author const & author, "Choose an appropriate document encoding (such as utf8)\n" "or change the author initials."), uncodable_initials, author_initials_latexed.second)); - warned_author_initials.insert(uncodable_author); + warned_author_initials.insert(uncodable_initials); } } } @@ -429,16 +429,14 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, int column = 0; - bool const dvipost = LaTeXFeatures::isAvailable("dvipost") && - (runparams.flavor == OutputParams::LATEX - || runparams.flavor == OutputParams::DVILUATEX); - if (oldChange.type != Change::UNCHANGED) { - // close \lyxadded or \lyxdeleted - os << '}'; - column++; + if (oldChange.type != Change::DELETED || runparams.ctObject != OutputParams::CT_OMITOBJECT) { + // close \lyxadded or \lyxdeleted + os << '}'; + column++; + } if (oldChange.type == Change::DELETED - && !runparams.wasDisplayMath && !dvipost) + && !runparams.wasDisplayMath) --runparams.inulemcmd; } @@ -449,9 +447,19 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, docstring macro_beg; if (change.type == Change::DELETED) { - macro_beg = from_ascii("\\lyxdeleted"); - if (!runparams.inDisplayMath && !dvipost) - ++runparams.inulemcmd; + if (runparams.ctObject == OutputParams::CT_OMITOBJECT) + return 0; + else if (runparams.ctObject == OutputParams::CT_OBJECT) + macro_beg = from_ascii("\\lyxobjdeleted"); + else if (runparams.ctObject == OutputParams::CT_DISPLAYOBJECT) + macro_beg = from_ascii("\\lyxdisplayobjdeleted"); + else if (runparams.ctObject == OutputParams::CT_UDISPLAYOBJECT) + macro_beg = from_ascii("\\lyxudisplayobjdeleted"); + else { + macro_beg = from_ascii("\\lyxdeleted"); + if (!runparams.inDisplayMath) + ++runparams.inulemcmd; + } } else if (change.type == Change::INSERTED) macro_beg = from_ascii("\\lyxadded"); @@ -460,15 +468,6 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, bparams.authors().get(change.author), chgTime, runparams); - // signature needed by \lyxsout to correctly strike out display math - if (change.type == Change::DELETED && runparams.inDisplayMath - && !dvipost) { - if (os.blankLine()) - str += from_ascii("\\\\\\noindent\n"); - else - str += from_ascii("\\\\\\\\\n"); - } - os << str; column += str.size(); @@ -558,14 +557,6 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer, } -void Changes::updateBuffer(Buffer const & buf) -{ - bool const changed = isChanged(); - buf.setChangesPresent(buf.areChangesPresent() || changed); - previously_changed_ = changed; -} - - void Change::paintCue(PainterInfo & pi, double const x1, double const y, double const x2, FontInfo const & font) const { @@ -597,7 +588,7 @@ void Change::paintCue(PainterInfo & pi, double const x1, double const y1, return; case INSERTED: { if (!lyxrc.ct_additions_underlined) - break; + return; pi.pain.line(int(x1), int(y2) + 1, int(x2), int(y2) + 1, color(), Painter::line_solid, pi.base.solidLineThickness());