Bug 162566 - Text incorrectly marked as moved and coloured green
Summary: Text incorrectly marked as moved and coloured green
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.3 release
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Track-Changes
  Show dependency treegraph
 
Reported: 2024-08-22 14:33 UTC by Matthew Kogan
Modified: 2024-10-09 19:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
GreenComparisonTest1.odt (12.63 KB, application/vnd.oasis.opendocument.text)
2024-08-22 14:33 UTC, Matthew Kogan
Details
GreenComparisonTest2.odt (12.14 KB, application/vnd.oasis.opendocument.text)
2024-08-22 14:33 UTC, Matthew Kogan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kogan 2024-08-22 14:33:04 UTC
Description:
Sometimes document comparison incorrectly marks text as moved and colours it green.

Steps to Reproduce:
1.Open GreenComparisonTest2.odt
2.Click Edit, Track Changes, Compare Document
3.Choose GreenComparisonTest1.odt

Actual Results:
The first instance of "(Northern Ireland) 2001" is marked as moved and coloured green.

Expected Results:
It should be marked as deleted and coloured the same as the other changes.


Reproducible: Always


User Profile Reset: No

Additional Info:
Also broken in 7.6.5 and 24.2.5.
Comment 1 Matthew Kogan 2024-08-22 14:33:36 UTC
Created attachment 195960 [details]
GreenComparisonTest1.odt
Comment 2 Matthew Kogan 2024-08-22 14:33:53 UTC
Created attachment 195961 [details]
GreenComparisonTest2.odt
Comment 3 Xisco Faulí 2024-09-16 09:31:24 UTC
Reproduced in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e6e7b8498aba69af8eee8edd1d3a1fb17c36836a
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

and

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 898d5d470e24a55556f2fb244fec24df33ba8855
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 4 Xisco Faulí 2024-09-16 09:33:04 UTC
Not reproduced in

Version: 7.0.7.0.0+
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 5 Buovjaga 2024-09-16 13:12:46 UTC
This started happening in 7.3 with f51fa7534421a195a58b4a737a2e836d8c25ba81
tdf#145718 sw, DOCX import: complete tracked text moving

Not sure if it's fair to call this a regression, but let's open the discussion.

Matthew has a workaround adding an option for this, but would be better to fix properly: https://gerrit.libreoffice.org/c/core/+/173127

Similarly, this option should be reverted in favour of a proper fix (when it is done): https://gerrit.libreoffice.org/c/core/+/157940
Comment 6 Commit Notification 2024-09-26 08:04:26 UTC
Matthew Kogan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2b68729253437600db43f5c24838677b963a8c2f

tdf#162566 sw: Make it optional for moved text to be displayed as green

It will be available in 25.2.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 Matthew Kogan 2024-10-07 13:22:06 UTC
This works well for me, and seems completely safe since it's just a hidden config option; please could it be back-ported to 24.8 and/or 24.2?
Comment 8 Buovjaga 2024-10-07 13:28:45 UTC
(In reply to Matthew Kogan from comment #7)
> This works well for me, and seems completely safe since it's just a hidden
> config option; please could it be back-ported to 24.8 and/or 24.2?

No, it should be fixed properly ASAP and the config workaround reverted.
Comment 9 László Németh 2024-10-07 14:34:05 UTC
OpenDocument doesn't support the difference between text moving and insertion/deletion, so this is only a visualization of the neighboring insertion/deletion contain the same (longer) text. So the name "moved" is not to be taken literally, but mostly yes. It's a huge help to speed up adoption of changes. (The next one would be to break the moved and changed insertions to show the same part in green. MSO has a quite difficult user interface for this)

So this feature is not the same, as in MSO (where sometimes full moved sentences aren't recorded as moved text, losing this feature).
Comment 10 László Németh 2024-10-09 19:57:20 UTC
@Matthew Cogan, Xisco, Buovjaga: Ah, following the steps of the test now, I realized, that this is really a bug. It's not allowed to show a deletion as green, if there is no insertion with the same text content (terminating spaces don't matter). The code checks this, but it seems, not flawlessly. A screenshot would have helped a lot, showing only Moved (deletion), but not Moved (insertion), because of thinking of the previous problem (using heuristics, so "moved" means "same text content"), I misunderstood the description. I am going to fix it. Thanks for noticing me again! :)