Bug 152738 - LO75RC1: Automatic spell-check not underlining misspelled words; dialog doesn't use paragraph's language
Summary: LO75RC1: Automatic spell-check not underlining misspelled words; dialog doesn...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
7.5.0.0 beta1+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.1
Keywords: bibisected, bisected, regression
: 153498 153836 (view as bug list)
Depends on:
Blocks: Spell-Checking-Dialog
  Show dependency treegraph
 
Reported: 2022-12-30 16:51 UTC by Martin Srebotnjak
Modified: 2023-03-16 09:32 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
test document (40.43 KB, application/vnd.oasis.opendocument.text)
2023-01-31 21:23 UTC, Stéphane Guillou (stragu)
Details
screenshot of issue in LO 7.5.0.2 (97.16 KB, image/png)
2023-01-31 22:41 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Srebotnjak 2022-12-30 16:51:18 UTC
Description:
On macOS LO75RC1 spell-checking a document doesn't show errors/red underlines under misspelled words. Opening the same document with LO74 shows the underlines.

The strange thing is that when opening the Tools > Spelling window, the window shows the first sentence as with no language set, although the whole language has Slovenian (sl) set as text language and the status bar shows Slovenian as the language of the current selection - this could be some error on the part of detecting the right language?

I noticed that already in the development versions of 75 like aplha1 and notified via e-mail the developer of the spell-checking, but got no reply.

Steps to Reproduce:
1. Open a document to test spelling.
2. 
3.

Actual Results:
Text is not underlined where words are misspelled.

Expected Results:
Should be underlined ...


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Mac OS X 11.7; UI render: default; VCL: osx
Locale: sl-SI (sl_SI.UTF-8); UI: sl-SI
Calc: threaded
Comment 1 Telesto 2022-12-31 07:10:26 UTC
No issue in regular mode and safe mode with Dutch language
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8635c9aa8c6f1078a9e220076d5a08daf30077e8
CPU threads: 8; OS: Mac OS X 12.3.1; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded

You did try a profile reset? 


Sidenote: The spell checker s using macos spell checker + dictionary's in my case (Menu LibreOffice -> Preferences -> Language settings ->  Writing aids. If I uncheck macos spell nothing will be checked

Reason: There are no bundled dictionary's for hunspell (see Tools -> Extension Manager) by default.

Does it work if you install the Slovenian (sl) dictionary for hunspell
Comment 2 Telesto 2022-12-31 07:13:02 UTC
I'm noticing bug 152742 right now.. so might be actually something
Comment 3 Martin Srebotnjak 2022-12-31 12:45:57 UTC
I am using the bundled dictionaries (macOS does not supply Slovenian dictionaries).

Also, my statement that spelling does not work at all is not fully correct - some parts of text might even get checked for spelling, sometimes a table or a paragraph. But most of text is left untouched.

I cannot find any pattern regarding this behavior.

Also, I am currently editing a translated LO GS chapter and get this error. If this helps, the file has defined sections (to allow for automatic generation of the complete GS guide in odm), maybe this is in some way connected as well.

I have opened some older, normal documents without sections and it seems normal, but did not investigate thoroughly.
Comment 4 Stéphane Guillou (stragu) 2023-01-12 10:47:50 UTC
Martin, could you please attache a simple document that we can use to test and see the difference between 7.4 and 7.5? Maybe some text and a section.
Would be great to see if you can also reproduce in English (or point us to example Slovenian words in the document that are underlined in 7.4 but not in 7.5).

I could not reproduce with "German (Germany)" as the paragraph language and:

    Version: 7.4.4.2 / LibreOffice Community
    Build ID: 85569322deea74ec9134968a29af2df5663baa21
    CPU threads: 2; OS: Mac OS X 12.6.1; UI render: default; VCL: osx
    Locale: de-DE (en_US.UTF-8); UI: en-GB
    Calc: threaded

nor with "French (Canada)" as the paragraph language and:

    Version: 7.5.0.1 (X86_64) / LibreOffice Community
    Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
    CPU threads: 2; OS: Mac OS X 12.6.1; UI render: Skia/Raster; VCL: osx
    Locale: en-US (en_US.UTF-8); UI: en-US
    Calc: threaded

Thank you!
Comment 5 Martin Srebotnjak 2023-01-19 17:01:23 UTC
Sure. I am using Slovenian translation of GS guide, made of chapter files.
The English source is available from the TDF nextcloud. Just take GS74-GettingStarted.odt from
https://nextcloud.documentfoundation.org/apps/files/?dir=/LibreOffice%20Documentation/English/Getting%20Started%20Guide/7.4/Published&fileid=962567
Comment 6 QA Administrators 2023-01-20 03:25:12 UTC Comment hidden (obsolete)
Comment 7 Stéphane Guillou (stragu) 2023-01-31 21:23:53 UTC
Created attachment 185037 [details]
test document

I think I can partially reproduce the issue.

