]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetFormulaMacro.cpp
Fixed some lines that were too long. It compiled afterwards.
[lyx.git] / src / mathed / InsetFormulaMacro.cpp
index cbf2058aaa8e5260d1ca6c12773ac539f59caefb..c0148fcac2bce8fb5c0310800444a611328cc05b 100644 (file)
 
 #include <sstream>
 
-
-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<InsetBase> InsetFormulaMacro::clone() const
+auto_ptr<Inset> InsetFormulaMacro::clone() const
 {
-       return auto_ptr<InsetBase>(new InsetFormulaMacro(*this));
+       return auto_ptr<Inset>(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,7 +141,7 @@ 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 font = p.base.font;
        font.setColor(Color::math);
 
        PainterInfo pi(p.base.bv, p.pain);
@@ -159,9 +156,7 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
        pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
        pi.pain.rectangle(x, a, w, h, Color::mathframe);
 
-#ifdef WITH_WARNINGS
-#warning FIXME
-#endif
+       // FIXME
 #if 0
        Cursor & cur = p.base.bv->cursor();
        if (cur.isInside(this))