]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXYMatrix.cpp
Coding style
[lyx.git] / src / mathed / InsetMathXYMatrix.cpp
index ab1fe83d279452bf431ff6ed86359f643068493f..79a5a76551049673f4284ee85ca50e173b1a98d6 100644 (file)
 #include <config.h>
 
 #include "InsetMathXYMatrix.h"
-#include "MathStream.h"
 
 #include "LaTeXFeatures.h"
-#include "support/std_ostream.h"
+#include "MathStream.h"
 
+#include <ostream>
 
 namespace lyx {
 
@@ -27,7 +27,7 @@ InsetMathXYMatrix::InsetMathXYMatrix(Length const & s, char c)
 
 Inset * InsetMathXYMatrix::clone() const
 {
-       new InsetMathXYMatrix(*this);
+       return new InsetMathXYMatrix(*this);
 }
 
 
@@ -43,20 +43,17 @@ int InsetMathXYMatrix::rowsep() const
 }
 
 
-bool InsetMathXYMatrix::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathXYMatrix::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (mi.base.style == LM_ST_DISPLAY)
                mi.base.style = LM_ST_TEXT;
        InsetMathGrid::metrics(mi, dim);
-       if (dim_ == dim)
-               return false;
-       dim_ = dim;
-       return true;
 }
 
 
 void InsetMathXYMatrix::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\xymatrix";
        switch (spacing_code_) {
        case 'R':