Bug 73964 - Autocorrection doesn't change words that are inserted by spell checking
Summary: Autocorrection doesn't change words that are inserted by spell checking
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Spell-Checking AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2014-01-23 09:52 UTC by gherardo.carullo
Modified: 2024-01-30 11:41 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gherardo.carullo 2014-01-23 09:52:34 UTC
Problem description: 
When the "Replace" option is checked for "Single quotes" in Tools->AutoCorrect, "Localized Options" tab, single quotes, i.e. ', should always be replaced automatically.
However when correcting a misspelled word that contains the replaced single quote (e.g. "un'aria" - italian), the corrected word contains the basic single quote, not the replaced one.
The problem has not showed when editing an English (USA) paragraph, only in italian (I don't know about other languages).

Steps to reproduce:
1. Install Italian package
2. Select the Replace checkbox
3. Write "un'ario", right click and select "un'aria".
4. see that the single quote style changes.

Current behavior:
Not possible to show since in this text format single quotes are all the same

Expected behavior:
Not possible to show since in this text format single quotes are all the same

              
Operating System: Mac OS X
Version: 4.1.4.2 release
Comment 1 Mihkel Tõnnov 2014-02-11 20:15:28 UTC
It does affect English, too, actually -- it's just the other way around there. Example: if I tick *off* replacing single quotes and then write e.g. "dont", the context menu suggests "don’t" (with a curly apostrophe) as a replacement.

So most likely it just depends on the spelling dictionary of any given language -- if there are curly apostrophes in the dictionary, only those will be suggested; if there are straight ones there, then only those will be suggested.
Comment 2 Joel Madero 2015-05-02 15:43:53 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2016-09-20 09:37:40 UTC Comment hidden (obsolete)
Comment 4 Jackson Sul 2018-04-29 02:43:05 UTC
This is definitely still a perpetually annoying issue. 

In AutoCorrect -> Localized Options I have single quotes set to show curly apostrophes (’ not '), but spellcheck only suggests words with straight ones. I'm using the English dictionary, so I wonder why the opposite occurred with Mihkel Tõnnov above. Though maybe something has changed in four years...

Currently using LibreOffice Writer 6.0.3.2 on Ubuntu 16.04.
Comment 5 QA Administrators 2019-04-30 02:41:27 UTC Comment hidden (obsolete)
Comment 6 Thomas Lendo 2019-09-08 21:50:25 UTC
The spell checking (or the dictionaries behind it) still counteracts the auto-correction. Words that are changed by spell checking are inserted with false and not auto-corrected words.

LibreOffice should enhance its autocorrection feature to also change words that were inserted by spell checking. Because quote is quote, it shouldn't matter who or what has written the (false) quotes. So, it's more an enhancement request?
Comment 7 Heiko Tietze 2019-09-09 16:49:15 UTC
(In reply to Thomas Lendo from comment #6)
> LibreOffice should enhance its autocorrection feature...

Double autocorrection... What if the user intentionally inserts a non-curly apostrophe in some autocorrection and this is replaced in the second step. Perhaps we provide an option to start the AC manually afterwards.
Comment 8 Heiko Tietze 2019-09-26 05:31:59 UTC
Different opinions on this, so I keep it open.
Comment 9 QA Administrators 2022-06-01 03:37:05 UTC Comment hidden (obsolete)
Comment 10 Jackson Sul 2024-01-29 17:05:05 UTC
This is still an issue in Writer version 7.6.4.1. The spellchecker will insert straight apostrophes (') when the document is set to only use curly ones (’). This inconsistently leads to only a few words in a document having straight apostrophes.

I know it's been said that this is due to dictionaries themselves using straight ones (apparently the default US English Hunspell has the problem), so I'm not sure on the technical solution.

The default in Writer should simply match what the user has selected in autocorrect (e.g., curly apostrophes and quotes) so that the user's settings are consistently applied. If the user then needs to manually change it for whatever reason, then they can. (Or set to only use straight apostrophes and quotes, of course, overriding the dictionaries that only use curly ones.) Seems straightforward to me, even if autocorrect has to override the dictionary.
Comment 11 Heiko Tietze 2024-01-30 11:41:44 UTC
The GetQuote() function should help here. See also https://gerrit.libreoffice.org/c/core/+/162583