From koffice-devel Thu Oct 16 19:02:24 2003 From: Michael Fair Date: Thu, 16 Oct 2003 19:02:24 +0000 To: koffice-devel Subject: Re: Simple KWord patch for frames extending beyond the page X-MARC-Message: https://marc.info/?l=koffice-devel&m=106633290323609 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_Atuj//1nmYnqiKj" --Boundary-00=_Atuj//1nmYnqiKj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 16 October 2003 10:08 am, Michael Fair wrote: > > What about simply this then? > > QRect KWViewModePreview::normalToView( const QRect& nRect ) { > > return QRect( normalToView( nRect.topLeft() ), nRect.size() ); > > } > > > > The contents will still be clipped, of course, but the resize handles > > should actually appear out of the page - please check that the user can > > actually resize the frame when this happens, we might have code that > > prevents that :} > > The problem there is that "size" is in normal coordinate units. Ok I was wrong about this. Scaling happens elsewhere. nRect.size() works out great! Attached is the revised patch. -- Michael -- --Boundary-00=_Atuj//1nmYnqiKj Content-Type: text/x-diff; charset="iso-8859-1"; name="kwviewmode.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kwviewmode.h.diff" Index: kwviewmode.h =================================================================== RCS file: /home/kde/koffice/kword/kwviewmode.h,v retrieving revision 1.24 diff -u -3 -p -r1.24 kwviewmode.h --- kwviewmode.h 14 Jul 2002 09:42:56 -0000 1.24 +++ kwviewmode.h 16 Oct 2003 18:55:28 -0000 @@ -55,7 +55,7 @@ public: /** Normal coord -> view coord */ QRect normalToView( const QRect & nRect ) - { return QRect( normalToView( nRect.topLeft() ), normalToView( nRect.bottomRight() ) ); } + { return QRect( normalToView( nRect.topLeft() ), nRect.size() ); } /** View coord -> normal coord */ virtual QPoint viewToNormal( const QPoint & vPoint ) = 0; @@ -112,7 +112,7 @@ public: /** Return the name of the viewmode, used for loading/saving. */ virtual const QString type() = 0; - /** Answers the question if argument frameset has to be drawn as a text-mode + /** Answers the question if argument frameset has to be drawn as a text-mode * text area if true, or if false as a frame with its own contents. */ virtual bool isTextModeFrameset(KWFrameSet *) const { return false; } --Boundary-00=_Atuj//1nmYnqiKj Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel --Boundary-00=_Atuj//1nmYnqiKj--