summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
72a19de)
#include "Lsstream.h"
#include "math_inset.h"
#include "math_scriptinset.h"
#include "Lsstream.h"
#include "math_inset.h"
#include "math_scriptinset.h"
-#include "math_charinset.h"
#include "math_mathmlstream.h"
#include "math_cursor.h"
#include "math_mathmlstream.h"
#include "math_cursor.h"
+#include "math_parser.h"
#include "debug.h"
#include "frontends/LyXView.h"
#include "debug.h"
#include "frontends/LyXView.h"
string asString(MathArray const & ar)
{
string asString(MathArray const & ar)
{
- string res;
- for (MathArray::const_iterator it = ar.begin(); it != ar.end(); ++it)
- if ((*it)->getChar())
- res += (*it)->getChar();
- return res;
+ std::ostringstream os;
+ WriteStream ws(os);
+ ws << ar;
+ return os.str();
}
MathArray asArray(string const & str)
{
MathArray ar;
}
MathArray asArray(string const & str)
{
MathArray ar;
- for (string::const_iterator it = str.begin(); it != str.end(); ++it)
- ar.push_back(MathAtom(new MathCharInset(*it)));
+ mathed_parse_cell(ar, str);
}
else if (t.cs() == "label") {
}
else if (t.cs() == "label") {
- if (grid.asHullInset())
- grid.asHullInset()->label(cellrow, getArg('{', '}'));
+ if (grid.asHullInset()) {
+ MathArray ar;
+ parse_into(ar, FLAG_ITEM, false);
+ grid.asHullInset()->label(cellrow, asString(ar));
+ }
}
else if (t.cs() == "choose" || t.cs() == "over" || t.cs() == "atop") {
}
else if (t.cs() == "choose" || t.cs() == "over" || t.cs() == "atop") {