]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMath.cpp
InsetMathHull.cpp: whitespace
[lyx.git] / src / mathed / InsetMath.cpp
index 49d381cd94c3bea1555561c962dd6ac33b104889..fd8994652dcc6d609d6e37db64cda61cb35df4e2 100644 (file)
 #include "InsetMath.h"
 #include "MathData.h"
 #include "MathStream.h"
-#include "support/gettext.h"
-#include "support/debug.h"
 
+#include "support/debug.h"
 #include "support/docstream.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
-#include <boost/assert.hpp>
-
-using std::endl;
+#include "support/lassert.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -48,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;
@@ -69,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
@@ -78,11 +78,10 @@ void InsetMath::write(WriteStream & os) const
 }
 
 
-int InsetMath::plaintext(Buffer const &, odocstream &,
-                        OutputParams const &) const
+int InsetMath::plaintext(odocstream &, OutputParams const &) const
 {
        // all math plain text output shall take place in InsetMathHull
-       BOOST_ASSERT(false);
+       LASSERT(false, /**/);
        return 0;
 }
 
@@ -134,10 +133,10 @@ HullType InsetMath::getType() const
 }
 
 
-std::ostream & operator<<(std::ostream & os, MathAtom const & at)
+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());
 }
@@ -145,7 +144,7 @@ std::ostream & operator<<(std::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;
 }