Created attachment 41561 [details] Screenshot of the problem. Positioning a comment within a word causes the spell check to test only the stuff before the caret, meaning words are incorrectly flagged as misspelled. For example, the "sen" part of "sen^tence" -^ denotes the position of the caret/comment- will be flagged, but "tence" will not. In the case of "sent^ence", nothing will be flagged (as "sent" is a valid word). The attached screenshot shows this example in action.
[Reproducible] with "LibreOffice 3.3.0 RC2 - WIN XP German UI [OOO330m18 (build 3.3.0.2)]". Th comment splits the word where it is inserted ito 2 parts, please check word count before and after insertion. I see the same effect in OOo 3.1.1. The corresponding OOo issue is <http://qa.openoffice.org/issues/show_bug.cgi?id=78149>, fixed for 3.4- Cédric, what can be done? Cherry picking?
*** Bug 50780 has been marked as a duplicate of this bug. ***
Changing title to better reflect the situation. Also seems to be unassigned, so setting to NEW again.
I cannot reproduce the issue with spell-check. It works fine for me in that regard. Word count is still broken. When a comment is added, SwTxtNode::InsertHint inserts a dummy character to mark the hint. The character is CH_TXTATR_INWORD (0x2), which breaks word count. It should not be treated as a word breaker by the word counter/breaker. I'm working on a fix.
This is fixed by Caolán McNamara's change: http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0f170d7df9cff12535d2ecfd146b32b745a8ef8