Fixed bug in reading old minipages in a depth > 0.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1806 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-03-22 16:07:59 +00:00
parent c2c571645b
commit 28da50b522
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,8 @@
2001-03-22 Juergen Vigna <jug@sad.it>
* buffer.C (parseSingleLyXformat2Token): redone the minipage
compatibility read a bit.
compatibility read a bit and fixed bug with minipage in different
depth.
2001-03-21 José Abílio Matos <jamatos@fep.up.pt>

View File

@ -1148,6 +1148,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
p->previous(parBeforeMinipage);
parBeforeMinipage->next(p);
p->next(0);
p->params.depth(parBeforeMinipage->params.depth());
parBeforeMinipage = p;
}
InsetMinipage * mini = new InsetMinipage;
@ -1190,6 +1191,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
tmp->params.pextraStartMinipage(false);
tmp = tmp->next();
}
depth = parBeforeMinipage->params.depth();
minipar = parBeforeMinipage = 0;
} else if (!minipar &&
(par->params.pextraType() == LyXParagraph::PEXTRA_MINIPAGE))
@ -1205,6 +1207,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
p->layout = 0;
p->previous(par->previous());
p->next(0);
p->params.depth(depth);
par->params.depth(0);
depth = 0;
if (par->previous())
par->previous()->next(p);
par->previous(0);