]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / mathed / formulamacro.C
index cd27204f09f6ab50a007b1c1312baf502a92c796..c11bd1f8b61fd019ba1a5248bed29d35803757da 100644 (file)
 #include "lyxtext.h"
 #include "Lsstream.h"
 
+using namespace lyx::support;
+
 using std::ostream;
+using std::auto_ptr;
 
 extern MathCursor * mathcursor;
 
@@ -48,10 +51,11 @@ InsetFormulaMacro::InsetFormulaMacro()
 }
 
 
-InsetFormulaMacro::InsetFormulaMacro(string const & name, int nargs)
+InsetFormulaMacro::InsetFormulaMacro
+       (string const & name, int nargs, string const & type)
 {
        setInsetName(name);
-       MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs)));
+       MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type)));
 }
 
 
@@ -62,9 +66,9 @@ InsetFormulaMacro::InsetFormulaMacro(string const & s)
 }
 
 
-Inset * InsetFormulaMacro::clone() const
+auto_ptr<InsetBase> InsetFormulaMacro::clone() const
 {
-       return new InsetFormulaMacro(*this);
+       return auto_ptr<InsetBase>(new InsetFormulaMacro(*this));
 }
 
 
@@ -148,9 +152,9 @@ MathAtom & InsetFormulaMacro::par()
 }
 
 
-Inset::Code InsetFormulaMacro::lyxCode() const
+InsetOld::Code InsetFormulaMacro::lyxCode() const
 {
-       return Inset::MATHMACRO_CODE;
+       return InsetOld::MATHMACRO_CODE;
 }