]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathString.C
Fix comment according to Enricos explanation
[lyx.git] / src / mathed / InsetMathString.C
index f23df13e564671de7b8b4f9df021045731adec16..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)
 {}
 
@@ -34,17 +35,13 @@ auto_ptr<InsetBase> InsetMathString::doClone() const
 
 void InsetMathString::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       // FIXME UNICODE
-       mathed_string_dim(mi.base.font, lyx::from_utf8(str_), dim);
+       mathed_string_dim(mi.base.font, str_, dim);
 }
 
 
 void InsetMathString::draw(PainterInfo & pi, int x, int y) const
 {
-       //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
-       // FIXME UNICODE
-       docstring dstr = lyx::from_utf8(str_);
-       pi.draw(x, y, dstr);
+       pi.draw(x, y, str_);
 }
 
 
@@ -63,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];
 }
 
@@ -83,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)
@@ -107,3 +104,6 @@ void InsetMathString::write(WriteStream & os) const
 {
        os << str_;
 }
+
+
+} // namespace lyx