]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_spaceinset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_spaceinset.C
index c346e45a25577f624dbee08ebcf0f9db0bde6046..155d955f0fa277257c991a7baf658b5ccf170fd0 100644 (file)
@@ -1,5 +1,5 @@
-
 #include "math_spaceinset.h"
+#include "math_data.h"
 #include "math_support.h"
 #include "LColor.h"
 #include "frontends/Painter.h"
@@ -7,6 +7,8 @@
 #include "LaTeXFeatures.h"
 #include "debug.h"
 
+using std::auto_ptr;
+
 
 char const * latex_mathspace[] = {
        "!", "negmedspace", "negthickspace",  // negative space
@@ -31,16 +33,14 @@ MathSpaceInset::MathSpaceInset(string const & name)
 }
 
 
-
-MathInset * MathSpaceInset::clone() const
+auto_ptr<InsetBase> MathSpaceInset::clone() const
 {
-       return new MathSpaceInset(*this);
+       return auto_ptr<InsetBase>(new MathSpaceInset(*this));
 }
 
 
-Dimension MathSpaceInset::metrics(MetricsInfo &) const
+void MathSpaceInset::metrics(MetricsInfo &, Dimension & dim) const
 {
-       Dimension dim;
        switch (space_) {
                case 0: dim.wid = 6; break;
                case 1: dim.wid = 8; break;
@@ -56,7 +56,6 @@ Dimension MathSpaceInset::metrics(MetricsInfo &) const
        }
        dim.asc = 4;
        dim.des = 0;
-       return dim;
 }