[PUSHED] Re: [PATCH] Bug 50386 - Page count field makes scrolling impossible

Michael Stahl mstahl at redhat.com
Tue Jun 5 11:19:21 PDT 2012


On 04/06/12 20:39, Muhammad Haggag wrote:
> Hello.
> 
> = Bugs =
> https://bugs.freedesktop.org/show_bug.cgi?id=50386
> https://bugs.freedesktop.org/show_bug.cgi?id=50540
> 
> = Patch =
> https://bugs.freedesktop.org/attachment.cgi?id=62532

thanks a lot for investigating problems caused by your new feature, that
is much appreciated.

> = Change =
> This patch fixes a regression caused by my fix for fdo#34772 (adding
> word count to the status bar). The code used to count words was
> wrapped in StartAction/EndAction, which seem to be meant for input
> actions based on keyboard/mouse. EndAction calls UpdateCrsr with the
> SwCrsrShell::SCROLLWIN flag, resulting in the behavior described in
> fdo#50386 and fdo#50540.

yes, the shell Start/EndAction methods likely should only be used for
actual user actions; the intent there is to batch up changes so things
are only re-drawn once or something like that; there is also a different
start/end-action thing used by the UNO API implementation in
source/core/unocore that would leave the view cursor alone.

> We were calling it directly (Start/EndAction) and indirectly (through
> SwWrtShell::GetUpdatedDocStat). I removed the
> direct calls and replaced the SwWrtShell call with
> SwDoc::GetUpdatedDocStat, which doesn't call Start/EndAction.

for simply getting the document statistics no Start/EndAction of any
kind should be necessary because that doesn't change the document content.

hence i've pushed your patch to master and libreoffice-3-6.

> Can someone advise on whether we need the SwWait? It's there because I
> initially copied the code from wordcountdialog.cxx, but I'm not sure
> whether we actually need it (or need it to lock the dispatcher
> either).

i don't know what SwWait does... it seems it disables dispatching, and
calls VCL's Window::EnterWait/LeaveWait, and that causes the mouse
cursor to be changed into a wait-cursor (some kind of clock).

ah, it seems it causes the following odd behavior: new Writer document,
place the mouse cursor over the document area, it is a "line" cursor.
then type something. notice that few seconds later the word count in the
status bar is updated and simultaneously mouse cursor turns into an
arrow cursor.

so i've just pushed a commit to remove the SwWait line.



More information about the LibreOffice mailing list