]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSymbol.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathSymbol.cpp
index ed8af7b3c8593733c5408b1d8a292b80f89cdcf2..8a1ba2fd1b4656d763b9d3b88d8ec95ace61058b 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #include <config.h>
 
 #include "InsetMathSymbol.h"
+
 #include "Dimension.h"
-#include "MathStream.h"
+#include "LaTeXFeatures.h"
+#include "MathAtom.h"
+#include "MathParser.h"
 #include "MathStream.h"
 #include "MathSupport.h"
-#include "MathParser.h"
-#include "MathAtom.h"
-#include "LaTeXFeatures.h"
-
-#include "debug.h"
 
+#include "support/debug.h"
+#include "support/docstream.h"
 #include "support/textutils.h"
 
 
@@ -58,7 +58,7 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
        //      << "' drawn as: '" << sym_->draw
-       //      << "'" << std::endl;
+       //      << "'" << endl;
 
        int const em = mathed_char_width(mi.base.font, 'M');
        FontSetChanger dummy(mi.base, sym_->inset);
@@ -90,7 +90,7 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
        //      << "' drawn as: '" << sym_->draw
-       //      << "'" << std::endl;
+       //      << "'" << endl;
        int const em = mathed_char_width(pi.base.font, 'M');
        if (isRelOp())
                x += static_cast<int>(0.25*em+0.5);
@@ -206,6 +206,7 @@ void InsetMathSymbol::octave(OctaveStream & os) const
 
 void InsetMathSymbol::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << '\\' << name();
 
        // $,#, etc. In theory the restriction based on catcodes, but then
@@ -220,7 +221,7 @@ void InsetMathSymbol::write(WriteStream & os) const
 
 void InsetMathSymbol::infoize2(odocstream & os) const
 {
-       os << "Symbol: " << name();
+       os << from_ascii("Symbol: ") << name();
 }