]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXArrow.cpp
A little cleanup of the layout files.
[lyx.git] / src / mathed / InsetMathXArrow.cpp
index a2aef402d28beb7e7fa7db60c370041985059ed9..d2b1199187fa9b77e0e2072c9849f0969c6ef116 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.
  */
@@ -18,6 +18,7 @@
 
 #include "LaTeXFeatures.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -40,12 +41,10 @@ void InsetMathXArrow::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(0).metrics(mi, dim0);
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 10;
+       dim.wid = max(dim0.width(), dim1.width()) + 10;
        dim.asc = dim0.height() + 10;
        dim.des = dim1.height();
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -63,6 +62,7 @@ void InsetMathXArrow::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathXArrow::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << '\\' << name_;
        if (cell(1).size())
                os << '[' << cell(1) << ']';