#include "InsetMath.h"
#include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
#include "debug.h"
#include "support/lstrings.h"
#include <boost/current_function.hpp>
-using lyx::odocstream;
-using std::string;
+namespace lyx {
+
using std::endl;
void InsetMath::dump() const
{
lyxerr << "---------------------------------------------" << endl;
- lyx::odocstringstream os;
+ odocstringstream os;
WriteStream wi(os, false, true);
write(wi);
- lyxerr << lyx::to_utf8(os.str());
+ lyxerr << to_utf8(os.str());
lyxerr << "\n---------------------------------------------" << endl;
}
void InsetMath::write(WriteStream & os) const
{
- string const s = name();
- os << '\\' << s.c_str();
+ docstring const s = name();
+ os << "\\" << s;
// We need an extra ' ' unless this is a single-char-non-ASCII name
// or anything non-ASCII follows
if (s.size() != 1 || isalpha(s[0]))
void InsetMath::normalize(NormalStream & os) const
{
- os << '[' << name().c_str() << "] ";
+ os << '[' << name() << "] ";
}
}
-void InsetMath::mathmlize(MathMLStream & os) const
+void InsetMath::mathmlize(MathStream & os) const
{
- NormalStream ns(os.os());
- normalize(ns);
+ NormalStream ns(os.os());
+ normalize(ns);
}
}
-string InsetMath::name() const
+docstring InsetMath::name() const
{
- return "unknown";
+ return from_ascii("unknown");
}
std::ostream & operator<<(std::ostream & os, MathAtom const & at)
{
- lyx::odocstringstream oss;
+ odocstringstream oss;
WriteStream wi(oss, false, false);
at->write(wi);
- return os << lyx::to_utf8(oss.str());
+ return os << to_utf8(oss.str());
}
at->write(wi);
return os;
}
+
+
+} // namespace lyx