]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_spaceinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_spaceinset.C
index 0e8b7161aaeba14419028cd10c6bf1a9da0d5bc5..8f71fa0f8ec65d3c1553c9d77d7b971d8b804006 100644 (file)
 
 #include "math_spaceinset.h"
 #include "math_data.h"
-#include "frontends/Painter.h"
 #include "math_mathmlstream.h"
+
 #include "LaTeXFeatures.h"
 #include "LColor.h"
 
+#include "frontends/Painter.h"
 
 using std::string;
 using std::auto_ptr;
@@ -45,7 +46,7 @@ MathSpaceInset::MathSpaceInset(string const & name)
 }
 
 
-auto_ptr<InsetBase> MathSpaceInset::clone() const
+auto_ptr<InsetBase> MathSpaceInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathSpaceInset(*this));
 }
@@ -118,8 +119,8 @@ void MathSpaceInset::incSpace()
 void MathSpaceInset::validate(LaTeXFeatures & features) const
 {
        if (space_ >= 0 && space_< nSpace) {
-               if ((latex_mathspace[space_] == "negmedspace")
-                || (latex_mathspace[space_] == "negthickspace"))
+               if ((latex_mathspace[space_] == string("negmedspace"))
+                || (latex_mathspace[space_] == string("negthickspace")))
                        features.require("amsmath");
        }
 }