]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathString.C
cursor is no more damaging the background. L-shaped cursor is broken right now....
[lyx.git] / src / mathed / InsetMathString.C
index 9f5afa70b913300656b09a26116c7684671f5dec..78637265d7ad5adf4aa5daf4dc2902cded31571e 100644 (file)
 #include <config.h>
 
 #include "InsetMathString.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 
-using lyx::docstring;
 
-using std::string;
+namespace lyx {
+
 using std::auto_ptr;
+using std::vector;
 
 
-InsetMathString::InsetMathString(string const & s)
+InsetMathString::InsetMathString(docstring const & s)
        : str_(s)
 {}
 
@@ -40,9 +41,7 @@ void InsetMathString::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathString::draw(PainterInfo & pi, int x, int y) const
 {
-       //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
-        docstring dstr(str_.begin(), str_.end());
-       pi.draw(x, y, dstr);
+       pi.draw(x, y, str_);
 }
 
 
@@ -61,7 +60,7 @@ void InsetMathString::maple(MapleStream & os) const
 
        // insert '*' between adjacent chars if type is LM_TC_VAR
        os << str_[0];
-       for (string::size_type i = 1; i < str_.size(); ++i)
+       for (size_t i = 1; i < str_.size(); ++i)
                os << str_[i];
 }
 
@@ -81,12 +80,12 @@ void InsetMathString::octave(OctaveStream & os) const
 
        // insert '*' between adjacent chars if type is LM_TC_VAR
        os << str_[0];
-       for (string::size_type i = 1; i < str_.size(); ++i)
+       for (size_t i = 1; i < str_.size(); ++i)
                os << str_[i];
 }
 
 
-void InsetMathString::mathmlize(MathMLStream & os) const
+void InsetMathString::mathmlize(MathStream & os) const
 {
 /*
        if (code_ == LM_TC_VAR)
@@ -105,3 +104,6 @@ void InsetMathString::write(WriteStream & os) const
 {
        os << str_;
 }
+
+
+} // namespace lyx