]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathEnsureMath.cpp
Fortify math insets against ulem commands
[lyx.git] / src / mathed / InsetMathEnsureMath.cpp
index 1cc9971705415c78d4bafa3424993863677f98a1..d1e69fb6c23a584b050f3c188eaf0fb7ad25beda 100644 (file)
 
 #include "InsetMathEnsureMath.h"
 
-#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
+
 #include <ostream>
 
 
@@ -36,7 +38,7 @@ Inset * InsetMathEnsureMath::clone() const
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+       bool really_change_font = isTextFont(mi.base.fontname);
        Changer dummy = mi.base.changeFontSet("mathnormal", really_change_font);
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
@@ -45,7 +47,7 @@ void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-       bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+       bool really_change_font = isTextFont(pi.base.fontname);
        Changer dummy = pi.base.changeFontSet("mathnormal", really_change_font);
        cell(0).draw(pi, x, y);
        drawMarkers(pi, x, y);