Bug 146244 - FILEEDIT ODT Writing in a deleted table row doesn't update the tracked changes, e.g. removing the row change (keeping that in the export, too)
Summary: FILEEDIT ODT Writing in a deleted table row doesn't update the tracked change...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2
Keywords: filter:odt
Depends on:
Blocks: Track-Changes-Table
  Show dependency treegraph
 
Reported: 2021-12-15 14:29 UTC by NISZ LibreOffice Team
Modified: 2022-01-04 13:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem (5.13 KB, image/jpeg)
2021-12-15 14:31 UTC, NISZ LibreOffice Team
Details
Example file from Writer (13.79 KB, application/vnd.oasis.opendocument.text)
2021-12-15 14:31 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-12-15 14:29:35 UTC
Description:
You can enter new text on the deleted line, but this does not cancel the deletion. In fact, it is even written to the file when saving

Steps to Reproduce:
1. Open attached file
2. Turn track changes on
3. Delete a row
4. Write some text in it

Actual Results:
Writer doesn’t update row deletion

Expected Results:
Writer should update deletion of the row


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5242061cca5332ec15cce8c76f070d16e857445d
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 1 NISZ LibreOffice Team 2021-12-15 14:31:34 UTC
Created attachment 176951 [details]
Screenshot of the problem
Comment 2 NISZ LibreOffice Team 2021-12-15 14:31:59 UTC
Created attachment 176952 [details]
Example file from Writer
Comment 3 Commit Notification 2021-12-17 13:03:31 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c028b7e41e3d350d0e67005b16faf0159cc5c12

tdf#146244 sw: update HasTextChangesOnly in modified rows

It will be available in 7.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 4 Commit Notification 2021-12-21 07:53:13 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/02b8bcf06c431ea4694d9fe13d6aa59100c79c05

tdf#146244 sw: update HasTextChangesOnly in modified rows

It will be available in 7.3.0.0.beta2.

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 László Németh 2021-12-21 07:59:09 UTC
tdf#146244 sw: update HasTextChangesOnly in modified rows

It's not forbidden to write in rows deleted or
inserted with change tracking, also Accept/Reject
only part of the text changes here. Improve to
handle these in SwTableLine::UpdateTextChangesOnly()
by keeping property HasTextChangesOnly = false
(tracked row change) only if

1) there is an insert redline, which is the oldest redline in
   the row (tracked row insertion) or

2) there is a delete redline, which is the newest redline in
   the row, and no text outside of redlines, and no insert
   redline in the row, i.e. whole text content is deleted
   (tracked row deletion).

Also update HasTextChangesOnly table row property at accepting
SwRangeRedlines in changed table rows.

And follow-up bug fix commits of this:
commit bc206f7fd3b4a9e843c81f39dcd2faeeff9c785a
"cid#1495785 silence Unchecked return value" and
commit 213173edc5e47bb6da11f9a301f4dca71854a48c
"sw: fix crash with commit 8c028b7e41e3d350d0e67005b16faf0159cc5c12".
Comment 6 Commit Notification 2021-12-21 14:31:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1edaee2f03bce0efa409c592919458658d0aa751

tdf#146244 sw: fix Undo of accepting table row insertion

It will be available in 7.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 7 NISZ LibreOffice Team 2022-01-04 13:05:02 UTC
Verified in:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 8f0ce842dffe229d31bd9841ac6e999da1ae976d
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL