From: Dekel Tsur Date: Mon, 29 Apr 2002 17:10:22 +0000 (+0000) Subject: Fix reading of old minipages. X-Git-Tag: 1.6.10~19318 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=88a039737d5d3a68fcd4b26a07c61539fe44d58f;p=features.git Fix reading of old minipages. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4089 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index f4c673a223..c48d5fe168 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-04-29 Dekel Tsur + + * buffer.C (parseSingleLyXformat2Token): Fix reading of old format + minipages: use col% instead of p%, and also use the current font. + 2002-04-28 Dekel Tsur * BufferView_pimpl.C (Dispatch): Check that float type exists when diff --git a/src/buffer.C b/src/buffer.C index db193a771a..7e779df886 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1277,7 +1277,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, mini->pageWidth(LyXLength(par->params().pextraWidth())); if (!par->params().pextraWidthp().empty()) { lyxerr << "WP:" << mini->pageWidth().asString() << endl; - mini->pageWidth(LyXLength((par->params().pextraWidthp())+"p%")); + mini->pageWidth(LyXLength((par->params().pextraWidthp())+"col%")); } Paragraph * op = mini->firstParagraph(); mini->inset.paragraph(par); @@ -1293,10 +1293,11 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, // previous paragraph. if (par->params().pextraHfill()) { parBeforeMinipage->insertChar - (parBeforeMinipage->size(), Paragraph::META_HFILL); + (parBeforeMinipage->size(), + Paragraph::META_HFILL, font); } parBeforeMinipage->insertInset - (parBeforeMinipage->size(), mini); + (parBeforeMinipage->size(), mini, font); minipar = par; } else { @@ -1358,7 +1359,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, mini->pageWidth(LyXLength(minipar->params().pextraWidth())); if (!par->params().pextraWidthp().empty()) { lyxerr << "WP:" << mini->pageWidth().asString() << endl; - mini->pageWidth(LyXLength((par->params().pextraWidthp())+"p%")); + mini->pageWidth(LyXLength((par->params().pextraWidthp())+"col%")); } Paragraph * op = mini->firstParagraph(); @@ -1376,10 +1377,11 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, // previous paragraph. if (minipar->params().pextraHfill()) { parBeforeMinipage->insertChar - (parBeforeMinipage->size(),Paragraph::META_HFILL); + (parBeforeMinipage->size(), + Paragraph::META_HFILL, font); } parBeforeMinipage->insertInset - (parBeforeMinipage->size(), mini); + (parBeforeMinipage->size(), mini, font); } } // End of pextra_minipage compability