Bug 143918 - EDITING More than one change tracked character formatting of the same text is not reverted
Summary: EDITING More than one change tracked character formatting of the same text is...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0
Keywords: implementationError
Depends on:
Blocks: Track-Changes-TextFormatting
  Show dependency treegraph
 
Reported: 2021-08-17 11:27 UTC by NISZ LibreOffice Team
Modified: 2021-09-02 13:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (8.60 KB, application/vnd.oasis.opendocument.text)
2021-08-17 11:27 UTC, NISZ LibreOffice Team
Details
Screenshot of the initial document in Writer (18.26 KB, image/png)
2021-08-17 11:28 UTC, NISZ LibreOffice Team
Details
Screenshot of the initial document with two character formatting applied in Writer (35.60 KB, image/png)
2021-08-17 11:28 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Writer after the change was rejected (17.58 KB, image/png)
2021-08-17 11:29 UTC, NISZ LibreOffice Team
Details
Example file from Word with two character formatting applied in one tracked change (12.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-17 11:29 UTC, NISZ LibreOffice Team
Details
Screenshot of the Word-made document side by side in Word and Writer after rejecting the change – this works fine in Writer (55.38 KB, image/png)
2021-08-17 11:29 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-08-17 11:27:55 UTC
Created attachment 174350 [details]
Example file from Writer

This is a followup to bug 50447
Now change tracking records the previous state of direct character formatting applied to a text. Rejecting a character formatting change restores this.
However if two (or more) different direct character formatting is changed only the last one is recorded and can be rejected, previous one is silently accepted.

Steps to reproduce:
    1. Have a bit of text in Writer with change tracking enabled
    2. Apply bold formatting to a word
    3. Change the font size of the same word, for example to 18 pt.
    4. Reject the tracked change

Actual results:
The 18pt font size is reverted, the bold formatting is not.

Expected results:
The bold formatting of the text should be reverted too. 
The second CT entry simply overwrote the first one instead of being applied to it.

As another example see attached docx file from Word:
It has two character formatting applied to a word, a font size change to 18 pt and bold formatting. Writer opens this as a single CT entry with two formatting, and rejecting works as expected with both formatting reverted.

LibreOffice details:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dd3ab0fd737ff84657ff34eebafe2628f489e5a1
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2021-08-17 11:28:17 UTC
Created attachment 174351 [details]
Screenshot of the initial document in Writer
Comment 2 NISZ LibreOffice Team 2021-08-17 11:28:50 UTC
Created attachment 174352 [details]
Screenshot of the initial document with two character formatting applied in Writer
Comment 3 NISZ LibreOffice Team 2021-08-17 11:29:08 UTC
Created attachment 174353 [details]
Screenshot of the problem in Writer after the change was rejected
Comment 4 NISZ LibreOffice Team 2021-08-17 11:29:26 UTC
Created attachment 174354 [details]
Example file from Word with two character formatting applied in one tracked change
Comment 5 NISZ LibreOffice Team 2021-08-17 11:29:44 UTC
Created attachment 174355 [details]
Screenshot of the Word-made document side by side in Word and Writer after rejecting the change – this works fine in Writer
Comment 6 Commit Notification 2021-08-19 08:22:02 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143918 sw: fix reject of multiple changes

It will be available in 7.3.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 2021-08-19 11:52:18 UTC
tdf#143918 sw: fix reject of multiple changes

Reuse "extra data" (i.e. tracked direct character
formatting) of the previous redline on the formatted
text range to track all character formatting changes,
i.e. the new and the previous ones, too. E.g. modified
text size and color of the word are rejectable now,
not only the last one (e.g. text color) of the multiple
formatting changes.
Comment 8 NISZ LibreOffice Team 2021-09-02 13:18:15 UTC
Verified in: 

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d5ade739771ddf06cc7ee6d4af15672bfcf09ed6
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded