Bug 63273 - [EDITING] Inserting field "Page Count" leads into endless "Selection Change Event"
Summary: [EDITING] Inserting field "Page Count" leads into endless "Selection Change E...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.2.0 target:4.1.1 target:4.0.6
Keywords: regression
: 67223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-08 16:20 UTC by mathias.supp
Modified: 2014-04-25 16:20 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo-document with contained macro. (44.70 KB, application/vnd.oasis.opendocument.text)
2013-04-08 16:20 UTC, mathias.supp
Details
gdb trace (9.36 KB, text/plain)
2013-06-04 16:37 UTC, Noel Power
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mathias.supp 2013-04-08 16:20:23 UTC
Created attachment 77609 [details]
Demo-document with contained macro.

After inserting a "Page Count"-Field into a writer document, LibO sends continously selection-change-events via API.

The attached document demonstrates the problem by registering a selection-change-listener in a basic-macro logging the data into a new text-document.
Comment 1 Jorendc 2013-05-31 21:49:32 UTC
I can confirm the behavior... although I do lack macro skills and don't know anything about the underlying code and what it triggers :-). I'm sorry about that.

So, I'll mark this one as NEW because I can confirm it using Linux Mint 15 x64 with LibreOffice 4.0.3.3.

@Noel: you mind having a look at this one?

Kind regards,
Joren
Comment 2 Noel Power 2013-06-04 16:34:41 UTC
(In reply to comment #1)
> I can confirm the behavior... although I do lack macro skills and don't know
> anything about the underlying code and what it triggers :-). I'm sorry about
> that.
> 
> So, I'll mark this one as NEW because I can confirm it using Linux Mint 15
> x64 with LibreOffice 4.0.3.3.
> 
> @Noel: you mind having a look at this one?
> 
> Kind regards,
> Joren

I don't think that this is a basic specific issue, the selection change event seems to happen as expected. A perhaps a useful trace is attached (see below), I'm just not familiar with writer core ( I looked for a while but ended up just being confused :-) )
Comment 3 Noel Power 2013-06-04 16:37:25 UTC
Created attachment 80297 [details]
gdb trace
Comment 4 Noel Power 2013-06-04 16:40:56 UTC
Miklos, could you have a look  at this ?
Comment 5 Thorsten Behrens (allotropia) 2013-06-05 19:51:04 UTC
Hmmm - reading bug 63398 I wonder if that is a 4.0 regression? If yes, looking at this [oneway] change looks promising ...
Comment 6 Miklos Vajna 2013-07-16 08:22:10 UTC
No, this is a 3.5 -> 3.6 regression.
Comment 7 Miklos Vajna 2013-07-16 11:46:27 UTC
Regression from ce14342c4292628a641a72d4f63d9c048e030c6a, to be exact.
Comment 8 Miklos Vajna 2013-07-16 12:00:24 UTC
Commenting out http://opengrok.libreoffice.org/xref/core/sw/source/ui/uiview/view2.cxx#1271 (the GetUpdatedDocStat() call) makes the problem go away. I'll try to pass a flag down the call chain not to fire event listeners when counting words.
Comment 9 Commit Notification 2013-07-16 16:52:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e2484e3998f2c5036fb8e3584d4b1c72db19bfd3

fdo#63273 sw: let word count not update stat. fields



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Miklos Vajna 2013-07-16 18:48:46 UTC
-4-1 review: https://gerrit.libreoffice.org/4943
Comment 11 Commit Notification 2013-07-16 22:17:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=699b7626222ea8be1c9713a7f5e274dbfbc029ff&h=libreoffice-4-1

fdo#63273 sw: let word count not update stat. fields


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Michael Stahl (allotropia) 2013-08-29 11:51:08 UTC
*** Bug 67223 has been marked as a duplicate of this bug. ***
Comment 13 mathias.supp 2013-08-29 11:58:16 UTC

Danke für Ihre E-Mail. Ich bin bis einschließlich 06.09.2013 außer Haus.
In dringenden Fällen wenden Sie sich bitte an Dirk Segelhorst (dirk.segelhorst@vector.com).
Bitte beachten Sie: Ihre E-Mail wird nicht weitergeleitet.

Thank you for your e-mail. I am out of the office through 2013-09-06.
In urgend cases please contact Dirk Segelhorst (dirk.segelhorst@vector.com).
Please note: Your e-mail will not be forwarded.
Comment 14 Commit Notification 2013-08-29 12:11:36 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=563d441f9401d8868fae0dc379e9b712019325e7&h=libreoffice-4-0

fdo#63273 sw: let word count not update stat. fields


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.