PainterInfo::PainterInfo(BufferView * bv, lyx::frontend::Painter & painter)
: pain(painter), ltr_pos(false), change_(), selected(false),
- full_repaint(true), background_color(Color_background)
+ do_spellcheck(true), full_repaint(true), background_color(Color_background)
{
base.bv = bv;
}
/////////////////////////////////////////////////////////////////////////
ShapeChanger::ShapeChanger(FontInfo & font, FontShape shape)
- : Changer<FontInfo, FontShape>(font)
+ : Changer<FontInfo, FontShape>(font, font.shape())
{
- save_ = orig_.shape();
orig_.setShape(shape);
}
{ 0, 0, -3, -5 },
{ 3, 3, 0, -2 },
{ 5, 5, 2, 0 } };
- save_ = mb;
int t = diff[mb.style][style];
if (t > 0)
while (t--)
: Changer<MetricsBase>(mb), change_(really_change_font)
{
if (change_) {
- save_ = mb;
FontSize oldsize = save_.font.size();
ColorCode oldcolor = save_.font.color();
docstring const oldname = from_ascii(save_.fontname);
: Changer<MetricsBase>(mb), change_(really_change_font)
{
if (change_) {
- save_ = mb;
FontSize oldsize = save_.font.size();
ColorCode oldcolor = save_.font.color();
docstring const oldname = from_ascii(save_.fontname);
WidthChanger::WidthChanger(MetricsBase & mb, int w)
: Changer<MetricsBase>(mb)
{
- save_ = mb;
mb.textwidth = w;
}
//
/////////////////////////////////////////////////////////////////////////
-ColorChanger::ColorChanger(FontInfo & font, docstring const & color,
+ColorChanger::ColorChanger(FontInfo & font, ColorCode color,
bool really_change_color)
- : Changer<FontInfo, ColorCode>(font), change_(really_change_color)
+ : Changer<FontInfo, ColorCode>(font, font.color()), change_(really_change_color)
{
if (change_) {
- save_ = font.color();
- font.setColor(lcolor.getFromLyXName(to_utf8(color)));
+ font.setColor(color);
}
}