Bug 156121 - Autocorrect -> Apply and Edit Changes misbehaves
Summary: Autocorrect -> Apply and Edit Changes misbehaves
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/autocor...
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2023-07-02 04:51 UTC by Mike Kaganski
Modified: 2023-07-12 04:25 UTC (History)
1 user (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 Mike Kaganski 2023-07-02 04:51:26 UTC
In a text document, *paste* (not type) the following text:

:---: foo :---:

Execute Tools->Autocorrect->Apply and Edit Changes

Expected:

— foo —

Actual:

:---: foo :---:

(Indeed, there is also a dialog, and the tracking changes; I only show the result of replacement, as suggested by the dialog.)

=====

Now start over, and instead of the previous line, paste

:---: foo bar :---:

and execute Tools->Autocorrect->Apply and Edit Changes

Expected:

— foo bar —

Actual:

:---: foo bar —

In general, an expectation is that the result or autocorrection is the same as if one types the text interactively.

Ref: https://ask.libreoffice.org/t/autocorrect-doesnt-replace-with-m-dash/93097

Code pointer (not an easyhack IMO): SwAutoFormat::SwAutoFormat in sw/source/core/edit/autofmt.cxx
Comment 1 raal 2023-07-04 19:24:53 UTC
Confirm with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4acf48b99804be712d2bd6e3e73c1f030ec637d5
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded