]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnderset.cpp
Change the interface to a paragraph's layout. We still store a LayoutPtr, but now...
[lyx.git] / src / mathed / InsetMathUnderset.cpp
index 7fd57abee36492cd206e283cb4fc225bc2adab79..a66a225af2b45d9218a808138960d01b139c4c5f 100644 (file)
@@ -17,6 +17,7 @@
 #include "Cursor.h"
 #include "LaTeXFeatures.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -33,12 +34,10 @@ void InsetMathUnderset::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();
        dim.des = dim1.descent() + dim0.height() + 4;
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -78,7 +77,7 @@ bool InsetMathUnderset::idxUpDown(Cursor & cur, bool up) const
        if (cur.idx() == target)
                return false;
        cur.idx() = target;
-       cur.pos() = cur.cell().x2pos(cur.x_target());
+       cur.pos() = cur.cell().x2pos(&cur.bv(), cur.x_target());
        return true;
 }