X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathFrac.cpp;h=e9f9f6010b030fec69250554c7b40576cb460f35;hb=67215833a174bfb1db8a259f61ed57ae67e10655;hp=fba920dea2e53dac3df3252d07db16c2d68ea836;hpb=f73bb3f16e30546288a52248deb21ce90074bae0;p=lyx.git diff --git a/src/mathed/InsetMathFrac.cpp b/src/mathed/InsetMathFrac.cpp index fba920dea2..e9f9f6010b 100644 --- a/src/mathed/InsetMathFrac.cpp +++ b/src/mathed/InsetMathFrac.cpp @@ -171,8 +171,7 @@ latexkeys const * slash_symbol() return in_word_set(from_ascii("slash")); } -} // anon namespace - +} // namespace void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const @@ -244,12 +243,12 @@ void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const int const dy = axis_height(mi.base); Changer dummy = // \tfrac is always in text size - (kind_ == TFRAC) ? mi.base.font.changeStyle(LM_ST_SCRIPT) : + (kind_ == TFRAC) ? mi.base.font.changeStyle(FONT_STYLE_SCRIPT) : // \cfrac and \dfrac are always in display size (kind_ == CFRAC || kind_ == CFRACLEFT || kind_ == CFRACRIGHT - || kind_ == DFRAC) ? mi.base.font.changeStyle(LM_ST_DISPLAY) : + || kind_ == DFRAC) ? mi.base.font.changeStyle(FONT_STYLE_DISPLAY) : // all others mi.base.changeFrac(); Changer dummy2 = mi.base.changeEnsureMath(); @@ -326,12 +325,12 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const int const dy = axis_height(pi.base); Changer dummy = // \tfrac is always in text size - (kind_ == TFRAC) ? pi.base.font.changeStyle(LM_ST_SCRIPT) : + (kind_ == TFRAC) ? pi.base.font.changeStyle(FONT_STYLE_SCRIPT) : // \cfrac and \dfrac are always in display size (kind_ == CFRAC || kind_ == CFRACLEFT || kind_ == CFRACRIGHT - || kind_ == DFRAC) ? pi.base.font.changeStyle(LM_ST_DISPLAY) : + || kind_ == DFRAC) ? pi.base.font.changeStyle(FONT_STYLE_DISPLAY) : // all others pi.base.changeFrac(); Dimension const dim1 = cell(1).dimension(*pi.base.bv); @@ -536,12 +535,12 @@ void InsetMathFrac::mathmlize(MathStream & os) const // FIXME This is not right, because we still output mi, etc, // when we output the cell. So we need to prevent that somehow. if (nargs() == 2) - os << cell(0) - << MTag("mstyle mathvariant='normal'") - << cell(1) + os << cell(0) + << MTag("mstyle mathvariant='normal'") + << cell(1) << ETag("mstyle"); else - os << MTag("mstyle mathvariant='normal'") + os << MTag("mstyle mathvariant='normal'") << cell(0) << ETag("mstyle"); } @@ -586,12 +585,12 @@ void InsetMathFrac::htmlize(HtmlStream & os) const // FIXME This is not right, because we still output i, etc, // when we output the cell. So we need to prevent that somehow. if (nargs() == 2) - os << cell(0) - << MTag("span") - << cell(1) + os << cell(0) + << MTag("span") + << cell(1) << ETag("span"); else - os << MTag("span") + os << MTag("span") << cell(0) << ETag("span"); } @@ -650,8 +649,8 @@ void InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const Dimension dim0, dim1; int const dy = axis_height(mi.base); Changer dummy = - (kind_ == DBINOM) ? mi.base.font.changeStyle(LM_ST_DISPLAY) : - (kind_ == TBINOM) ? mi.base.font.changeStyle(LM_ST_SCRIPT) : + (kind_ == DBINOM) ? mi.base.font.changeStyle(FONT_STYLE_DISPLAY) : + (kind_ == TBINOM) ? mi.base.font.changeStyle(FONT_STYLE_SCRIPT) : mi.base.changeFrac(); cell(0).metrics(mi, dim0); cell(1).metrics(mi, dim1); @@ -677,8 +676,8 @@ void InsetMathBinom::draw(PainterInfo & pi, int x, int y) const int m = x + dim.width() / 2; { Changer dummy = - (kind_ == DBINOM) ? pi.base.font.changeStyle(LM_ST_DISPLAY) : - (kind_ == TBINOM) ? pi.base.font.changeStyle(LM_ST_SCRIPT) : + (kind_ == DBINOM) ? pi.base.font.changeStyle(FONT_STYLE_DISPLAY) : + (kind_ == TBINOM) ? pi.base.font.changeStyle(FONT_STYLE_SCRIPT) : pi.base.changeFrac(); // take dy both for the vertical alignment and for the spacing between // cells