mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
fix #658
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5405 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
78c2dddb78
commit
c7b1bd5a00
@ -86,13 +86,13 @@ using std::atoi;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
MathInset::mode_type asMode(string const & str)
|
MathInset::mode_type asMode(MathInset::mode_type oldmode, string const & str)
|
||||||
{
|
{
|
||||||
if (str == "mathmode")
|
if (str == "mathmode")
|
||||||
return MathInset::MATH_MODE;
|
return MathInset::MATH_MODE;
|
||||||
if (str == "textmode" || str == "forcetext")
|
if (str == "textmode" || str == "forcetext")
|
||||||
return MathInset::TEXT_MODE;
|
return MathInset::TEXT_MODE;
|
||||||
return MathInset::UNDECIDED_MODE;
|
return oldmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1151,12 +1151,12 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
|
|||||||
if (l) {
|
if (l) {
|
||||||
if (l->inset == "font") {
|
if (l->inset == "font") {
|
||||||
cell->push_back(createMathInset(t.cs()));
|
cell->push_back(createMathInset(t.cs()));
|
||||||
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, asMode(l->extra));
|
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, asMode(mode, l->extra));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (l->inset == "oldfont") {
|
else if (l->inset == "oldfont") {
|
||||||
cell->push_back(createMathInset(t.cs()));
|
cell->push_back(createMathInset(t.cs()));
|
||||||
parse(cell->back().nucleus()->cell(0), flags, asMode(l->extra));
|
parse(cell->back().nucleus()->cell(0), flags, asMode(mode, l->extra));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1179,7 +1179,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
|
|||||||
else {
|
else {
|
||||||
MathAtom at = createMathInset(t.cs());
|
MathAtom at = createMathInset(t.cs());
|
||||||
for (MathInset::idx_type i = 0; i < at->nargs(); ++i)
|
for (MathInset::idx_type i = 0; i < at->nargs(); ++i)
|
||||||
parse(at.nucleus()->cell(i), FLAG_ITEM, asMode(l->extra));
|
parse(at.nucleus()->cell(i), FLAG_ITEM, asMode(mode, l->extra));
|
||||||
cell->push_back(at);
|
cell->push_back(at);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user