Bug 51423 - FORMATTING: When correcting spelling, some formatting information is erased
Summary: FORMATTING: When correcting spelling, some formatting information is erased
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 99786 104137 135867 (view as bug list)
Depends on:
Blocks: Spell-Checking Formatting-Text-Diverse
  Show dependency treegraph
 
Reported: 2012-06-25 13:50 UTC by Hamilton Turner
Modified: 2020-08-25 09:19 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with reproducible case (55.04 KB, application/vnd.oasis.opendocument.text-flat-xml)
2016-02-27 01:36 UTC, Octavio Alvarez
Details
Expanded test set (21 test cases) for this issue, proving reproducibility (12.83 KB, application/vnd.oasis.opendocument.text)
2017-09-30 14:42 UTC, Octavio Alvarez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hamilton Turner 2012-06-25 13:50:22 UTC
Steps to reproduce:
1. Write a sentence as so: 
Why is *CMD-I to turn on italics* thhis *CMD-I* not working? 
2. Right click on thhis and choose to correct to 'this'
3. Italicized formatting is lost

Current behavior:
In most situations, the italics formatting is preserved. However, there seem to be a few isolated cases where it is lost. 

Expected behavior:
In all cases where formatting is initially present formatting should be preserved after a spelling correction has been performed. 

Platform (if different from the browser): 
os x 10.7.4 
$ java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
              
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Comment 1 bfoman (inactive) 2013-01-28 10:41:36 UTC
(In reply to comment #0)
> Current behavior:
> In most situations, the italics formatting is preserved. However, there seem
> to be a few isolated cases where it is lost. 

Checked with:
LO 4.0.0.2
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Could not reproduce. 
What are those "isolated ones"? Do you have any Steps To Reproduce this every time?
Comment 2 Hamilton Turner 2013-01-28 15:40:24 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Current behavior:
> > In most situations, the italics formatting is preserved. However, there seem
> > to be a few isolated cases where it is lost. 
> 
> Checked with:
> LO 4.0.0.2
> Build ID: own W7 debug build
> Windows 7 Professional SP1 64 bit
> 
> Could not reproduce. 
> What are those "isolated ones"? Do you have any Steps To Reproduce this
> every time?

Nope. Sorry, I tried to generate exact steps, but the precise combination eluded me. I just noticed that if I did the steps many times, at some point a word or two would lose the formatting. I know it's an imprecise bug, and if no one else is experiencing this significantly it's probably not worth the time. I would only see the behavior about once a week
Comment 3 Joel Madero 2013-09-24 20:51:46 UTC
I also was unable to reproduce, without a test case and/or explicit steps that always result in problem not much we can do. Marking as WFM


@Hamilton - thanks for taking the time to report, feel free to reopen if you figure out how to consistently trigger.

Furthermore * * results in bold not italicized....
Comment 4 Octavio Alvarez 2016-02-27 01:36:34 UTC
Created attachment 123019 [details]
Document with reproducible case

I am attaching a sample document where correcting spelling removes format. There are two bold words. The first one is misspelled. Correcting it removes the bold format. The second one, if changed to be misspelled and then corrected, does not lose the bold format.

Tested under:
 * Windows 10, LibreOffice 4.4.2.2
 * Ubuntu Trusty, LibreOffice 5.0.4.2 (5.0.4~rc2-0ubuntu1~trusty1 from Ubuntu LibreOffice PPA)
 * Debian Sid, LibreOffice 5.1.1.1 (5.1.1~rc1-1 from official Debian repos)

Hope this helps.
Comment 5 Buovjaga 2016-03-14 15:00:49 UTC
NEW per comment 4.
Comment 6 QA Administrators 2017-05-22 13:20:20 UTC Comment hidden (obsolete)
Comment 7 Octavio Alvarez 2017-09-30 13:50:53 UTC
Problem still occurs.

Version: 5.4.0.2
Build ID: 1:5.4.0~rc2-1
CPU threads: 4; OS: Linux 4.2; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group
Comment 8 Octavio Alvarez 2017-09-30 14:42:27 UTC
Created attachment 136638 [details]
Expanded test set (21 test cases) for this issue, proving reproducibility
Comment 9 Octavio Alvarez 2017-09-30 14:44:17 UTC
This is actually reproducible! Whenever the formatting is applied to the space after the misspelled word, formatting is modified / lost.

I have attached another document with 21 cases tested divided in three sections: (a) formatting applied is italics, (b) formatting applied is regular (non-italics using direct formatting) and (c) italics removed.

In the three sections the behavior follows the same pattern: good/bad/good/bad/bad/good/good.

I have not tested what happens if the space after has different formatting but this should be enough to prove reproducibility of the bug.

From the tests, the failing cases should not be at all uncommon.
Comment 10 QA Administrators 2018-10-01 02:54:11 UTC Comment hidden (obsolete)
Comment 11 Octavio Alvarez 2018-10-01 13:08:39 UTC
Reproducible.

Version: 6.1.1.2
Build ID: 1:6.1.1-1
CPU threads: 4; OS: Linux 4.2; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group threaded
Comment 12 QA Administrators 2019-10-02 02:57:12 UTC Comment hidden (obsolete)
Comment 13 Telesto 2020-08-24 19:17:08 UTC
*** Bug 135867 has been marked as a duplicate of this bug. ***
Comment 14 Thomas Lendo 2020-08-24 19:35:21 UTC
Cannot reproduce this issue with
Version: 7.1.0.0.alpha0+
Build ID: a06a83b29a9da770787bffe416b138102aa12531
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-AT (de_AT.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-08-24_01:03:26
Calc: CL

Can anybody confirm that too?
Comment 15 Telesto 2020-08-24 19:40:34 UTC
Seems to be working indeed
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 8700bace8c0714d853f5df6918ab9c8bb3d81f77
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

Or should I say for the examples proposed here.. the duplicate has the same bug.. but still having the quirk
Comment 16 Buovjaga 2020-08-24 19:46:14 UTC
(In reply to Telesto from comment #15)
> Seems to be working indeed
> Version: 7.1.0.0.alpha0+ (x64)
> Build ID: 8700bace8c0714d853f5df6918ab9c8bb3d81f77
> CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
> Locale: nl-NL (nl_NL); UI: en-US
> Calc: CL
> 
> Or should I say for the examples proposed here.. the duplicate has the same
> bug.. but still having the quirk

Then the duplicate shall live and this one shall die. Make it so!
Comment 17 Thomas Lendo 2020-08-24 19:53:21 UTC
I can reproduce the issue in the test document of bug 135867 with LibreOffice 5.0.6.3 but NOT with the daily build from today. So that the other one is a duplicate of this bug is still true.
Comment 18 Telesto 2020-08-24 20:02:20 UTC
*** Bug 135867 has been marked as a duplicate of this bug. ***
Comment 19 Phil Krylov 2020-08-24 20:51:44 UTC
*** Bug 99786 has been marked as a duplicate of this bug. ***
Comment 20 Phil Krylov 2020-08-24 21:26:38 UTC
Still reproduced in 7.0 with the sample from Comment 4. Example from bug 99786 is also reproducible in release:

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx
Locale: en-US (en_RU.UTF-8); UI: en-US
Calc: threaded

But nightly works for me.
Comment 21 Buovjaga 2020-08-25 06:12:52 UTC
*** Bug 104137 has been marked as a duplicate of this bug. ***
Comment 22 Thomas Lendo 2020-08-25 09:02:08 UTC
Possibly fixed with patch for bug 135721 from Michael Stahl.
Will be part of LibO 7.1.0, 7.0.2 and 6.4.7.

We should test LibO 7.0.2 and 6.4.7 as well when they're ready and also the other bugs of meta bug 127250 (Formatting-Text-Diverse) - [META] Text formatting issues when inserting or overwriting.
Comment 23 Buovjaga 2020-08-25 09:19:34 UTC
(In reply to Thomas Lendo from comment #22)
> Possibly fixed with patch for bug 135721 from Michael Stahl.
> Will be part of LibO 7.1.0, 7.0.2 and 6.4.7.
> 
> We should test LibO 7.0.2 and 6.4.7 as well when they're ready and also the
> other bugs of meta bug 127250 (Formatting-Text-Diverse) - [META] Text
> formatting issues when inserting or overwriting.

https://dev-builds.libreoffice.org/daily/libreoffice-7-0/current.html
https://dev-builds.libreoffice.org/daily/libreoffice-6-4/

Dates on the latest builds look like they should all contain the fix. Windows build of 6.4.7 is not so sure, because the build broke at the same day the patch landed.