Bug 166387 - Tools >> AutoCorrect >> Apply and Edit Changes messes up Quotation Marks
Summary: Tools >> AutoCorrect >> Apply and Edit Changes messes up Quotation Marks
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-29 05:30 UTC by bscript
Modified: 2025-05-03 05:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Straight QMs covernted but replaced with double curly QMs (42.65 KB, image/png)
2025-04-29 05:30 UTC, bscript
Details
Test.166387.-.Straight.Quotes.-.Tools.AutoCorrect.Apply.and.Edit.-.Curly.Quotes (12.24 KB, application/vnd.oasis.opendocument.text)
2025-04-29 22:49 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bscript 2025-04-29 05:30:28 UTC
Created attachment 200592 [details]
Straight QMs covernted but replaced with double curly QMs

It does convert straight quotation marks (QMs) to curly ones however it messes up at the beginning of each sentence. Screenshots would explain better.


A Windows user has also confirmed the same on reddit here (+ more screenshots): https://www.reddit.com/r/libreoffice/s/srxmcnC3zKa
Comment 1 bscript 2025-04-29 05:35:27 UTC
This is the correct link to the Reddit post: https://www.reddit.com/r/libreoffice/comments/1kadh30/i_tried_tools_autocorrect_in_writer_it_messed/
Comment 2 BogdanB 2025-04-29 16:21:09 UTC
Even if the Reddit post confirms this behavior, please wait for someone else to test this bug and confirm it.
Comment 3 Mateusz Wlazłowski 2025-04-29 21:03:46 UTC
Confirm from 7.2.0.1 (my oldest version)


Steps:
1- Open a new writer
2- Input
This is some sample text with "straight quotes."
This is some sample text with "straight quotes."
3- Tools > Autocorrect > Apply and edit 


Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Tex2002ans 2025-04-29 22:46:05 UTC
I VERIFY this is an issue in:

Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

- - -

STEPS TO REPRODUCE

In Writer:

0. Open attached ODT.

1. Press:

- Tools > AutoCorrect > Apply and Edit

- - -

I reproduced with this simple text:

> This is some sample text with "straight quotes." (Default Paragraph Style)
>
> This is some sample text with "straight quotes." (Body Text)

BUG: Text changes into:

> This is some sample text with ”“straight quotes.”

EXPECTED:

> This is some sample text with “straight quotes.”

The opening quote accidentally turns into:

- ”“
--- RIGHT DOUBLE QUOTE + LEFT DOUBLE QUOTE

instead of just a single:

- “
--- LEFT DOUBLE QUOTE

- - -

REGRESSION NOTE: This DID WORK correctly in 7.6.0 when this AutoCorrect->“curly quotes” feature was fixed by Baole Fang:

- Bug #128192

Pre-7.6 had a separate issue, where it only applied this feature to "Default Paragraph Style".

- - -

Note #2: I wrote a dumb->smart quotes tutorial back when 7.6.0 first released, so I know it worked correctly.

So this regression accidentally got introduced some time between 7.6.0<->25.2.
Comment 5 Tex2002ans 2025-04-29 22:49:17 UTC
Created attachment 200612 [details]
Test.166387.-.Straight.Quotes.-.Tools.AutoCorrect.Apply.and.Edit.-.Curly.Quotes

This attachment has the sample sentence in 2 Paragraph Styles:

- "Default Paragraph Style"
- "Body Text"

Both sentences should curl the quotes exactly the same.

(Pre-7.6, the "Body Text" paragraph wouldn't curl quotes... so if you test LO versions too far back, that's a separate bug from this one.)
Comment 6 Tex2002ans 2025-04-30 04:47:37 UTC
Hmmm... okay, this is a weird one too.

Looks like this bad ”“doubling quotes” issue only occurs with:

- Tools > AutoCorrect > Apply and Edit

and goes further back, before 7.6.

And:

- Tools > AutoCorrect > Apply

has been working correctly for quite a while.

(So Mateusz is correct. Maybe it's been lurking in LO even earlier than 7.0!)

- - -

I did some bibisecting so far, but haven't quite found the original commit.

The bad ”“double quotes” still happens in all:

- win64-7.5
- bibisect-linux-64-24.2
- bibisect-linux-64-24.8

I had trouble opening my test ODT in:

- win64-7.6
--- It would just get a crash on opening test ODT.
--- And I didn't know enough about git/bisecting to get around that issue.
Comment 7 bscript 2025-05-01 02:54:09 UTC
Have any of the developers noticed?
Comment 8 Tex2002ans 2025-05-02 01:40:42 UTC
Bscript: Yes, and you will be getting emails as things get updated.

Since you are very new to Bugzilla, this is the general breakdown of how things go:

- - - - - -

1. User reports issue.

2. QA people check and verify it's an issue.

-> Bug got marked as NEW.

3. QA tries to find the exact start of the problem.

-> !!!This is where we are right now!!!

- - -

For example, if we find:

- LibreOffice 7.2 worked fine
- Everything after that was broken.

We can test every single change in 7.2 until we hit the EXACT DIFFERENCE that broke it.

- - -

4. When the source of the issue is found:

- The dev who made that change gets added/pinged.

Because the dev now:

- Knows the symptoms
- Can see THE EXACT few lines that broke the change

this makes it SO MUCH EASIER for them to fix. :)

5. Dev will submit changes.

And then this bug will get updated with:

- A dev comment that says "25.2.4" fixes it.
- The top "Whiteboard" section will change.
   - target:25.2.4

6. QA then tests, makes sure it all works:

- -> Bug gets marked as VERIFIED FIXED

and then it makes its way to users! :)
Comment 9 bscript 2025-05-03 05:51:38 UTC
Ah, nice to know. Thanks as always for the insightful comment.