Bug 128192 - Tools > AutoCorrect > Apply only applies AutoCorrect Options on "Default paragraph style" - but should apply for all paragraph styles
Summary: Tools > AutoCorrect > Apply only applies AutoCorrect Options on "Default para...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2 all versions
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Baole Fang
URL:
Whiteboard: target:7.6.0 target:24.2.0 target:7.6...
Keywords:
: 142438 155018 (view as bug list)
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2019-10-17 08:24 UTC by To Do
Modified: 2023-06-25 23:16 UTC (History)
6 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 To Do 2019-10-17 08:24:47 UTC
Description:
When replacing single and double quotation marks with typographic ones, autocorrect works as it should when typing, but when this is someone uses the Tools, Autocorrect, Apply menu item, quotation marks are not changed unless the defaults are changed and set manually.

Steps to Reproduce:
1. Open a document that has straight single and double quotes.
2. Choose Tools, Autocorrect, Apply. (Nothing happens to the quotation marks)
3. Try typing quotation marks and, if they are set to be updated, they are automatically corrected.


Actual Results:
The quotation marks are not updated.

Expected Results:
The quotation marks are changed to typographic (curved) ones.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
The software should respect the localisation settings irrespective if it is while typing or when applied after.
Comment 1 Dieter 2019-11-11 13:23:40 UTC
I can't confirm with

Version: 6.4.0.0.alpha1 (x64)
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

To be certain the reported issue is not related to corruption in the user profile, could you please reset your Libreoffice profile (https://wiki.documentfoundation.org/UserProfile) and re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the issue is still present
Comment 2 QA Administrators 2020-05-10 03:44:32 UTC Comment hidden (obsolete)
Comment 3 László Németh 2020-05-30 10:06:15 UTC
Unfortunately, this Apply works only on paragraphs with Default paragraph settings, so you must change paragraph style to use it to correct quotation marks automatically.

I think, this is a UI bug, so it would be better to change that for a question, or something else.
Comment 4 sdc.blanco 2021-01-26 00:00:19 UTC
Confirmed with 7.2.0.0.alpha0+

Tools > AutoCorrect > Apply will apply quotes in Localized Options in a paragraph with "Default Paragraph Style", but will not convert quotes in a paragraph with "Text Body" paragraph style.
Comment 5 Shantanu 2021-06-08 07:53:48 UTC
*** Bug 142438 has been marked as a duplicate of this bug. ***
Comment 6 Shantanu 2021-06-08 08:02:33 UTC
>> Unfortunately, this Apply works only on paragraphs with Default paragraph

Is it possible to do something about it? There is no way that a user can guess about it. I think this is a major issue because applying auto-correct becomes very difficult (if not impossible).
Comment 7 Stéphane Guillou (stragu) 2023-01-03 17:37:39 UTC
Changing summary as it affects _all_ autocorrect rules.
Was already the case in 6.2:

Version: 6.2.0.0.beta1
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

Also Windows:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

I see this as a bug, not an enhancement. Why should it be limited to one style?

Documentation mentions something about styles, but only about numbering:

https://help.libreoffice.org/7.5/en-US/text/swriter/01/05150200.html
Comment 8 Baole Fang 2023-04-25 21:55:32 UTC
*** Bug 155018 has been marked as a duplicate of this bug. ***
Comment 9 Baole Fang 2023-04-25 23:18:32 UTC
I've taken a look into this bug, and here is the current AutoCorrect logic for non default paragraph style:

If the current style is user defined, then AutoCorrect is applied according to whether "Replace Custom Styles" is checked.

Else, if the style is not default paragraph style, then it is assumed that everything is well formatted. It will get into HAS_FMTCOLL state, where BuildText() is not correctly run.

I can fix it by calling BuildText() properly. In the same fix, I'll prevent AutoCorrect from changing the style to "Text Body" mentioned in bug 90507.
Comment 10 Commit Notification 2023-05-04 06:44:58 UTC
Baole Fang committed a patch related to this issue.
It has been pushed to "master":

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

tdf#128192: Fix Tools/AutoCorrect/Apply

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 11 Commit Notification 2023-06-25 23:03:12 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/d380411c947e8fcc3887889497349f45f01c28ac

(related) tdf#128192 remove mention of "Default PS" limitation
Comment 12 Commit Notification 2023-06-25 23:04:15 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/help/commit/2c6962858e4e4a5018940456a30fa2bd716313e5

(related) tdf#128192 remove mention of "Default PS" limitation
Comment 13 sdc.blanco 2023-06-25 23:16:18 UTC
Verified with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 069c7dc4e9706b40ca12d83d83f90f41cec948f8
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded

Also works with custom PS. Thanks Baole Fang!  A very useful improvement of AutoCorrect.