Bug 127101 - EDITING Rejecting direct formatting applied by paragraph join removes former direct formatting
Summary: EDITING Rejecting direct formatting applied by paragraph join removes former ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks: Track-Changes
  Show dependency treegraph
 
Reported: 2019-08-22 15:14 UTC by Gabor Kelemen
Modified: 2019-08-23 09:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (11.34 KB, application/vnd.oasis.opendocument.text)
2019-08-22 15:14 UTC, Gabor Kelemen
Details
The example file with character formatting and paragraph formatting applied (39.64 KB, image/png)
2019-08-22 15:15 UTC, Gabor Kelemen
Details
The example file with changed character formatting and joined paragraphs (50.48 KB, image/png)
2019-08-22 15:15 UTC, Gabor Kelemen
Details
The example file after rejecting the changes (42.17 KB, image/png)
2019-08-22 15:15 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2019-08-22 15:14:38 UTC
Created attachment 153578 [details]
Example file from Writer

If a paragraph has direct text formatting then we add another formatting as tracked change and reject it, then the text formatting is reset to the default settings instead of the formatting set before the tracked format change.
The same happens when we reject a paragraph join that was consequence of a deletion and has modified the paragraph style. The second paragraph gets the style of the first one, but upon rejecting the change does not get its former style back.


Steps to reproduce:
    1. Open attached file. It has some character formatting set for the first paragraph: bold, underline, superscript, highlight color, hyperlink. Change tracking is enabled.
    2. Set the whole first paragraph as underlined.
    3. Reject this change.

For the paragraph join part:
    1. Delete the end of the paragraph formatted as Heading 1 and the beginning of the paragraph formatted as Quotations
    2. The style of the second paragraph becomes Heading 1
    3. Reject this change. The second paragraphs style remains Heading 1 instead of reverting to Quotations.

Actual results:
The original character format settings are not restored.

Expected results:
Rejecting Character formatting should restore former character formatting.

LibreOffice details:
Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 Gabor Kelemen 2019-08-22 15:15:00 UTC
Created attachment 153579 [details]
The example file with character formatting and paragraph formatting applied
Comment 2 Gabor Kelemen 2019-08-22 15:15:19 UTC
Created attachment 153580 [details]
The example file with changed character formatting and joined paragraphs
Comment 3 Gabor Kelemen 2019-08-22 15:15:36 UTC
Created attachment 153581 [details]
The example file after rejecting the changes
Comment 4 Commit Notification 2019-08-23 09:26:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/dc9a0b124272a6dc0a8d875d51b6f882e60a8a04%5E%21

tdf#127101 Change tracking: reject format at paragraph join

It will be available in 6.4.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 5 Commit Notification 2019-08-23 09:28:04 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/61ed17cafc90d9b4303b52260f729638eed107c7%5E%21

tdf#127101 Change tracking: fix format reject at paragraph join

It will be available in 6.4.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 6 László Németh 2019-08-23 09:33:25 UTC
@Gábor: I've limited this issue to the case of paragraph join. Handling all paragraph formatting is a quite big issue (see Bug 105413 et al., where we needed to handle every formatting separately).
Comment 7 László Németh 2019-08-23 09:36:03 UTC
Gábor: maybe modifying paragraph style and numbering of a paragraph could be the most important issues to store their change data for reject/save.