]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSize.cpp
InsetMathHull.cpp: whitespace
[lyx.git] / src / mathed / InsetMathSize.cpp
index bb0b69f0d8c4998ab22a79f11489ec1d4b324b96..4e6e3e9796e2487c8ee8f46bc3c2c75788f03600 100644 (file)
 #include <config.h>
 
 #include "InsetMathSize.h"
+
 #include "MathData.h"
 #include "MathParser.h"
 #include "MathStream.h"
 
 #include "support/convert.h"
-#include "support/std_ostream.h"
+
+#include <ostream>
 
 
 namespace lyx {
@@ -32,15 +34,11 @@ Inset * InsetMathSize::clone() const
 }
 
 
-bool InsetMathSize::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathSize::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        StyleChanger dummy(mi.base, style_);
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
-       if (dim_ == dim)
-               return false;
-       dim_ = dim;
-       return true;
 }
 
 
@@ -54,6 +52,7 @@ void InsetMathSize::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathSize::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "{\\" << key_->name << ' ' << cell(0) << '}';
 }