]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNumber.C
fix reading UTF8 encoded symbol file
[lyx.git] / src / mathed / InsetMathNumber.C
index 8b8fb9b8b462100019c9ba1f23470dfc39c001d5..9ab909cf0899885f5b8e78962a4ce634a57fea5a 100644 (file)
 #include <config.h>
 
 #include "InsetMathNumber.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 
-using lyx::docstring;
+
+namespace lyx {
 
 using std::string;
 using std::auto_ptr;
+using std::vector;
 
-
-InsetMathNumber::InsetMathNumber(string const & s)
+InsetMathNumber::InsetMathNumber(docstring const & s)
        : str_(s)
 {}
 
@@ -40,8 +41,7 @@ void InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathNumber::draw(PainterInfo & pi, int x, int y) const
 {
-        docstring const dstr(str_.begin(), str_.end());
-       pi.draw(x, y, dstr);
+       pi.draw(x, y, str_);
 }
 
 
@@ -69,7 +69,7 @@ void InsetMathNumber::octave(OctaveStream & os) const
 }
 
 
-void InsetMathNumber::mathmlize(MathMLStream & os) const
+void InsetMathNumber::mathmlize(MathStream & os) const
 {
        os << "<mi> " << str_ << " </mi>";
 }
@@ -79,3 +79,6 @@ void InsetMathNumber::write(WriteStream & os) const
 {
        os << str_;
 }
+
+
+} // namespace lyx