]> git.lyx.org Git - features.git/commitdiff
Fix reading of old minipages.
authorDekel Tsur <dekelts@tau.ac.il>
Mon, 29 Apr 2002 17:10:22 +0000 (17:10 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Mon, 29 Apr 2002 17:10:22 +0000 (17:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4089 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C

index f4c673a223fc4755d92e481b6b8436a432dc2514..c48d5fe16845e7d8b4a546d3977df8cfd638a8ec 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-29  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * 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  <dekelts@tau.ac.il>
 
        * BufferView_pimpl.C (Dispatch): Check that float type exists when 
index db193a771a74855b102f87702747570ba49c1ac0..7e779df886ba54c155ccb7c18054e76368a67775 100644 (file)
@@ -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