]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnknown.C
cursor is no more damaging the background. L-shaped cursor is broken right now....
[lyx.git] / src / mathed / InsetMathUnknown.C
index fd52b0aed97b6e24077aa2af9a94a78b4acf84e3..007989b2bc5797ad2bbba6965bae9ffdc1beca0d 100644 (file)
 #include "InsetMathUnknown.h"
 #include "MathSupport.h"
 #include "MathAtom.h"
-#include "MathMLStream.h"
 #include "MathStream.h"
+#include "MathStream.h"
+
+
+namespace lyx {
 
 using std::string;
 using std::auto_ptr;
+using std::vector;
 
 
-InsetMathUnknown::InsetMathUnknown(string const & nm, bool final, bool black)
+InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black)
        : name_(nm), final_(final), black_(black)
 {}
 
@@ -31,13 +35,13 @@ auto_ptr<InsetBase> InsetMathUnknown::doClone() const
 }
 
 
-string InsetMathUnknown::name() const
+docstring InsetMathUnknown::name() const
 {
        return name_;
 }
 
 
-void InsetMathUnknown::setName(string const & name)
+void InsetMathUnknown::setName(docstring const & name)
 {
        name_ = name;
 }
@@ -51,19 +55,17 @@ void InsetMathUnknown::normalize(NormalStream & os) const
 
 void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       // FIXME UNICODE
-       mathed_string_dim(mi.base.font, lyx::from_utf8(name_), dim);
+       mathed_string_dim(mi.base.font, name_, dim);
        dim_ = dim;
 }
 
 
 void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
 {
-       // FIXME UNICODE
        if (black_)
-               drawStrBlack(pi, x, y, lyx::from_utf8(name_));
+               drawStrBlack(pi, x, y, name_);
        else
-               drawStrRed(pi, x, y, lyx::from_utf8(name_));
+               drawStrRed(pi, x, y, name_);
        setPosCache(pi, x, y);
 }
 
@@ -92,7 +94,7 @@ void InsetMathUnknown::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathUnknown::mathmlize(MathMLStream & os) const
+void InsetMathUnknown::mathmlize(MathStream & os) const
 {
        os << MTag("mi") << name_ << ETag("mi");
 }
@@ -102,3 +104,6 @@ void InsetMathUnknown::octave(OctaveStream & os) const
 {
        os << name_;
 }
+
+
+} // namespace lyx