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

List:       koffice-devel
Subject:    Re: Simple KWord patch for frames extending beyond the page
From:       Michael Fair <michael () daclubhouse ! net>
Date:       2003-10-16 19:02:24
[Download RAW message or body]

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 --

["kwviewmode.h.diff" (text/x-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; }
 


_______________________________________________
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