]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathEnsureMath.cpp
add busy.gif to resources (in line with cmake)
[lyx.git] / src / mathed / InsetMathEnsureMath.cpp
index 149bae7d2cb247fbc5fd8871066f3df866d13d11..3fdb3fbba9beeff3cacae91ca710a0b9d05c284a 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathExtern.h"
 #include "MathData.h"
 #include "MathStream.h"
+#include "MathSupport.h"
 
 #include <ostream>
 
@@ -35,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() const
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       FontSetChanger dummy(mi.base, "mathnormal");
+       bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+       FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
 }
@@ -43,7 +44,8 @@ void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-       FontSetChanger dummy(pi.base, "mathnormal");
+       bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+       FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
        cell(0).draw(pi, x, y);
        drawMarkers(pi, x, y);
 }
@@ -68,9 +70,9 @@ void InsetMathEnsureMath::write(WriteStream & os) const
 }
 
 
-docstring InsetMathEnsureMath::mathmlize(MathStream & os) const
+void InsetMathEnsureMath::mathmlize(MathStream & os) const
 {
-       return lyx::mathmlize(cell(0), os);
+       os << cell(0);
 }