]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSideset.cpp
de.po
[lyx.git] / src / mathed / InsetMathSideset.cpp
index 37f437db4f3c2212ef508f0bb50bd328fd0e602b..ccbab52a80ef30ad14d2bd19222c2a5be6db0c75 100644 (file)
@@ -36,7 +36,7 @@ using namespace std;
 namespace {
        /// x spacing between the nucleus and the scripts
        int const dx = 2;
-}
+} // namespace
 
 
 namespace lyx {
@@ -62,22 +62,6 @@ Inset * InsetMathSideset::clone() const
 }
 
 
-bool InsetMathSideset::idxFirst(Cursor & cur) const
-{
-       cur.idx() = 0;
-       cur.pos() = 0;
-       return true;
-}
-
-
-bool InsetMathSideset::idxLast(Cursor & cur) const
-{
-       cur.idx() = 0;
-       cur.pos() = nuc().size();
-       return true;
-}
-
-
 int InsetMathSideset::dybt(BufferView const & bv, int asc, int des, bool top) const
 {
        bool isCharBox = nuc().empty() ? false : isAlphaSymbol(nuc().back());
@@ -185,6 +169,7 @@ int InsetMathSideset::nker(BufferView const * bv) const
 
 void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy2 = mi.base.changeEnsureMath();
        Dimension dimn;
        Dimension dimbl;
        Dimension dimtl;
@@ -221,12 +206,12 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
        int nd = ndes(bv);
        int des = dyb(bv) + max(dimbl.descent(), dimbr.descent());
        dim.des = max(nd, des);
-       metricsMarkers(dim);
 }
 
 
 void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy2 = pi.base.changeEnsureMath();
        BufferView & bv = *pi.base.bv;
        nuc().draw(pi, x + dxn(bv), y);
        if (!scriptl_)
@@ -242,7 +227,6 @@ void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
                br().draw(pi, x + dxr(bv), y + dyb(bv));
                tr().draw(pi, x + dxr(bv), y - dyt(bv));
        }
-       drawMarkers(pi, x, y);
 }