void InsetMathDiagram::metrics(MetricsInfo & mi, Dimension & dim) const
{
+ Changer dummy2 = mi.base.changeEnsureMath();
FontInfo & f = mi.base.font;
- Changer dummy = f.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY);
+ Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
+ : noChange();
InsetMathGrid::metrics(mi, dim);
}
void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
{
- setPosCache(pi, x, y);
+ Changer dummy2 = pi.base.changeEnsureMath();
FontInfo & f = pi.base.font;
- Changer dummy = f.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY);
+ Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
+ : noChange();
InsetMathGrid::draw(pi, x, y);
}
-void InsetMathDiagram::write(WriteStream & os) const
+void InsetMathDiagram::write(TeXMathStream & os) const
{
MathEnsurer ensurer(os);
os << "\\Diagram";