]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
Fix reading of math macros
[lyx.git] / src / mathed / math_inset.C
index 1eb8465e99761a7a579b8eb3c20920127e5e5f02..48f644d71a13f4ec02b7f903a0ddcc08523cda80 100644 (file)
  *   the GNU General Public Licence version 2 or later.
  */
 
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
-
-#include "Lsstream.h"
 #include "math_inset.h"
+#include "Lsstream.h"
 #include "math_scriptinset.h"
 #include "math_mathmlstream.h"
 #include "math_cursor.h"
@@ -34,9 +34,7 @@
 #include "BufferView.h"
 #include "formulabase.h"
 
-
 using std::ostream;
-using std::vector;
 
 
 int MathInset::height() const
@@ -45,14 +43,6 @@ int MathInset::height() const
 }
 
 
-ostream & operator<<(ostream & os, MathAtom const & at)
-{
-       WriteStream wi(os, false, false);
-       at->write(wi);
-       return os;
-}
-
-
 MathInset::size_type MathInset::nargs() const
 {
        return 0;
@@ -234,6 +224,13 @@ void MathInset::maplize(MapleStream & os) const
 }
 
 
+void MathInset::maximize(MaximaStream & os) const
+{
+       MapleStream ns(os.os());
+       maplize(ns);
+}
+
+
 void MathInset::mathematicize(MathematicaStream & os) const
 {
        NormalStream ns(os.os());
@@ -267,7 +264,7 @@ int MathInset::docbook(std::ostream &, bool) const
 
 
 MathInset::result_type
-       MathInset::dispatch(FuncRequest const &, idx_type &, pos_type &) 
+       MathInset::dispatch(FuncRequest const &, idx_type &, pos_type &)
 {
        return UNDISPATCHED;
 }
@@ -291,7 +288,7 @@ string asString(MathArray const & ar)
        std::ostringstream os;
        WriteStream ws(os);
        ws << ar;
-       return os.str().c_str();
+       return STRCONV(os.str());
 }
 
 
@@ -303,6 +300,14 @@ MathArray asArray(string const & str)
 }
 
 
+ostream & operator<<(ostream & os, MathAtom const & at)
+{
+       WriteStream wi(os, false, false);
+       at->write(wi);
+       return os;
+}
+
+
 Dialogs & getDialogs()
 {
        return mathcursor->formula()->view()->owner()->getDialogs();