Bug 144058 - DOCX export: Change tracked deletion keeps table if the change spans multiple paragraphs
Summary: DOCX export: Change tracked deletion keeps table if the change spans multiple...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0
Keywords: implementationError
Depends on:
Blocks: Track-Changes-Table
  Show dependency treegraph
 
Reported: 2021-08-24 14:57 UTC by NISZ LibreOffice Team
Modified: 2021-10-04 08:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The original file saved by Writer (17.09 KB, application/vnd.oasis.opendocument.text)
2021-08-24 14:57 UTC, NISZ LibreOffice Team
Details
The example file with changes visible (79.22 KB, image/png)
2021-08-24 14:58 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Writer after accepting all changes (72.88 KB, image/png)
2021-08-24 14:58 UTC, NISZ LibreOffice Team
Details
the test document with track changes (17.31 KB, application/vnd.oasis.opendocument.text)
2021-08-25 13:21 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-08-24 14:57:55 UTC
Created attachment 174520 [details]
The original file saved by Writer

This is a followup to bug 79069
When a table is deleted with change tracking enabled and the change contains paragraph text before/after the table, an empty table remains after accepting the change.


Steps to reproduce:
    1. Open attached file, it contains two tables among some text. The first table was deleted with the Delete table command, while the second was deleted by highlighting a sentence from the previous paragraph and extending the range to the following and pressing Delete.
    2. Accept all tracked changes

Actual results:
The first table disappears correctly, the second does not.

Expected results:
The second table should be deleted as well.

LibreOffice details:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ee22d95d3e1e9ce1d2ff8311e51d600179370f9
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-24 14:58:32 UTC
Created attachment 174521 [details]
The example file with changes visible
Comment 2 NISZ LibreOffice Team 2021-08-24 14:58:51 UTC
Created attachment 174522 [details]
Screenshot of the problem in Writer after accepting all changes
Comment 3 László Németh 2021-08-25 13:21:09 UTC
Created attachment 174532 [details]
the test document with track changes
Comment 4 László Németh 2021-08-25 13:23:11 UTC
Note: I was able to reproduce the problem only with the DOCX export/import. ODT export/import worked without any problem. The ODT test file has been attached.
Comment 5 László Németh 2021-09-03 07:27:42 UTC
tdf144058 sw track changes: fix table deletion at paragraph join

Tracked paragraph join by table deletion left empty
table in the text after accepting the changes, caused
by the non-continuous redline range over the table,
related to the copying of the formatting of the first
paragraph to the (wholly or partially) removed paragraphs.
Fixed by skipping paragraph format copying in the case
of table paragraphs.

Note: this is not enough for tables with inner redlines,
where tracked paragraph join with deletion of such a table
still leaves an empty table at the place of the table
(a problem inherited from OOo).

Regression from commit 1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49
"tdf#119571 change tracking: show layout changes at paragraph join".
Comment 6 Commit Notification 2021-09-03 07:28:27 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf144058 sw track changes: fix table deletion at paragraph join

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 NISZ LibreOffice Team 2021-10-04 08:53:37 UTC
Veriefid in: 

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