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

List:       koffice
Subject:    pagesize problems
From:       Thomas Zander <zander () xs4all ! nl>
Date:       2000-08-31 14:54:49
[Download RAW message or body]

Hi, 

when I changed the normal page (A4) to a letter size I got a lot of errors
and duplicate footer frames.
It turns out that the frameset->update method checks if a frames fits in a 
page. And the footer frames would fit in more than one page, making the
method duplicating frames.

The attached patch fixes this.

zander@namlook:~/sources/kde/koffice/kword > cvs diff kword_frame.cc
Index: kword_frame.cc
===================================================================
RCS file: /home/kde/koffice/kword/kword_frame.cc,v
retrieving revision 1.47
diff -u -3 -p -r1.47 kword_frame.cc
--- kword_frame.cc      2000/08/27 13:21:29     1.47
+++ kword_frame.cc      2000/08/31 14:47:57
@@ -733,6 +733,7 @@ void KWTextFrameSet::update()
     typedef QList<KWFrame> FrameList;
     QList<FrameList> frameList;
     frameList.setAutoDelete( true );
+    frames.setAutoDelete( false );
 
     // sort frames of this frameset into l2 on (page, y coord, x coord)
     QRect pageRect;
@@ -744,6 +745,7 @@ void KWTextFrameSet::update()
             if ( frames.at( j )->intersects( pageRect ) ) {
                 frames.at( j )->setPageNum( i );
                 l->append( frames.at( j ) );
+                frames.remove(j--);
             }
         }
 
@@ -790,7 +792,6 @@ void KWTextFrameSet::update()
             delete l;
     }
 
-    frames.setAutoDelete( false );
     frames.clear();
 
     int rm = 0;


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

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

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