-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include <config.h>
#include "math_metricsinfo.h"
+MathArrayChanger::MathArrayChanger(MathMetricsBase & mb)
+ : MathStyleChanger(mb, mb.style == LM_ST_DISPLAY ? LM_ST_TEXT : mb.style)
+{}
+
+
MathShapeChanger::MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape)
: MathChanger<LyXFont, LyXFont::FONT_SHAPE>(font)
{
: MathChanger<MathMetricsBase>(mb)
{
static const int diff[4][4] = { { 0, 0, -3, -5 },
- { 0, 0, -3, -5 },
- { 3, 3, 0, -2 },
- { 5, 5, 2, 0 } };
+ { 0, 0, -3, -5 },
+ { 3, 3, 0, -2 },
+ { 5, 5, 2, 0 } };
save_ = mb;
int t = diff[mb.style][style];
- if (t > 0)
+ if (t > 0)
while (t--)
mb.font.incSize();
- else
+ else
while (t++)
mb.font.decSize();
mb.style = style;
MathFontSetChanger::MathFontSetChanger(MathMetricsBase & mb, char const * name)
: MathChanger<MathMetricsBase>(mb)
{
- save_ = mb;
+ save_ = mb;
mb.fontname = name;
augmentFont(mb.font, name);
}
MathWidthChanger::MathWidthChanger(MathMetricsBase & mb, int w)
: MathChanger<MathMetricsBase>(mb)
{
- save_ = mb;
+ save_ = mb;
mb.restrictwidth = true;
mb.textwidth = w;
}
{
orig_ = save_;
}
-