Hi all,

I'm trying to enhance the patch for fdo#40465 as the patch results in behaviour 
that in some cases is a regression.
When zooming I want to know if the cursor is visible.
The function SwCrsrShell::CrsrIsVisible() some times returns sal_False when the 
cursor absolutely is visible in the view.

I collected some traces of the cursor position and of the visible area 
(SwCrsrShell::aVisArea) and to my amazement the area differs between two 
(visually) identical views.

I opened a writer document with 22 pages, scrolled to page 16, with cursor at 
page 16.
SwCrsrShell::CrsrIsVisible() returns sal_True, zoom % is 60, 
SwCrsrShell::aVisArea.Top(), Bottom() give 170460 and 188635.
I then move the cursor one line down and back (no scrolling), zoom to 55% and 
back to 60%.
The visible area looks identical, the cursor is back in the same location.
Now SwCrsrShell::CrsrIsVisible() returns sal_True, zoom % is 60, 
SwCrsrShell::aVisArea.Top(), Bottom() give 115860 and 134035. The cursor 
rectangle position has not changed and now is not in SwCrsrShell::aVisArea 
(cursor top/bottom is 121272/122191).

What is the explanation for this behaviour?
If this is 'normal', how can I (jn the code) find out if the cursor is visible?

If required, I can upload the document as well as the code for the trace into 
bug fdo#40465.



Winfried

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to