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

List:       koffice-devel
Subject:    Re: can't scroll to bottom of KWord document
From:       Raphael Langerhorst <raphael-langerhorst () gmx ! at>
Date:       2005-05-04 12:27:34
Message-ID: 200505041427.35865.raphael-langerhorst () gmx ! at
[Download RAW message or body]

On Tuesday 03 May 2005 22:58, you wrote:
> On Tuesday 03 May 2005 22:43, you wrote:
> > Hi David,
> >
> > from time to time I encounter problems scrolling to the very
> > bottom of a document.
> >
> > This "sometimes" happens either just after saving, printing or
> > anything that changes (temporarily) the rendering/... and it also
> > goes away again...
> >
> > But so far I can't reliably reproduce it. Attached is a document
> > (KWord 1.4 format, about a half week old, but also happens in
> > 1.3) where I encountered it just after printing to PDF.
> >
> > The problem is that scrolling only works up to maybe 2/3 of the
> > complete document. It might also be possible that the table of
> > contents has sth to do with it (a wild guess, not based on
> > evidence).
>
> Do you call scrolling: the PageUp/PageDown keys, or using the mouse
> to drag the scrollbar rectangle?

Using the mouse to drag the scrollbar rectangle, but by moving with 
the cursors the "view" also doesn't go down (it's connected to the 
QScrollView somehow, right?)

> When you can't go below 2/3 of the document, is the scrollbar at
> the bottom?

Yes.

>
> If that's the case, it's easy to debug: uncomment the debug line
> before kwcanvas.cc:        resizeContents( size.width(),
> size.height() ); to see when it's called, and with which value.
> (It's called indirectly by
> KWDocument::newZoomAndResolution(true...))
>
> Since saving and printing temporarily change the zoom level (in the
> case of saving, it's because of the thumbnail generation), the
> report sort of makes sense: after going back to the original zoom
> level, the qscrollview's contents area isn't resized properly. But
> I can't reproduce it with your document.
>
> Ah, I see an interesting comment in generatePreview(). The bug
> could happen when the thumbnail-generation thinks it has to create
> a new page....
>
> Idea for a fix: in kwdoc.cc line 3446, where it says
> newZoomAndResolution( false, false ); replace the first false with
> a true.

I have changed the line as suggested and recompiled/installed. It 
didn't happen again so far - but I wasn't able to reliably reproduce 
it earlier as well, so it would be necessary to do a longer 
observation.

By the way (from looking at the code (but not for long!!!!)) I assume 
the change is ok anyway, it feels more correct.

I also did some normal work (half an hour at least) with the change 
in, produced PDFs (=printing), etc. and it worked ok. So I *guess* 
the change doesn't introduce a bug. I would suggest to make that 
change, regardless whether it fixes this particular bug or not. I 
will notice in the long run whether it's better now or not (long run 
= around a week I think).  (you can make the change, I have not yet 
checked out the svn repository).

Regards,
Raphael

PS: cc'd the mailing list, in case others have valuable infos.
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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