]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathPhantom.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathPhantom.cpp
index e0ed1a6dd0c4bd912a63fcf4fa401a88543a314e..f070e5505350041ab7e5b6681593a0616cc148fa 100644 (file)
 #include <config.h>
 
 #include "InsetMathPhantom.h"
-#include "MathStream.h"
-#include "MathStream.h"
-
 
+#include "MathStream.h"
 #include "frontends/Painter.h"
 
-#include "support/std_ostream.h"
-
+#include <ostream>
 
 namespace lyx {
 
@@ -38,8 +35,6 @@ void InsetMathPhantom::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -124,6 +119,7 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathPhantom::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        switch (kind_) {
        case phantom:
                os << "\\phantom{";