X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathMacroTemplate.cpp;h=42d81772b737755ddcb8c89af2bea67a8fe69de7;hb=2acc4fc54c178744467b89b469f10bda90bb0310;hp=31250e29df547156c91d650e72659e832fe95ad9;hpb=670efa8f646218f2a378f0cc614c4c37a9f6b89a;p=lyx.git diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 31250e29df..42d81772b7 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -269,7 +269,7 @@ Inset * InsetMathWrapper::clone() const void InsetMathWrapper::metrics(MetricsInfo & mi, Dimension & dim) const { value_->metrics(mi, dim); - //metricsMarkers2(dim); + //metricsMarkers2(mi, dim); } @@ -544,7 +544,7 @@ void MathMacroTemplate::createLook(int args) const void MathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const { Changer dummy1 = mi.base.changeFontSet("mathnormal"); - Changer dummy2 = mi.base.changeStyle(LM_ST_TEXT); + Changer dummy2 = mi.base.font.changeStyle(LM_ST_TEXT); // valid macro? MacroData const * macro = 0; @@ -588,7 +588,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const // FIXME: Calling Changer on the same object repeatedly is inefficient. Changer dummy0 = pi.base.font.changeColor(Color_math); Changer dummy1 = pi.base.changeFontSet("mathnormal"); - Changer dummy2 = pi.base.changeStyle(LM_ST_TEXT); + Changer dummy2 = pi.base.font.changeStyle(LM_ST_TEXT); setPosCache(pi, x, y); Dimension const dim = dimension(*pi.base.bv); @@ -597,7 +597,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const int const a = y - dim.asc + 1; int const w = dim.wid - 2; int const h = dim.height() - 2; - pi.pain.rectangle(x, a, w, h, Color_mathframe); + pi.pain.rectangle(x + 1, a, w, h, Color_mathframe); // just to be sure: set some dummy values for coord cache for (idx_type i = 0; i < nargs(); ++i) @@ -1172,7 +1172,7 @@ void MathMacroTemplate::read(Lexer & lex) void MathMacroTemplate::write(ostream & os) const { odocstringstream oss; - otexrowstream ots(oss, false); + otexrowstream ots(oss); WriteStream wi(ots, false, false, WriteStream::wsDefault); oss << "FormulaMacro\n"; write(wi);