Bug Hunting Session
Bug 44602 - Modeless Word Count window hides when user clicks into a note
Summary: Modeless Word Count window hides when user clicks into a note
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.0 Beta2
Hardware: Other All
: medium normal
Assignee: Muhammad Haggag
Whiteboard: target:3.7.0
Depends on:
Blocks: Word-Count
  Show dependency treegraph
Reported: 2012-01-09 08:08 UTC by Stefan Knorr (astron)
Modified: 2016-10-24 21:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Use this document to easily reproduce. (12.58 KB, application/vnd.oasis.opendocument.text)
2012-01-09 08:23 UTC, Stefan Knorr (astron)
Patch. (1.19 KB, patch)
2012-06-25 01:05 UTC, Muhammad Haggag

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Knorr (astron) 2012-01-09 08:08:50 UTC

Comment 1 Stefan Knorr (astron) 2012-01-09 08:23:14 UTC
Created attachment 55340 [details]
Use this document to easily reproduce.

The modeless Word Count window is a (major) new feature for LibO 3.5, however, it makes some trouble when using notes/comments.

To reproduce, simply download the document and follow the steps or:

1. write something
2. add a comment (Ctrl-Alt-C), write something into it
3. click back into the document
4. click Tools > Word Count
5. click into the comment

Result: word count window vanishes; clicking into the document again makes it reappear.
Expected: word count window should not hide.

Additionally, see that Word Count seems to count every comment as a one-character word. (Should I open a new bug for this?)

(Christoph Noack reported this first in UX-advise; sorry about the empty first comment.)
Comment 2 Michael Meeks 2012-01-10 02:17:58 UTC
Confirmed for me on Linux. Reading the wordcount patch I suspect it may be some re-use of the:

 void ViewShell::SetCareWin( Window* pNew )

use / concept - at least Notes uses that too; as does the red-line merge/accept changes dialog, as does the insert footnote dialog etc. Quite why Notes would want to do that, I don't know. Sadly the commenting:

sw/inc/viewsh.hxx:    static Window*          pCareWindow;    // Avoid this window.

is not so lucid; needs a bit of code reading to try to work out what is going on. I suppose the idea is to have only one window that you need to 'care' about up at once ;-)
Comment 3 Petr Mladek 2012-01-12 07:19:45 UTC
Adding some developers that might be interested into this bug. Both Kendy and Cedric worked on the notes handling.
Comment 4 Stefan Knorr (astron) 2012-06-06 04:24:19 UTC
Reported the second bug from comment 1 as bug 50780 – Word Count counts comments
Comment 5 Muhammad Haggag 2012-06-09 19:09:49 UTC
Comment 6 Muhammad Haggag 2012-06-25 01:05:48 UTC
Created attachment 63423 [details]
Comment 7 Not Assigned 2012-06-26 09:11:11 UTC
Muhammad Haggag committed a patch related to this issue.
It has been pushed to "master":


fdo#44602 Modeless word count window hides when user clicks into a note
Comment 8 Stefan Knorr (astron) 2012-06-27 22:29:29 UTC
Thank you very much for this and your other fixes around word count, Muhammad!

(Closing as fixed.)