]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / formulamacro.C
index da8943bacf13f298adc8d319b81fd0868df95099..c11bd1f8b61fd019ba1a5248bed29d35803757da 100644 (file)
@@ -39,6 +39,7 @@
 using namespace lyx::support;
 
 using std::ostream;
+using std::auto_ptr;
 
 extern MathCursor * mathcursor;
 
@@ -50,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)));
 }
 
 
@@ -64,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));
 }
 
 
@@ -150,9 +152,9 @@ MathAtom & InsetFormulaMacro::par()
 }
 
 
-Inset::Code InsetFormulaMacro::lyxCode() const
+InsetOld::Code InsetFormulaMacro::lyxCode() const
 {
-       return Inset::MATHMACRO_CODE;
+       return InsetOld::MATHMACRO_CODE;
 }