]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSplit.cpp
Coding style
[lyx.git] / src / mathed / InsetMathSplit.cpp
index 3e5666eb3d46556342c1a007e664ba399d4f156f..4420e9e5b56fdffdb645bbca81357cee08ed91ed 100644 (file)
 #include <config.h>
 
 #include "InsetMathSplit.h"
+
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathStream.h"
 
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "gettext.h"
+#include "support/gettext.h"
 #include "LaTeXFeatures.h"
 
 #include "support/lstrings.h"
-#include "support/std_ostream.h"
 
+#include <ostream>
+
+using namespace std;
 
 namespace lyx {
 
 using support::bformat;
 
-using std::string;
-
 
 InsetMathSplit::InsetMathSplit(docstring const & name, char valign)
        : InsetMathGrid(1, 1, valign, docstring()), name_(name)
@@ -73,7 +74,7 @@ bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
                if (s == "add-vline-left" || s == "add-vline-right") {
                        flag.message(bformat(
                                from_utf8(N_("Can't add vertical grid lines in '%1$s'")),       name_));
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, flag);
@@ -86,11 +87,12 @@ bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetMathSplit::write(WriteStream & ws) const
 {
+       MathEnsurer ensurer(ws);
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\begin{" << name_ << '}';
-       if (name_ != "split" && valign() != 'c')
-               ws << '[' << valign() << ']';
+       if (name_ != "split" && verticalAlignment() != 'c')
+               ws << '[' << verticalAlignment() << ']';
        if (name_ == "alignedat")
                ws << '{' << static_cast<unsigned int>((ncols() + 1)/2) << '}';
        InsetMathGrid::write(ws);