]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCaption.cpp
Properly fix handling of title layouts within insets (#11787)
[lyx.git] / src / insets / InsetCaption.cpp
index 3f1aebf99e103c923260159f5e32912ce8b70874..42f951989ce0cf62af9fc437a2dc23bdfb798f14 100644 (file)
@@ -25,6 +25,7 @@
 #include "FuncStatus.h"
 #include "InsetList.h"
 #include "Language.h"
+#include "LyXRC.h"
 #include "MetricsInfo.h"
 #include "output_latex.h"
 #include "output_xhtml.h"
@@ -152,7 +153,7 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
        pi.base.font.setColor(pi.textColor(pi.base.font.color()).baseColor);
        if (is_deleted_)
                pi.base.font.setStrikeout(FONT_ON);
-       else if (isChanged())
+       else if (isChanged() && lyxrc.ct_additions_underlined)
                pi.base.font.setUnderbar(FONT_ON);
        int const xx = x + leftOffset(pi.base.bv);
        pi.pain.text(xx, y, full_label_, pi.base.font);
@@ -301,7 +302,7 @@ int InsetCaption::docbook(odocstream & os,
 }
 
 
-docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
+docstring InsetCaption::xhtml(XMLStream & xs, OutputParams const & rp) const
 {
        if (rp.html_disable_captions)
                return docstring();
@@ -316,9 +317,9 @@ docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
                else
                        attr = attr + " class='" + our_class + "'";
        }
-       xs << html::StartTag(tag, attr);
+       xs << xml::StartTag(tag, attr);
        docstring def = getCaptionAsHTML(xs, rp);
-       xs << html::EndTag(tag);
+       xs << xml::EndTag(tag);
        return def;
 }
 
@@ -363,7 +364,7 @@ int InsetCaption::getCaptionAsPlaintext(odocstream & os,
 }
 
 
-docstring InsetCaption::getCaptionAsHTML(XHTMLStream & xs,
+docstring InsetCaption::getCaptionAsHTML(XMLStream & xs,
                        OutputParams const & runparams) const
 {
        xs << full_label_ << ' ';