Download it now!
Bug 65535 - Adding a comment in the middle of a word makes it recognised as misspelt by spellchecker
Summary: Adding a comment in the middle of a word makes it recognised as misspelt by s...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Keywords: bibisected, regression
: 77406 (view as bug list)
Depends on:
Blocks: Spell-Checking Writer-Comments
  Show dependency treegraph
Reported: 2013-06-08 08:10 UTC by stragu
Modified: 2020-10-15 13:27 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:

Screenshot of the issue (138.53 KB, image/png)
2013-06-08 08:10 UTC, stragu
Failed spell check in a commented word (22.49 KB, image/png)
2014-10-10 18:29 UTC, Tupe
a comment is seen as the end (or start) of a word..... (87.77 KB, image/png)
2014-10-11 11:49 UTC, Luuk
bug as seen in LO Writer 6.2 (94.70 KB, image/png)
2019-06-05 03:37 UTC, stragu
F7_after adding comment (60.79 KB, image/jpeg)
2019-06-07 20:04 UTC, Luuk

Note You need to log in before you can comment on or make changes to this bug.
Description stragu 2013-06-08 08:10:26 UTC
Created attachment 80511 [details]
Screenshot of the issue

Problem description: 

When adding a comment in a the middle of a word, the word is then recognised as misspelt by the spellchecker. Furthermore, running the Spelling and Grammar tool and correcting the broken word makes the comment disappear.

Steps to reproduce:
1. With Auto Spellcheck on, write a sentence
2. Click in the middle of a word and add a comment (ctrl + alt + C)
3. Write something in the comment field and click out
4. The word is underlined in red
5. Run the Spelling and Grammar tool (F7) and correct the supposedly misspelt word as proposed.

Current behaviour:

The comment breaks the words, makes it seen as misspelt by the spellchecker, and running the the Spelling and Grammar tool and trying to fix the supposedly misspelt word deletes the comment.

Expected behaviour:

The word where the comment is inserted should not be recognised as misspelt by the spellchecker in the first place.
Operating System: Ubuntu
Version: release
Comment 1 Luuk 2013-06-08 11:52:23 UTC
I can confirm this happens, and it happens on Windows too.
Comment 2 stragu 2013-10-30 04:42:56 UTC
This is still the case in
Comment 3 Luuk 2013-12-12 09:19:53 UTC
As simple 'workaround' might be to add the comment not in the middle of a word, but at the end (or at the start).

Is it possible to do this automatically? 
This way spelling checker should not give problems. If the comment is at the start of the word, than adding letters to the start of that word should be done AFTER the comment, and if the comment is at the end of the word, it should be done BEFORE that comment ;)
Comment 4 Luuk 2013-12-12 09:20:52 UTC
oops forgot to say it's still a problem in  (OS:Windows7)
Comment 5 Tupe 2014-10-10 18:28:19 UTC
Issue is still there in

OS: Win7

See new attachment also
Comment 6 Tupe 2014-10-10 18:29:26 UTC
Created attachment 107675 [details]
Failed spell check in a commented word
Comment 7 Luuk 2014-10-11 11:49:08 UTC
Created attachment 107713 [details]
a comment is seen as the end (or start) of a word.....
Comment 8 Urmas 2014-10-12 14:34:00 UTC
The comment is a character within the word and cannot be ignored by the spellchecker.
Also, it is desirable to have comments everywhere within the word, not only at the start/end.
Comment 9 Luuk 2014-10-12 14:44:56 UTC
"Also, it is desirable to have comments everywhere within the word, not only at the start/end."

Can you clarify that? I'm not sure what you mean by that....

I would call this a BUG if the place of a comment influences the working of the spellings checker.
Comment 10 Gordo 2015-03-12 01:49:27 UTC
When using the Spelling and Grammar tool, pressing either the Ignore Once or Ignore All on the word with the comment, will result in an extra letter being added to the word where the comment used to be.

Also, this happens with range comments within the word.  Having a range comment from the beginning of a word to the middle of a word will be marked as misspelt,  but the Spelling and Grammar tool does not delete the comment when ignored.  Having a range comment from the middle of a word to the end of the word does not show as being misspelled.

All of this is assuming that the word you typed is correct.  If the word is actually misspelled, then the only way to correct it is to run the Spelling and Grammar tool again or manually right click on it.

Spellchecker deleting comment.
Spellchecker adding extra letter because of comment.

I propose that Automatic Spell Checking and Spelling and Grammar be adjusted to take into account a comment anchor between letters.

See also #32773.

Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Comment 11 Gordo 2015-05-02 10:07:43 UTC
*** Bug 77406 has been marked as a duplicate of this bug. ***
Comment 12 Olivier R. 2015-12-06 07:20:58 UTC
This bug has already been fixed previously, so this is a regression.
Comment 13 Luuk 2015-12-06 13:39:30 UTC
The word count in a current version of a LibreOffice document is OK.
Bug 32773 talks about word count, therefore this bug (65535) is not a regression of bug 32773.
Comment 14 Aron Budea 2016-05-22 00:45:31 UTC
Works in, broken since, occurs in master, too.
Comment 15 stragu 2017-08-18 23:12:08 UTC
Reproduced in the current still version of LO:

Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: en-GB (en_GB.UTF-8); Calc: group

Comment in middle of word still makes spellcheck see the word as misspelled.
"Correcting" the word with spellcheck still makes the comment disappear.

