Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.