]> git.lyx.org Git - lyx.git/blobdiff - src/MetricsInfo.cpp
Cosmetics.
[lyx.git] / src / MetricsInfo.cpp
index c2ed3cf094617e9e53578ca2c460990fab85bd7d..02a458dbeb04c1dc603176335780df1ada16893c 100644 (file)
 
 #include "frontends/Painter.h"
 
+#include "support/docstring.h"
+
 #include <boost/assert.hpp>
 
+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<FontInfo, FontShape>(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);
 }