]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXYMatrix.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / InsetMathXYMatrix.cpp
index f559aa2d1ab84124474493e8620d46f78e6c3b00..d8f54602b9d3b20b106e9b91f687d0e070f6a5bf 100644 (file)
@@ -63,9 +63,11 @@ void InsetMathXYMatrix::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathXYMatrix::write(WriteStream & os) const
+void InsetMathXYMatrix::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\xymatrix";
        bool open = os.startOuterRow();
        if (equal_spacing_) {
@@ -154,7 +156,7 @@ void InsetMathXYMatrix::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathXYMatrix::mathmlize(MathStream &) const
+void InsetMathXYMatrix::mathmlize(MathMLStream &) const
 {
        throw MathExportException();
 }