X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetFormulaMacro.cpp;h=6e5b65a7ec217b157a1748b877a8a5439483ad08;hb=d0d7d0103aed0b300807be54224ba7cd324c1ff5;hp=f52ef78075f8469d5c22da6b0d70fc487dd66d4c;hpb=39e79d8602920eefe36e898c9f415afb979521b2;p=lyx.git diff --git a/src/mathed/InsetFormulaMacro.cpp b/src/mathed/InsetFormulaMacro.cpp index f52ef78075..6e5b65a7ec 100644 --- a/src/mathed/InsetFormulaMacro.cpp +++ b/src/mathed/InsetFormulaMacro.cpp @@ -12,14 +12,14 @@ #include #include "InsetFormulaMacro.h" -#include "MathMacroTable.h" +#include "MacroTable.h" #include "MathMacroTemplate.h" #include "BufferView.h" -#include "LCursor.h" +#include "Cursor.h" #include "debug.h" #include "gettext.h" -#include "LColor.h" +#include "Color.h" #include "Lexer.h" #include "OutputParams.h" @@ -30,17 +30,14 @@ #include - -namespace lyx { - -using odocstream; -using support::bformat; - using std::string; using std::auto_ptr; using std::ostream; using std::endl; +namespace lyx { + +using support::bformat; InsetFormulaMacro::InsetFormulaMacro() @@ -49,7 +46,7 @@ InsetFormulaMacro::InsetFormulaMacro() InsetFormulaMacro::InsetFormulaMacro - (string const & name, int nargs, string const & type) + (docstring const & name, int nargs, docstring const & type) : InsetMathNest(2), name_(name) { MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type))); @@ -64,9 +61,9 @@ InsetFormulaMacro::InsetFormulaMacro(string const & s) } -auto_ptr InsetFormulaMacro::clone() const +auto_ptr InsetFormulaMacro::clone() const { - return auto_ptr(new InsetFormulaMacro(*this)); + return auto_ptr(new InsetFormulaMacro(*this)); } @@ -79,7 +76,7 @@ void InsetFormulaMacro::write(Buffer const &, ostream & os) const int InsetFormulaMacro::latex(Buffer const &, odocstream & os, - OutputParams const & runparams) const + OutputParams const & runparams) const { //lyxerr << "InsetFormulaMacro::latex" << endl; WriteStream wi(os, runparams.moving_arg, true); @@ -89,7 +86,7 @@ int InsetFormulaMacro::latex(Buffer const &, odocstream & os, int InsetFormulaMacro::plaintext(Buffer const &, odocstream & os, - OutputParams const &) const + OutputParams const &) const { odocstringstream oss; WriteStream wi(oss, false, true); @@ -102,7 +99,7 @@ int InsetFormulaMacro::plaintext(Buffer const &, odocstream & os, int InsetFormulaMacro::docbook(Buffer const & buf, ostream & os, - OutputParams const & runparams) const + OutputParams const & runparams) const { return plaintext(buf, os, runparams); } @@ -144,8 +141,8 @@ bool InsetFormulaMacro::metrics(MetricsInfo & mi, Dimension & dim) const void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const { // label - LyXFont font = p.base.font; - font.setColor(LColor::math); + Font font = p.base.font; + font.setColor(Color::math); PainterInfo pi(p.base.bv, p.pain); pi.base.style = LM_ST_TEXT; @@ -155,15 +152,15 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const int const w = dim_.wid - 2; int const h = dim_.height() - 2; - // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too - pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg); - pi.pain.rectangle(x, a, w, h, LColor::mathframe); + // Color::mathbg used to be "AntiqueWhite" but is "linen" now, too + pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg); + pi.pain.rectangle(x, a, w, h, Color::mathframe); #ifdef WITH_WARNINGS #warning FIXME #endif #if 0 - LCursor & cur = p.base.bv->cursor(); + Cursor & cur = p.base.bv->cursor(); if (cur.isInside(this)) cur.drawSelection(pi); #endif