]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSplit.C
Fix comment according to Enricos explanation
[lyx.git] / src / mathed / InsetMathSplit.C
index 606191e1fd405affd6c91a261688b53728b873a2..00dd9e87ee7e0286d39c24c5cad4e952d7a7d3a1 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "InsetMathSplit.h"
 #include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathStream.h"
 
 #include "funcrequest.h"
 #include "support/std_ostream.h"
 
 
-using lyx::docstring;
-using lyx::support::bformat;
+namespace lyx {
+
+using support::bformat;
+
 using std::string;
 using std::auto_ptr;
 
 
-InsetMathSplit::InsetMathSplit(string const & name, char valign)
-       : InsetMathGrid(1, 1, valign, string()), name_(name)
+InsetMathSplit::InsetMathSplit(docstring const & name, char valign)
+       : InsetMathGrid(1, 1, valign, docstring()), name_(name)
 {
 }
 
@@ -71,8 +73,7 @@ bool InsetMathSplit::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;
                }
@@ -100,16 +101,21 @@ void InsetMathSplit::write(WriteStream & ws) const
 }
 
 
-void InsetMathSplit::infoize(std::ostream & os) const
+void InsetMathSplit::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 << ' ';
 }
 
 
 void InsetMathSplit::validate(LaTeXFeatures & features) const
 {
-       features.require("amsmath");
-       InsetMathNest::validate(features);
+       if (name_ == "split" || name_ == "gathered" || name_ == "aligned" ||
+           name_ == "alignedat")
+               features.require("amsmath");
+       InsetMathGrid::validate(features);
 }
+
+
+} // namespace lyx