X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FMetricsInfo.cpp;h=02a458dbeb04c1dc603176335780df1ada16893c;hb=42eb8a373a35da02c45c0d225d37f5d677ddfc2d;hp=c2ed3cf094617e9e53578ca2c460990fab85bd7d;hpb=5ddc612b735317d5b22553a63aad7879503e3950;p=lyx.git diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp index c2ed3cf094..02a458dbeb 100644 --- a/src/MetricsInfo.cpp +++ b/src/MetricsInfo.cpp @@ -18,13 +18,14 @@ #include "frontends/Painter.h" +#include "support/docstring.h" + #include +using namespace std; namespace lyx { -using std::string; - MetricsBase::MetricsBase() : bv(0), font(), style(LM_ST_TEXT), fontname("mathnormal"), @@ -38,17 +39,12 @@ MetricsBase::MetricsBase(BufferView * b, FontInfo const & f, int w) {} - -MetricsInfo::MetricsInfo() -{} - - -MetricsInfo::MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth) - : base(bv, font, textwidth) +MetricsInfo::MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth, + MacroContext const & mc) + : base(bv, font, textwidth), macrocontext(mc) {} - PainterInfo::PainterInfo(BufferView * bv, lyx::frontend::Painter & painter) : pain(painter), ltr_pos(false), erased_(false), full_repaint(true), background_color(Color_background) @@ -114,7 +110,6 @@ ArrayChanger::ArrayChanger(MetricsBase & mb) {} - ShapeChanger::ShapeChanger(FontInfo & font, FontShape shape) : Changer(font) { @@ -163,7 +158,7 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, char const * name) save_ = mb; FontSize oldsize = save_.font.size(); mb.fontname = name; - mb.font = FontInfo(); + mb.font = sane_font; augmentFont(mb.font, from_ascii(name)); mb.font.setSize(oldsize); } @@ -175,7 +170,7 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, docstring const & name) save_ = mb; FontSize oldsize = save_.font.size(); mb.fontname = to_utf8(name); - mb.font = FontInfo(); + mb.font = sane_font; augmentFont(mb.font, name); mb.font.setSize(oldsize); }