]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / mathed / math_scriptinset.C
index 67de4997107fa172c27475da3022218f2cf4c0df..bd054206ae745b1b3486979b1794e925812581a4 100644 (file)
@@ -1,3 +1,4 @@
+#include <config.h>
 
 #include "math_scriptinset.h"
 #include "math_support.h"
@@ -7,8 +8,11 @@
 #include "support/LAssert.h"
 #include "debug.h"
 
+using namespace lyx::support;
 
 using std::max;
+using std::auto_ptr;
+using std::endl;
 
 
 MathScriptInset::MathScriptInset()
@@ -37,9 +41,9 @@ MathScriptInset::MathScriptInset(MathAtom const & at, bool up)
 
 
 
-MathInset * MathScriptInset::clone() const
+auto_ptr<InsetBase> MathScriptInset::clone() const
 {
-       return new MathScriptInset(*this);
+       return auto_ptr<InsetBase>(new MathScriptInset(*this));
 }
 
 
@@ -144,14 +148,14 @@ int MathScriptInset::dy1() const
 
 int MathScriptInset::dx0() const
 {
-       lyx::Assert(hasDown());
+       Assert(hasDown());
        return hasLimits() ? (dim_.wid - down().width()) / 2 : nwid();
 }
 
 
 int MathScriptInset::dx1() const
 {
-       lyx::Assert(hasUp());
+       Assert(hasUp());
        return hasLimits() ? (dim_.wid - up().width()) / 2 : nwid();
 }
 
@@ -358,7 +362,8 @@ void MathScriptInset::write(WriteStream & os) const
                //}
        } else {
                if (os.firstitem())
-                       lyxerr[Debug::MATHED] << "suppressing {} when writing\n";
+                       lyxerr[Debug::MATHED] << "suppressing {} when writing"
+                                             << endl;
                else
                        os << "{}";
        }