From koffice Thu Aug 31 14:54:49 2000 From: Thomas Zander Date: Thu, 31 Aug 2000 14:54:49 +0000 To: koffice Subject: pagesize problems X-MARC-Message: https://marc.info/?l=koffice&m=96773368030994 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 FrameList; QList 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