]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macro.C
Georg Baum's vspace change
[lyx.git] / src / mathed / math_macro.C
index 8d07cf8e79756fad8e5ac94d89e0a6623d31bb21..aaad86b832c2c7a52db88da4fbcf44ce63b429d6 100644 (file)
@@ -1,19 +1,15 @@
-/*
- *  File:        math_macro.C
- *  Purpose:     Implementation of macro class for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
- *  Created:     November 1996
- *  Description: WYSIWYG math macros
+/**
+ * \file math_macro.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *  Dependencies: Math
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
  *
- *  Copyright: 1996, 1997 Alejandro Aguilar Sierra
- *
- *  Version: 0.2, Math & Lyx project.
- *
- *  This code is under the GNU General Public Licence version 2 or later.
+ * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
 
 #include "math_macro.h"
 #include "math_support.h"
 #include "math_macrotable.h"
 #include "math_macrotemplate.h"
 #include "math_mathmlstream.h"
-#include "math_streamstr.h"
-#include "support/lstrings.h"
-#include "support/LAssert.h"
 #include "debug.h"
 #include "LaTeXFeatures.h"
 
 
+using std::string;
 using std::max;
+using std::auto_ptr;
+using std::endl;
 
 
 MathMacro::MathMacro(string const & name)
@@ -44,9 +40,9 @@ MathMacro::MathMacro(MathMacro const & m)
 
 
 
-MathInset * MathMacro::clone() const
+auto_ptr<InsetBase> MathMacro::clone() const
 {
-       return new MathMacro(*this);
+       return auto_ptr<InsetBase>(new MathMacro(*this));
 }
 
 
@@ -150,12 +146,12 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const
 void MathMacro::dump() const
 {
        MathMacroTable::dump();
-       lyxerr << "\n macro: '" << this << "'\n";
-       lyxerr << " name: '" << name() << "'\n";
-       lyxerr << " template: '";
+       lyxerr << "\n macro: '" << this << "'\n"
+              << " name: '" << name() << "'\n"
+              << " template: '";
        WriteStream wi(lyxerr);
        tmplate_->write(wi);
-       lyxerr << "'\n";
+       lyxerr << "'" << endl;
 }