Bug 168144 - Spell check dialog is not correcting spelling and grammar errors sequentially. (All spelling handled on paragraph before rechecking for grammar)
Summary: Spell check dialog is not correcting spelling and grammar errors sequentially...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Spell-Checking-Dialog
  Show dependency treegraph
 
Reported: 2025-08-27 18:16 UTC by sebick
Modified: 2025-10-05 10:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test.odt (15.02 KB, application/vnd.oasis.opendocument.text)
2025-08-27 18:17 UTC, sebick
Details
Spelling dialog: "DocumentLoader" found first (52.54 KB, image/png)
2025-09-09 09:10 UTC, Jussi Suominen
Details
Extensive grammar (33.64 KB, application/vnd.oasis.opendocument.text)
2025-10-05 10:32 UTC, sebick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sebick 2025-08-27 18:16:37 UTC
Description:
If spell check is run at the start of the attached test document, the missing space is not found in "took beautiful,his slim".

For bigger documents spell check can be run multiple times and eventually those missing spaces are found, but the inconsistency makes it hard to deal with.

Steps to Reproduce:
1.open the attached test.odt in a clean LibreOffice Writer
2.run spell check (Tools>Spelling)
3.

Actual Results:
"DocumentLoader" is found as first result

Expected Results:
"beautiful,his" should be found as first result


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.8.0.4 (X86_64)
Build ID: 48f00303701489684e67c38c28aff00cd5929e67
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 1 sebick 2025-08-27 18:17:13 UTC
Created attachment 202550 [details]
test.odt
Comment 2 m_a_riosv 2025-08-27 21:46:32 UTC Comment hidden (no-value)
Comment 3 sebick 2025-08-27 22:38:50 UTC
It's the first sentence in the sample:
"This is a simple test took beautiful,his slim "

