]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMath.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMath.cpp
index 4fbfca647b56ae21694012d9d1a825586f490068..139defa9b55b5d015b7ddba53a46490128ddb2b5 100644 (file)
@@ -4,7 +4,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.
  */
@@ -21,7 +21,7 @@
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
-#include "support/assert.h"
+#include "support/lassert.h"
 
 using namespace std;
 
@@ -47,7 +47,7 @@ void InsetMath::dump() const
 {
        lyxerr << "---------------------------------------------" << endl;
        odocstringstream os;
-       WriteStream wi(os, false, true);
+       WriteStream wi(os, false, true, false);
        write(wi);
        lyxerr << to_utf8(os.str());
        lyxerr << "\n---------------------------------------------" << endl;
@@ -68,6 +68,7 @@ void InsetMath::drawT(TextPainter &, int, int) const
 
 void InsetMath::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        docstring const s = name();
        os << "\\" << s;
        // We need an extra ' ' unless this is a single-char-non-ASCII name
@@ -135,7 +136,7 @@ HullType InsetMath::getType() const
 ostream & operator<<(ostream & os, MathAtom const & at)
 {
        odocstringstream oss;
-       WriteStream wi(oss, false, false);
+       WriteStream wi(oss, false, false, false);
        at->write(wi);
        return os << to_utf8(oss.str());
 }
@@ -143,7 +144,7 @@ ostream & operator<<(ostream & os, MathAtom const & at)
 
 odocstream & operator<<(odocstream & os, MathAtom const & at)
 {
-       WriteStream wi(os, false, false);
+       WriteStream wi(os, false, false, false);
        at->write(wi);
        return os;
 }