]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathCases.C
fix reading UTF8 encoded symbol file
[lyx.git] / src / mathed / InsetMathCases.C
index d8507cf54ffa53ef499adfa46d13245d21180e20..46c09caa2ccfebbdfda4456ed7bead3958b3db7b 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "InsetMathCases.h"
 #include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathSupport.h"
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
 #include "support/lstrings.h"
 
 
-using lyx::docstring;
-using lyx::support::bformat;
+namespace lyx {
+
+using support::bformat;
 
 using std::endl;
 using std::max;
 using std::min;
 using std::swap;
-using std::string;
-
 using std::auto_ptr;
 
 
 InsetMathCases::InsetMathCases(row_type n)
-       : InsetMathGrid(2, n, 'c', "ll")
+       : InsetMathGrid(2, n, 'c', from_ascii("ll"))
 {}
 
 
@@ -58,7 +57,7 @@ void InsetMathCases::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathCases::draw(PainterInfo & pi, int x, int y) const
 {
-       mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
+       mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 6, dim_.height(), from_ascii("{"));
        InsetMathGrid::drawWithMargin(pi, x, y, 8, 0);
        setPosCache(pi, x, y);
 }
@@ -91,7 +90,7 @@ bool InsetMathCases::getStatus(LCursor & cur, FuncRequest const & cmd,
                if (s == "add-vline-left" || s == "add-vline-right") {
                        flag.enabled(false);
                        flag.message(bformat(
-                               lyx::from_utf8(N_("No vertical grid lines in '%1$s'")),
+                               from_utf8(N_("No vertical grid lines in '%1$s'")),
                                s));
                        return true;
                }
@@ -130,7 +129,7 @@ void InsetMathCases::maple(MapleStream & os) const
 }
 
 
-void InsetMathCases::infoize(std::ostream & os) const
+void InsetMathCases::infoize(odocstream & os) const
 {
        os << "Cases ";
 }
@@ -141,3 +140,6 @@ void InsetMathCases::validate(LaTeXFeatures & features) const
        features.require("amsmath");
        InsetMathGrid::validate(features);
 }
+
+
+} // namespace lyx