]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetFormulaMacro.h
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetFormulaMacro.h
index ecb73960c3c9cdfa2068891c29c7ef881976ef78..5929c1b33017cda4f714360431434797ae91e8e6 100644 (file)
@@ -5,7 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -19,7 +19,7 @@
 namespace lyx {
 
 class MathMacroTemplate;
-class LyXLex;
+class Lexer;
 
 
 // An InsetFormulaMacro only knows its name and asks the global
@@ -35,28 +35,23 @@ public:
        /// constructs a mocro from its LaTeX definition
        explicit InsetFormulaMacro(docstring const & s);
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
 
        ///
-       void read(Buffer const &, LyXLex & lex);
+       void read(Lexer & lex);
        ///
-       void write(Buffer const &, std::ostream & os) const;
+       void write(std::ostream & os) const;
        ///
-       int latex(Buffer const &, odocstream & os,
-                 OutputParams const &) const;
+       int latex(odocstream & os, OutputParams const &) const;
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
 
        ///
-       std::auto_ptr<InsetBase> clone() const;
-       ///
-       InsetBase::Code lyxCode() const { return MATHMACRO_CODE; }
+       InsetCode lyxCode() const { return MATHMACRO_CODE; }
        ///
        docstring const & getInsetName() const { return name_; }
        ///
@@ -70,6 +65,8 @@ private:
        docstring prefix() const;
        ///
        docstring name_;
+       ///
+       Inset * clone() const;
 };