]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathAMSArray.C
cursor is no more damaging the background. L-shaped cursor is broken right now....
[lyx.git] / src / mathed / InsetMathAMSArray.C
index 613c60fd6f87a2e08224580a7b512d1c8a5e387b..18b3502ed8ab219809d20b70924894d372bb5ebd 100644 (file)
@@ -13,7 +13,7 @@
 #include "LaTeXFeatures.h"
 #include "InsetMathAMSArray.h"
 #include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 
 #include "support/lstrings.h"
 #include "support/std_ostream.h"
 
+using std::auto_ptr;
 
-using lyx::docstring;
+namespace lyx {
 
-using std::string;
-using std::auto_ptr;
-using lyx::support::bformat;
+using support::bformat;
 
 
-InsetMathAMSArray::InsetMathAMSArray(string const & name, int m, int n)
+InsetMathAMSArray::InsetMathAMSArray(docstring const & name, int m, int n)
        : InsetMathGrid(m, n), name_(name)
 {}
 
 
-InsetMathAMSArray::InsetMathAMSArray(string const & name)
+InsetMathAMSArray::InsetMathAMSArray(docstring const & name)
        : InsetMathGrid(1, 1), name_(name)
 {}
 
@@ -93,8 +92,8 @@ void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const
 {
        int const yy = y - dim_.ascent();
        // Drawing the deco after an ArrayChanger does not work
-       mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), name_left());
-       mathed_draw_deco(pi, x + dim_.width() - 8, yy, 5, dim_.height(), name_right());
+       mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), from_ascii(name_left()));
+       mathed_draw_deco(pi, x + dim_.width() - 8, yy, 5, dim_.height(), from_ascii(name_right()));
        ArrayChanger dummy(pi.base);
        InsetMathGrid::drawWithMargin(pi, x, y, 6, 8);
 }
@@ -108,8 +107,7 @@ bool InsetMathAMSArray::getStatus(LCursor & cur, FuncRequest const & cmd,
                docstring const & s = cmd.argument();
                if (s == "add-vline-left" || s == "add-vline-right") {
                        flag.message(bformat(
-                       lyx::from_utf8(N_("Can't add vertical grid lines in '%1$s'")),
-                               lyx::from_utf8(name_)));
+                               from_utf8(N_("Can't add vertical grid lines in '%1$s'")),       name_));
                        flag.enabled(false);
                        return true;
                }
@@ -129,10 +127,10 @@ void InsetMathAMSArray::write(WriteStream & os) const
 }
 
 
-void InsetMathAMSArray::infoize(std::ostream & os) const
+void InsetMathAMSArray::infoize(odocstream & os) const
 {
-       string name = name_;
-       name[0] = lyx::support::uppercase(name[0]);
+       docstring name = name_;
+       name[0] = support::uppercase(name[0]);
        os << name << ' ';
 }
 
@@ -150,3 +148,6 @@ void InsetMathAMSArray::validate(LaTeXFeatures & features) const
        features.require("amsmath");
        InsetMathGrid::validate(features);
 }
+
+
+} // namespace lyx