git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4593 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-07-10 15:23:36 +00:00
parent 72a19def29
commit 55aa66a6e0
2 changed files with 11 additions and 10 deletions

View File

@ -24,9 +24,9 @@
#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_parser.h"
#include "debug.h"
#include "frontends/LyXView.h"
@ -307,19 +307,17 @@ string const & MathInset::getType() const
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;
for (string::const_iterator it = str.begin(); it != str.end(); ++it)
ar.push_back(MathAtom(new MathCharInset(*it)));
mathed_parse_cell(ar, str);
return ar;
}

View File

@ -1001,8 +1001,11 @@ void Parser::parse_into1(MathGridInset & grid, unsigned flags,
}
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") {