[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [patch] add page on loading
From:       Thomas Zander <zander () planescape ! com>
Date:       2001-12-12 0:02:04
[Download RAW message or body]

Bug:
Opening a multipage-DTP document (from the page-layout tab) did not create the
right amount of pages. It always opens at 1 page.

This close to the release of KOffice 1.1.1, could someone please post-commit check 
this patch as I have to go to sleep now...

Thanx.

Index: kwdoc.cc
===================================================================
RCS file: /home/kde/koffice/kword/kwdoc.cc,v
retrieving revision 1.263.2.4
diff -u -3 -p -d -r1.263.2.4 kwdoc.cc
--- kwdoc.cc    2001/12/05 23:41:53     1.263.2.4
+++ kwdoc.cc    2001/12/12 00:01:16
@@ -634,7 +634,19 @@ void KWDocument::recalcFrames()
                 }
             }
         }
-
+    } else {
+        double height=0;
+        for (QListIterator<KWFrameSet> fit = framesetsIterator(); fit.current() ; ++fit ) {
+            if(fit.current()->frameSetInfo()==KWFrameSet::FI_BODY) {
+                KWFrameSet * fs = fit.current();
+                for (QListIterator<KWFrame> f = fs->frameIterator(); f.current() ; ++f ) {
+                    height=QMAX(height, f.current()->bottom());
+                }
+            }
+        }
+        while(height > ptPaperHeight() * getPages()) {
+            m_pages++;
+        }
     }

     if ( isHeaderVisible() ) {

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new

[Attachment #3 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic