]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathStackrel.cpp
* src/mathed/InsetMathHull.cpp:
[lyx.git] / src / mathed / InsetMathStackrel.cpp
index 0655f39b5d17a8d323e7ad68e8e105d23f3fbb98..964c078fa9b3ee4b5613b3f8734e036a407b6b0e 100644 (file)
@@ -14,6 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -34,12 +35,10 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       dim.wid = std::max(dim0.width(), dim1.width()) + 4;
+       dim.wid = max(dim0.width(), dim1.width()) + 4;
        dim.asc = dim1.ascent() + dim0.height() + 4;
        dim.des = dim1.descent();
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -59,6 +58,7 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathStackrel::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\stackrel{" << cell(0) << "}{" << cell(1) << '}';
 }