]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXYArrow.cpp
Do not throw exceptions here either. See r22806.
[lyx.git] / src / mathed / InsetMathXYArrow.cpp
index 866c3bb1d64bf32f9fe5b2df9155d9decede5afa..b0e20499036ed2f9767b12631a7d6ba0b8763ce5 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -140,20 +140,13 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathXYArrow::write(WriteStream & os) const
 {
-       bool brace = os.pendingBrace();
-       os.pendingBrace(false);
-       if (os.latex() && os.textMode()) {
-               os << "\\ensuremath{";
-               os.textMode(false);
-               brace = true;
-       }
+       MathEnsurer ensurer(os);
        os << "\\ar";
        if (cell(0).size())
                os << '[' << cell(0) << ']';
        if (cell(1).size())
                os << (up_ ? '^' : '_') << '{' << cell(1) << '}';
        os << " ";
-       os.pendingBrace(brace);
 }