(sry if I created confusion by using a standard test file and adjusting it ;))
Comment 4 BogdanB 2025-08-28 06:42:56 UTC
Confirm.
After I select all the text and set to English it is working, but not when opening the file

Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ro-RO (en_US); UI: en-US
Calc: threaded
Comment 5 BogdanB 2025-08-28 06:53:22 UTC Comment hidden (off-topic)
Comment 6 BogdanB 2025-08-28 07:00:02 UTC Comment hidden (off-topic)
Comment 7 Telesto 2025-08-28 18:20:40 UTC Comment hidden (off-topic)
Comment 8 Jussi Suominen 2025-09-06 17:31:42 UTC Comment hidden (obsolete)
Comment 9 Jussi Suominen 2025-09-07 08:22:22 UTC Comment hidden (obsolete)
Comment 10 Saburo 2025-09-07 13:39:10 UTC
(In reply to Jussi Suominen from comment #8)
> So I guess this bug is not bibisectable but it would be nice if someone who
> knows more about bibisecting could provide some information about this.

I think you can bibisect by adding an English dictionary to your extensions.
https://extensions.libreoffice.org/en/extensions/show/english-dictionaries

However, even with version 5.4, the blue line appears after 2-3 seconds.
I couldn't reproduce it well.
Comment 11 BogdanB 2025-09-07 13:41:16 UTC Comment hidden (off-topic)
Comment 12 Jussi Suominen 2025-09-09 09:10:54 UTC
Created attachment 202763 [details]
Spelling dialog: "DocumentLoader" found first

When I open the Spelling dialog (Tools | Spelling...) the "DocumentLoader" is found first instead of "beautiful,his" ("DocumentLoader" is bold and highlighted with red color). Does this mean that I have reproduced the bug? Or is the bug reproduced when there is now blue line below "beautiful,his"? I'm asking this because I'm not completely sure how I should reproduce this bug.

I added an attachment that shows the Spelling dialog.
Comment 13 Jussi Suominen 2025-09-09 09:14:04 UTC Comment hidden (off-topic)
Comment 14 sebick 2025-09-09 10:25:23 UTC
Bug is reproduced when "beautiful,his" is underlined in blue (after waiting 2 seconds), "DocumentLoader" is underlined in red & Tools > Spellcheck dialog shows "DocumentLoader" as first result (instead of "beauftiful,his".

For it was reproducible as described in the first post, but BodganB confirmed it like this:
https://bugs.documentfoundation.org/show_bug.cgi?id=168144#c6
Comment 15 Saburo 2025-09-10 07:19:58 UTC Comment hidden (off-topic)
Comment 16 Justin L 2025-10-02 13:08:21 UTC Comment hidden (obsolete)
Comment 17 sebick 2025-10-02 15:44:41 UTC
Not really a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=122184 . 122184 is about the selection highlight, there is no selection highlight in Windows at all, that's an additional issue.

Here in #168144 it would be awesome if the function of spell check would work, meaning that all errors have been corrected before the message is shown that spell check is completed (I've arranged myself that I don't see any marker in the document in Windows at which position the error is found, I only see it in the spell check dialog box, but this spell check dialog box should reliably find errors).
Comment 18 Justin L 2025-10-04 18:10:52 UTC
You might want to try the extension "Writing Tool" from https://writingtool.org (previously called LanguageTool - the most recommended extension for providing grammar checking in Libreoffice). I just tried it in 25.8 and it does what you request - it handled the spelling/grammar errors sequentially.

Natively, LO doesn't provide a grammar checking. (Although for Windows the official LO installer does by default install Marco's English dictionary extension, which includes Lightproof). UUIC Lightproof is no longer maintained.
Comment 19 Justin L 2025-10-04 18:24:15 UTC
I feel that this bug report has wandered all over the place.

If I understand correctly, the report is NOT that grammar checking doesn't work - it is just that all of the paragraph's spelling errors are handled first, and then the paragraph is checked a second time for grammar.

So than it has nothing to do with the "blue line" per se - and thus the bisect etc are all off topic. [comment 5, comment 6, comment 7, comment 11, comment 15]


Not reported as the first error is a WONTFIX IMHO. Spelling and grammar are two completely independent tests. To report all errors sequentially would require a complete e-write of the spell dialog logic. As currently implemented, paragraph 1 is first checked for spelling errors, and then after all the spelling errors in paragraph 1 are handled, then paragraph 1 is checked again for grammar issues. (already true in OOo 3.3)
Comment 20 BogdanB 2025-10-04 18:35:17 UTC Comment hidden (off-topic)
Comment 21 Justin L 2025-10-04 18:36:19 UTC
(In reply to sebick from comment #0)
> For bigger documents spell check can be run multiple times and eventually
> those missing spaces are found, but the inconsistency makes it hard to deal
> with.

(In reply to sebick from comment #17)
> It would be awesome if the function of spell check would work,
> meaning that all errors have been corrected before the message is
> shown that spell check is completed
There has been no evidence provided in this bug report that this is not the case, The provided 'test.odt' does both spelling and grammar corrections before saying that everything is complete.

[Granted, 26.2 has just fixed some "Correct All" bugs that did result in exactly what you are describing. See bug 91151.]
Comment 22 sebick 2025-10-05 10:32:37 UTC
Created attachment 203146 [details]
Extensive grammar
Comment 23 sebick 2025-10-05 10:42:41 UTC
Thanks, https://bugs.documentfoundation.org/show_bug.cgi?id=91151b improved the situation, but this didn't fix it completely:

Libreoffice Portable (updated with 26.2):
- open https://bugs.documentfoundation.org/attachment.cgi?id=203146
- run tools>spelling
- finds "slimtook" for 2 times (hit correct for both)
--> "The spellcheck is complete"
- run tools>spelling
- confirm to continue at at the top of the document
- finds "slimtook" for 4 times (hit correct for all)
--> "The spellcheck is complete"
- run tools>spelling
- confirm to continue at at the top of the document
- "beautiful,his" the first is found HURRAY (first time LibreOffice is mentioning grammar errors, after the "The spellcheck is complete" dialogue was already displayed 2 times


Is this really intended how one should spell check documents (run spell check min. 3 times to be guaranteed that all errors including grammar have been corrected)?