]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_decorationinset.C
mathed uglyfication
[lyx.git] / src / mathed / math_decorationinset.C
index 5f37628eb54cded008b3182365f89115fcd40740..d8234199830ed3157affae6b32aa8c903949f7cb 100644 (file)
@@ -1,12 +1,25 @@
-#include <config.h>
+/**
+ * \file math_decorationinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
+#include <config.h>
 
 #include "math_decorationinset.h"
+#include "math_data.h"
 #include "math_support.h"
 #include "math_parser.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
-#include "support/LOstream.h"
+#include "support/std_ostream.h"
+
+using std::auto_ptr;
 
 
 MathDecorationInset::MathDecorationInset(latexkeys const * key)
@@ -14,9 +27,9 @@ MathDecorationInset::MathDecorationInset(latexkeys const * key)
 {}
 
 
-MathInset * MathDecorationInset::clone() const
+auto_ptr<InsetBase> MathDecorationInset::clone() const
 {
-       return new MathDecorationInset(*this);
+       return auto_ptr<InsetBase>(new MathDecorationInset(*this));
 }
 
 
@@ -97,7 +110,7 @@ void MathDecorationInset::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 1, y);
        if (wide())
-               mathed_draw_deco(pi, x + 1, y + dy_, pi.width, dh_, key_->name);
+               mathed_draw_deco(pi, x + 1, y + dy_, cell(0).width(), dh_, key_->name);
        else
                mathed_draw_deco(pi, x + 1 + (pi.width - dw_) / 2,
                        y + dy_, dw_, dh_, key_->name);