I based this example document on the LO manual Martin linked, using page 2.
I added a paragraph in French before the original paragraph, including some erroneous words for French: "paragraphee", "moot", "spellcheck".
These words are underlined properly. However:

1. Place cursor at beginning of document
2. Tools > Spelling

Results:
Text language is "[None]", nothing is highlighted in the current sentence, a word is shown split, and only the "Add to dictionary" button is available.

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

No issue in 7.4, the spelling tool goes straight to the first word underlined, buttons active, word highlighted, language correct.

Version: 7.4.5.1 / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 8 Stéphane Guillou (stragu) 2023-01-31 22:31:45 UTC
To bibisect, I had to first make sure that the extra dictionary was at the right spot. I copied it from my 7.5 installation

/opt/libreoffice7.5/share/extensions/dict-fr

and pasted in the local bibisect repo:

[...]/linux-64-7.5/instdir/share/extensions/dict-fr

Bibisected with linux-64-7.5 repo to first bad commit 84e282373a120d0a41bb96378085b253e8568e97 which points to core commit:
commit b484e5d9e0d22b794c2d1c73741191836158a4ad	[log]
author	Noel Grandin <noelgrandin@gmail.com>	Sat Oct 08 07:54:48 2022 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	Sun Oct 09 19:16:29 2022 +0200
tree a1f8d3d3c7d0d5a01284e400f4c9d6f5d5dba260
parent ca1378b6552251743c92a19f9ce8b3833557b548 [diff]
use more SwPosition::Assign
part of the process of hiding the internals of SwPosition
Change-Id: I20842b90d0abb4435d6b06970c2545229268e5e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141097

Noel, can you please have a look?

Martin, regarding the underline issue: could you please check if it is at all related to the zoom level you are using? See bug 153223. An annotated screenshot of this aspect of the issue would be helpful.
Comment 9 Stéphane Guillou (stragu) 2023-01-31 22:34:10 UTC
(In reply to Stéphane Guillou (stragu) from comment #8)
> Bibisected with linux-64-7.5 repo [...]

Noel, note that I bibisected the "language is [none] in spelling dialog" issue, as described in comment 7.
Comment 10 Stéphane Guillou (stragu) 2023-01-31 22:41:20 UTC
Created attachment 185038 [details]
screenshot of issue in LO 7.5.0.2

This annotated screenshot shows the spellcheck dialog failing at using the paragraph's language, French.

(Forget about that issue with whitespace inserted in the sentence, in comment 7, that must have been an error on my end. Haven't seen it again.)

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 11 László Németh 2023-02-01 17:06:51 UTC
Fixed in https://gerrit.libreoffice.org/c/core/+/146465
Comment 12 Commit Notification 2023-02-01 19:07:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2780b026f912a103aea3f8dc19319b998d19a43a

tdf#152738 sw: fix lost SwPosition in spelling dialog

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 László Németh 2023-02-01 20:28:16 UTC
@Martin: many thanks for the bug report! (Unfortunatelly, I wasn't able to reproduce it last year likely because of my old build.)

@Stéphane: many thanks for the test document and bibisecting!

@Noel: many thanks for the review!

@Telesto: many thanks for handling the issue!
Comment 14 Commit Notification 2023-02-02 08:54:45 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/1ca9f7fc85db66c7c6ba25d43f05476ea787dfc4

tdf#152738 sw: fix lost SwPosition in spelling dialog

It will be available in 7.5.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Stéphane Guillou (stragu) 2023-02-02 13:04:44 UTC
Fix verified in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b2bd60b8c1937502857e12b0eea42323fd2353c8
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you all! :)
Comment 16 Xisco Faulí 2023-02-09 13:08:15 UTC
*** Bug 153498 has been marked as a duplicate of this bug. ***
Comment 17 Stéphane Guillou (stragu) 2023-02-15 12:23:49 UTC
*** Bug 153628 has been marked as a duplicate of this bug. ***
Comment 18 Telesto 2023-02-26 23:18:12 UTC
*** Bug 153836 has been marked as a duplicate of this bug. ***
Comment 19 Stéphane Guillou (stragu) 2023-03-04 10:18:32 UTC
It looks like the issue might not be entirely fixed, as we've got two reporters saying they still have problems in 7.5.1, both on Windows:

- bug 153628
- bug 153931

However, I haven't been able to reproduce.
What do you think, László?
Comment 20 Telesto 2023-03-04 16:33:01 UTC
(In reply to Stéphane Guillou (stragu) from comment #19)
> It looks like the issue might not be entirely fixed, as we've got two
> reporters saying they still have problems in 7.5.1, both on Windows:
> 
> - bug 153628
> - bug 153931
> 
> However, I haven't been able to reproduce.
> What do you think, László?

I'm maybe able to 'reproduce' a part of bug 153628. I'm lacking Australian Dictionary, so it falls back to 'NONE' (OK so far). However if I select some different language out of available dictionary's, the spell checker window keeps being disabled (as described by the reporter).