]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.cpp
Revert "Do not crash is release mode if we stumble across an unrealized font."
[lyx.git] / src / insets / InsetText.cpp
index 99b1381f93d9961914dfd163d4c58ab0bd247bb7..df4f6e219325cd34734ab72cb73e18bd426583f5 100644 (file)
@@ -48,6 +48,7 @@
 #include "Row.h"
 #include "sgml.h"
 #include "TexRow.h"
+#include "texstream.h"
 #include "TextClass.h"
 #include "Text.h"
 #include "TextMetrics.h"
@@ -226,8 +227,8 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const
                                pi.backgroundColor(this));
 
                // Change color of the frame in tracked changes, like for tabulars.
-        // Only do so if the color is not custom. But do so even if RowPainter
-        // handles the strike-through already.
+               // Only do so if the color is not custom. But do so even if RowPainter
+               // handles the strike-through already.
                Color c;
                if (pi.change_.changed()
                    // Originally, these are the colors with role Text, from role() in
@@ -612,7 +613,9 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & rp,
        runparams.par_end = text().paragraphs().size();
        
        if (undefined()) {
+               xs.startDivision(false);
                xhtmlParagraphs(text_, buffer(), xs, runparams);
+               xs.endDivision();
                return docstring();
        }
 
@@ -646,7 +649,9 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & rp,
        if (il.isPassThru())
                runparams.pass_thru = true;
 
+       xs.startDivision(false);
        xhtmlParagraphs(text_, buffer(), xs, runparams);
+       xs.endDivision();
 
        if (opts & WriteInnerTag)
                xs << html::EndTag(il.htmlinnertag());