However, I could not reproduce what Gordo described, with the tool adding a letter to the word if it was ignored.
Comment 16 Cliff Carlson 2017-12-05 04:57:14 UTC
Version 5.4.3; OS: MAC OS. 

Issue is still present
Comment 17 Muhammet Kara 2018-06-04 12:30:22 UTC

    ce3917fd9ea98ae2089cf4dca9cc742c10935e7f is the first bad commit
    commit ce3917fd9ea98ae2089cf4dca9cc742c10935e7f
    Author: Bjoern Michaelsen <>
    Date:   Mon Dec 10 01:49:34 2012 +0000
        commit b0f170d7df9cff12535d2ecfd146b32b745a8ef8
        Author:     Caolán McNamara <>
        AuthorDate: Wed Jul 18 17:00:52 2012 +0100
        Commit:     Caolán McNamara <>
        CommitDate: Wed Jul 18 17:27:09 2012 +0100
            0xFFF9 is a better choice for CH_TXTATR_INWORD than 0x0002.
            a) the default properties for the code point make it not split a word it
            appears in into two different words in any break mode we have. Which is what we
            want from a CH_TXTATR_INWORD
            b) unicode TR#20 gives for the interlinear annotation anchor: "What to do if
            detected: In a proxy context or browser context, remove U+FFF9", so when we
            need to strip it from text to run that text through e.g. the spellchecker or
            word counting then there's a solid precedent for stripping it
            In addition I *do* want the footnote placeholder to break the word it appears
            in, that gives the desired wordcount and cursor travelling behaviour
            The BREAKWORD and other *random* selection of CH_TXTATR are still odd choices,
            and there's way too many of them.
            Change-Id: I930ff8ff806af448829bc1a1ae6cb92053e9a284
    :100644 100644 9d81536e7984b62a455c0e28fd5742cf487e4184 68f099b9e694f9e81548a97f2ca9d3f0d5db65b8 M  ccache.log
    :100644 100644 795b25464739ab134d722aa7e7d34d6535537138 e8290ad8beece52dc0da61c0d2ce30d3182ed694 M  commitmsg
    :100644 100644 c248b041df516d7e0f62b85c84ac0ebb59545ff3 630d940d889565aa459edecb3919bda5e64f0588 M  dev-install.log
    :100644 100644 acfe8830a332b6879cfcec6f74f902d0fb64c562 32e06662778eeba496c378cc426ad2f20e708d32 M  make.log
    :040000 040000 8b82c14ad77224021d3034b6517a3a67f938064f 36b63cc40dd49eb461a38f39f246f13776b0e07d M  opt
Comment 18 QA Administrators 2019-06-05 02:54:33 UTC Comment hidden (obsolete)
Comment 19 stragu 2019-06-05 03:37:05 UTC
Created attachment 151919 [details]
bug as seen in LO Writer 6.2

Confirmed in both 6.2 and 6.3 branches:

- Commenting inside a word / on a range inside a word makes the word being detected as misspelled (you might have to keep writing a bit more text for spellcheck to notice it)
- The spellcheck window shows the word with a "IAA" rectangle where the comment is located
- Correcting the word as suggested removes the comment

I can't reproduce Gordo's issue though (with a letter being added inside the word when ignoring).

Details about versions:

Build ID: 1:6.2.4-0ubuntu0.18.04.1~lo1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-GB
Calc: threaded

Build ID: 547edd20e527fb02900f6174973770d26306e2e7
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 20 Luuk 2019-06-07 20:03:28 UTC
Step 4 on original bug-report does not happen anymore, but spelling still mis-behaves, see 'F7_after addingComment.jpg'
Comment 21 Luuk 2019-06-07 20:04:18 UTC
Created attachment 152037 [details]
F7_after adding comment
Comment 22 Luuk 2019-06-07 20:05:37 UTC
(In reply to Luuk from comment #21)
> Created attachment 152037 [details]
> F7_after adding comment

LibreOffice (Windows 10)
Comment 23 stragu 2019-06-08 12:17:34 UTC
Hi Luuk

I also noticed that it might not straight away underline the word in red, but I believe that if you keep editing your document, it will eventually register it and mark it as misspelled with the red wiggly line (also using 6.2).

Would you mind confirming that?
Comment 24 Luuk 2019-06-08 13:04:43 UTC
Indeed, when starting to type some red wiggly line is shown.
Comment 25 Luuk 2019-06-08 13:07:20 UTC
And, when choosing 'Correct' the comment is lost.
Comment 26 stragu 2019-07-11 12:55:45 UTC
This is still present in:

Build ID: 41ac97386aba908b6db860cfb4cfe2da871886ae
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 27 stragu 2019-10-22 13:48:36 UTC
Reproduced as described in comment 19, using:

Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 28 Aron Budea 2020-07-23 15:22:21 UTC
This might be a complete red herring, but recently a bug was found with how search was handling special characters (eg. soft-hyphens, comment or footnote markers), and was fixed with the following commit:

The commit is only relevant for search/replace(!), but perhaps the logic is similar in both cases, and if someone gets around to looking at this bug, they might find something useful in that reference.
Comment 29 stragu 2020-10-15 13:27:51 UTC
Still reproducible with:

Build ID: 00(Build:2)
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 1:7.0.2_rc2-0ubuntu0.18.04.2
Calc: threaded