#include "math_mathmlstream.h"
#include "debug.h"
+#include "support/lstrings.h"
+
using std::string;
using std::ostream;
using std::endl;
-MathArray dummyCell;
-
MathArray & MathInset::cell(idx_type)
{
+ static MathArray dummyCell;
lyxerr << "I don't have a cell 1" << endl;
return dummyCell;
}
MathArray const & MathInset::cell(idx_type) const
{
+ static MathArray dummyCell;
lyxerr << "I don't have a cell 2" << endl;
return dummyCell;
}
-void MathInset::substitute(MathMacro const &)
-{}
-
-
-
void MathInset::dump() const
{
lyxerr << "---------------------------------------------" << endl;
void MathInset::write(WriteStream & os) const
{
- os << '\\' << name().c_str();
- os.pendingSpace(true);
+ string const s = name();
+ os << '\\' << s.c_str();
+ // 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]))
+ os.pendingSpace(true);
}
string const & MathInset::getType() const
{
- static string const t("none");
+ static string const t = "none";
return t;
}
at->write(wi);
return os;
}
-
-
-string MathInset::fileInsetLabel() const
-{
- return "Formula";
-}