]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSubstack.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / InsetMathSubstack.cpp
index f9dfb01821e5bb6603a42c050cf05c75f61a1b56..11678b559d91226093474bbe052d1477fed7ad90 100644 (file)
@@ -97,9 +97,11 @@ void InsetMathSubstack::infoize(odocstream & os) const
 }
 
 
-void InsetMathSubstack::write(WriteStream & os) const
+void InsetMathSubstack::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\substack{";
        bool open = os.startOuterRow();
        InsetMathGrid::write(os);
@@ -125,7 +127,7 @@ void InsetMathSubstack::maple(MapleStream & os) const
 }
 
 
-void InsetMathSubstack::mathmlize(MathStream & ms) const
+void InsetMathSubstack::mathmlize(MathMLStream & ms) const
 {
        int movers = 0;
        row_type const numrows = nrows();