]> git.lyx.org Git - lyx.git/commitdiff
better the minipage compability a bit
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 15 Mar 2001 19:03:46 +0000 (19:03 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 15 Mar 2001 19:03:46 +0000 (19:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1779 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insetminipage.h

index dc0b31d8de1f83238e001cca01d1364fa7d2f1e6..4148a2d4df1779678a9dd7eb7e20d31eae03c590 100644 (file)
@@ -1,5 +1,8 @@
 2001-03-15  Lars Gullik Bjønnes  <larsbj@trylle.birdstep.com>
 
+       * buffer.C: add compability for minipage alignment.
+       (latexParagraphs): remove unwanted pextra check.
+
        * several files: remove CXX_WORKING_NAMESPACES
 
        * buffer.C (pop_tag): tie is in namespace boost
index 4e85329a02b65239bc7b1d28756ca77e76590a4f..ddd610b9c4a17a7cf1121d6b8bb8eb83f2fecf9e 100644 (file)
@@ -510,6 +510,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                                        // we do want to use some of these
                                        // parameters to set options in the
                                        // minipage inset.
+                                       InsetMinipage::Position imp = static_cast<InsetMinipage::Position>(minipar->params.pextraAlignment());
                                        LyXParagraph * tmp = minipar;
                                        while (tmp) {
                                                tmp->params.pextraType(0);
@@ -522,6 +523,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                                        }
                                        
                                        InsetMinipage * mini = new InsetMinipage;
+                                       mini->pos(imp);
                                        mini->inset->par = minipar;
                                        // Insert the minipage last in the
                                        // previous paragraph.
@@ -564,6 +566,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                                // This is not quite correct yet since we
                                // do want to use some of these parameters
                                // to set options in the minipage inset.
+                               InsetMinipage::Position imp = static_cast<InsetMinipage::Position>(minipar->params.pextraAlignment());
                                LyXParagraph * tmp = minipar;
                                while (tmp) {
                                        tmp->params.pextraType(0);
@@ -576,6 +579,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                                }
                                
                                InsetMinipage * mini = new InsetMinipage;
+                               mini->pos(imp);
                                mini->inset->par = minipar;
                                par->previous()->InsertInset(par->previous()->size(), mini);
                                minipar = 0;
@@ -2309,7 +2313,10 @@ void Buffer::latexParagraphs(ostream & ofs, LyXParagraph * par,
                // flag this with ftcount
                ftcount = -1;
                if (layout.isEnvironment()
-                    || par->params.pextraType() != LyXParagraph::PEXTRA_NONE) {
+#ifndef NEW_INSETS
+                    || par->params.pextraType() != LyXParagraph::PEXTRA_NONE
+#endif
+                       ) {
                        par = par->TeXEnvironment(this, params, ofs, texrow
 #ifndef NEW_INSETS
                                                  ,ftnote, ft_texrow, ftcount
index 832a11519193f8c0472cf371c53686085d3c95e3..513fa422feae37d040cc13003ffe367bc1bca8a9 100644 (file)
@@ -1,5 +1,8 @@
 2001-03-15  Lars Gullik Bjønnes  <larsbj@trylle.birdstep.com>
 
+       * insetminipage.h: change the order or Position to match
+       LyXParagraph::MINIPAGE_ALIGNMENT
+
        * several files: remvoe CXX_WORKING_NAMESPACES
 
        * ExternalTemplate.h: noncopyable is in namespace boost
index fa455acb33edd4110438ec436a21a8193cff6dcf..c8a270dd4592b4b5fc22b2f50e350a762c2cae04 100644 (file)
@@ -26,8 +26,8 @@ class InsetMinipage : public InsetCollapsable {
 public:
        ///
        enum Position {
-               center,
                top,
+               center,
                bottom
        };
        ///