]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parinset.C
Fix math cursor positioning bug
[lyx.git] / src / mathed / math_parinset.C
index 371d458938d47c6e517c4b5988e0db055804cc8e..3f2baae0ddefce2bd1bbfeb7179415d7254aca98 100644 (file)
@@ -1,9 +1,23 @@
+/**
+ * \file math_parinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
 #include "math_parinset.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
+#include "support/std_ostream.h"
+
+
+using std::auto_ptr;
 
-#include "support/LOstream.h"
 
 MathParInset::MathParInset(MathArray const & ar)
 {
@@ -11,16 +25,17 @@ MathParInset::MathParInset(MathArray const & ar)
 }
 
 
-void MathParInset::metrics(MathMetricsInfo & mi) const
+void MathParInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       MathFontSetChanger dummy1(mi.base, "textnormal");
+       FontSetChanger dummy1(mi.base, "textnormal");
        MathGridInset::metrics(mi);
+       dim = dim_;
 }
 
 
-void MathParInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathParInset::draw(PainterInfo & pi, int x, int y) const
 {
-       MathFontSetChanger dummy1(pi.base, "textnormal");
+       FontSetChanger dummy1(pi.base, "textnormal");
        MathGridInset::draw(pi, x, y);
 }
 
@@ -36,3 +51,9 @@ void MathParInset::infoize(std::ostream & os) const
 {
        os << "Type: Paragraph ";
 }
+
+
+auto_ptr<InsetBase> MathParInset::doClone() const
+{
+       return auto_ptr<InsetBase>(new MathParInset(*this));
+}