]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathOverset.cpp
Properly fix bug 3258.
[lyx.git] / src / mathed / InsetMathOverset.cpp
index 2157a623684729cb031b82ee306edf38bc29c700..b112a56746b0549c5ec0d46be810b4afa9fefb89 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 
-#include "cursor.h"
+#include "Cursor.h"
 #include "LaTeXFeatures.h"
 
 
@@ -24,9 +24,9 @@ using std::max;
 using std::auto_ptr;
 
 
-auto_ptr<InsetBase> InsetMathOverset::doClone() const
+auto_ptr<Inset> InsetMathOverset::doClone() const
 {
-       return auto_ptr<InsetBase>(new InsetMathOverset(*this));
+       return auto_ptr<Inset>(new InsetMathOverset(*this));
 }
 
 
@@ -49,7 +49,7 @@ bool InsetMathOverset::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetMathOverset::draw(PainterInfo & pi, int x, int y) const
 {
        int m  = x + width() / 2;
-       int yo = y - cell(1).ascent() + cell(0).descent() - 1;
+       int yo = y - cell(1).ascent() - cell(0).descent() - 1;
        cell(1).draw(pi, m - cell(1).width() / 2, y);
        FracChanger dummy(pi.base);
        cell(0).draw(pi, m - cell(0).width() / 2, yo);
@@ -57,7 +57,7 @@ void InsetMathOverset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool InsetMathOverset::idxFirst(LCursor & cur) const
+bool InsetMathOverset::idxFirst(Cursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = 0;
@@ -65,7 +65,7 @@ bool InsetMathOverset::idxFirst(LCursor & cur) const
 }
 
 
-bool InsetMathOverset::idxLast(LCursor & cur) const
+bool InsetMathOverset::idxLast(Cursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = cur.lastpos();