#include "BufferParams.h"
#include "Encoding.h"
#include "LaTeXFeatures.h"
+#include "LyXRC.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
#include "Paragraph.h"
|| 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.inulemcmd;
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 && !dvipost)
+ ++runparams.inulemcmd;
+ }
}
else if (change.type == Change::INSERTED)
macro_beg = from_ascii("\\lyxadded");
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();
void Change::paintCue(PainterInfo & pi, double const x1, double const y,
double const x2, FontInfo const & font) const
{
- if (!changed())
+ if (!changed() || (!lyxrc.ct_additions_underlined && inserted()))
return;
// Calculate 1/3 height of font
FontMetrics const & fm = theFontMetrics(font);
switch(type) {
case UNCHANGED:
return;
- case INSERTED:
+ case INSERTED: {
+ if (!lyxrc.ct_additions_underlined)
+ break;
pi.pain.line(int(x1), int(y2) + 1, int(x2), int(y2) + 1,
color(), Painter::line_solid,
pi.base.solidLineThickness());
return;
+ }
case DELETED:
// FIXME: we cannot use antialias since we keep drawing on the same
// background with the current painting mechanism.