]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXYArrow.cpp
Please Coverity (code should be equivalent)
[lyx.git] / src / mathed / InsetMathXYArrow.cpp
index 22f20a2b61c33d4000688c31348579c0cbb19c54..80aeb7276b5435d9a9119ef808992280b4be32dd 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.
  */
@@ -22,7 +22,7 @@ namespace lyx {
 
 
 InsetMathXYArrow::InsetMathXYArrow()
-       : InsetMathNest(2)
+       : InsetMathNest(2), up_(false), target_(0)
 {}
 
 
@@ -140,10 +140,11 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathXYArrow::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\ar";
-       if (cell(0).size())
+       if (!cell(0).empty())
                os << '[' << cell(0) << ']';
-       if (cell(1).size())
+       if (!cell(1).empty())
                os << (up_ ? '^' : '_') << '{' << cell(1) << '}';
        os << " ";
 }
@@ -157,4 +158,15 @@ void InsetMathXYArrow::normalize(NormalStream & os) const
 }
 
 
+void InsetMathXYArrow::mathmlize(MathStream &) const
+{
+       throw MathExportException();
+}
+
+
+void InsetMathXYArrow::htmlize(HtmlStream &) const 
+{
+       throw MathExportException(); 
+}
+
 } // namespace lyx