Bug 150582 - Words with smart quotes/apostrophes get added to custom dictionaries via Writer but not Draw/Impress/Calc
Summary: Words with smart quotes/apostrophes get added to custom dictionaries via Writ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.2.5 target:24...
Keywords:
: 161477 (view as bug list)
Depends on:
Blocks: Dictionaries
  Show dependency treegraph
 
Reported: 2022-08-24 12:18 UTC by xordevoreaux
Modified: 2024-06-21 10:47 UTC (History)
7 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 xordevoreaux 2022-08-24 12:18:06 UTC
Description:
I typed BF's (short for possessive of boyfriend's) in LO draw in a text box, got offered the opportunity to add it to a dictionary, but it didn't take. Worked in Writer.  

Steps to Reproduce:
1. Launch LO Draw
2. Create a text box and type BF's in it
3. Observe it's not a recognized word
4. Attempt to add it to any dictionary, it fails
5. Launch LO Writer
6. Type BF's
7. Observe it's not a recognized word
8. Attempt to add it to dictionary, it works
9. Return to Draw. The word shows up without the red squiggly (finally added)

Actual Results:
Not added via Draw

Expected Results:
Words with apostrophes and smart quotes should be added under any context using any LO application using any widget/tool whose context menu offers Add To Dictionary


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

and

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4c96abd81460977d413d4d28e891bbbac5769ede
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 Tammy 2022-12-23 21:21:11 UTC
I was able to reproduce the issue in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 780d55199e54fafc3784691d5cf716c1bb92b0aa
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 2 xordevoreaux 2023-05-16 01:05:25 UTC
Still a problem in 

Version: 7.6.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 9366f83c88fc93d40ea0c0035508f24ad5dcb144
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 3 Tex2002ans 2024-02-17 23:01:13 UTC
Yep, looks like still an issue in:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - - - - - -

If you have these 2 lines of text in your document:

- BF's
- BF’s

1st = dumb quote / straight quote
   - U+0027 = APOSTROPHE
2nd = smart quote / curly quote
   - U+2019 = RIGHT SINGLE QUOTATION MARK

- - -

If you:

- Right-Click > Add to Dictionary

on the 2nd type...

This is what gets added:

- BF's
   - Writer
   - = U+0027
- BF’s
   - Draw
   - = U+2019

You can verify this by going into:

- Tools > Options
- Languages and Locales > Writing Aids
- Under "User-defined Dictionaries"
   - Highlighting "standard [All]"
   - Pressing the "Edit" button.

- - -

Like comment 0 says:

> Words with apostrophes and smart quotes should be added under any context using any LO application using any widget/tool whose context menu offers Add To Dictionary

I'd expect that too. Right now, it seems like 2 completely different codepaths for Draw vs. Writer.
Comment 4 Stéphane Guillou (stragu) 2024-06-11 12:12:16 UTC
Also reproduced in Impress and Calc.

Reproduced in OOo 3.3 (after turning the autocorrect rule on) -> inherited.

Laszlo, I thought you might be interested in this one?
Comment 5 Stéphane Guillou (stragu) 2024-06-11 12:13:45 UTC
*** Bug 161477 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2024-06-14 16:44:34 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8de1941fe61b461be617e1e88bb362bbd8315654

tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe

It will be available in 25.2.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 7 László Németh 2024-06-14 16:48:32 UTC
Fixed in master, started back-port to 24.2 (and 24.8).

@xordevoreaux@gmail.com and all: thanks for the bug report and feedback!

Commit description:

tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe

During spell checking, words added to the user dictionaries still
weren't recognized by Calc, Impress and Draw because of the unnecessary
conversion their typographic apostrophes to ASCII apostrophes.

Note: Writer has no such problem because of its (obsolete) apostrophe
conversion for the user dictionary.

First skip the obsolete apostrophe conversion in isValid(), but keep
it as a fallback for Writer users.
Comment 8 BogdanB 2024-06-15 10:26:06 UTC
Thanks, László.

It's added in the Dictionary from the first try in Draw in
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cdcfd8b1df94a9e58557bfb195accd7cb43d2e3c
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Not ok in
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 Commit Notification 2024-06-18 09:22:31 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/f3958668003a8aae1ce0ff0473b2b3e75d285739

tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe

It will be available in 24.2.5.

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 10 Commit Notification 2024-06-21 10:47:27 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/7b04c29e0fb27064cb6b72ad72570eb1675bd5f1

tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe

It will be available in 24.8.0.0.beta2.

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.