Bug 123848 - "Compare Document": Changes misrepresented as new document sections
Summary: "Compare Document": Changes misrepresented as new document sections
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Document-Comparison
  Show dependency treegraph
 
Reported: 2019-03-04 17:56 UTC by Smith Kennedy
Modified: 2024-02-10 03:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Open this one first (646.42 KB, application/vnd.oasis.opendocument.text)
2019-03-04 17:56 UTC, Smith Kennedy
Details
Compare "wd-ippauth-20190304.odt" against this file (618.53 KB, application/vnd.oasis.opendocument.text)
2019-03-04 17:57 UTC, Smith Kennedy
Details
PDF of what I'm seeing when I export the comparison to PDF (1.54 MB, application/pdf)
2019-03-04 17:57 UTC, Smith Kennedy
Details
"Section 3.3 Exceptions" became normal text in LO 6.0.7.3 (104.61 KB, image/png)
2019-09-06 15:45 UTC, László Németh
Details
"Section 3.3 Exceptions" keeps its style in LO master (125.74 KB, image/png)
2019-09-06 15:47 UTC, László Németh
Details
"Section 3.3 Exceptions" keeps also its numbering in Hide Changes/mode and after acception in LO master (67.46 KB, image/png)
2019-09-06 15:49 UTC, László Németh
Details
Comparison compared in LO versions (376.68 KB, image/png)
2021-06-04 09:02 UTC, Timur
Details
Comparison result when setting By word (140.19 KB, image/png)
2022-02-09 22:51 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Smith Kennedy 2019-03-04 17:56:01 UTC
Created attachment 149720 [details]
Open this one first

When two revisions of one of our specification documents are compared using "Edit" --> "Compare Document", some changes are mislabeled to be in a different section, which makes review (online or offline) very difficult.

I have tried to move our organization (IEEE ISTO Printer Working Group) to LibreOffice from Microsoft Word, but the document comparison limitations seen in these cases makes it very hard to work with "-rev" revision document reviews.

Reproducing the problem:

1. Open the attached "wd-ippauth-20190304.odt" document.

2. Do "Edit" --> "Compare Document", and choose the other attached document "wd-ippauth-20190117.odt"

3. Make note of the sections and formatting. One area to watch is the sections on page 15 (section 3.2 - 3.3).

4. Do "File" --> "Save as...", and save the new document as a different document.

5. Go to page 15

Expected behavior: No new sections will have been created.
Actual behavior: A section 3.3 with all strikethrough text will be created. The new section numbers throw everything off.
Comment 1 Smith Kennedy 2019-03-04 17:57:12 UTC
Created attachment 149721 [details]
Compare "wd-ippauth-20190304.odt" against this file
Comment 2 Smith Kennedy 2019-03-04 17:57:53 UTC
Created attachment 149723 [details]
PDF of what I'm seeing when I export the comparison to PDF
Comment 3 Smith Kennedy 2019-03-04 19:09:31 UTC
Documents can be fetched from here as well:

https://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippauth-20190304.odt
https://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippauth-20190117.odt

This was produced by following the bug's instructions:
https://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippauth-20190304-rev.pdf
Comment 4 Durgapriyanka 2019-03-05 17:05:03 UTC
Thank you for reporting the bug. I can confirm the bug present in

Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 5 Buovjaga 2019-04-07 20:05:34 UTC
Bibisected with win32-6.2 to https://gerrit.libreoffice.org/plugins/gitiles/core/+/22639148ae5400bac98f32a75d7431b857c80195%5E!/

tdf#54819 change tracking: keep paragraph style after full deletion

Adding Cc: to László Németh

I did not have to save the document to see the problem. I just closed the dialog after comparing and went to see the section 3.3.
Comment 6 László Németh 2019-09-06 15:42:50 UTC
Adding Cc: to Michael Stahl

Note: this is not a real regression, because the sections were never correct: the problem was the their removing previously, see the attached screenshots.

My bibisected commit was reverted, but the problem still exists.

When I revert my other changes with the following patch, saving still changes the style of the deletion (likely according to the new redline changes made by Michael Stahl):

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 2372429afc70..ef8030ce6b5a 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2012,7 +2012,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
             {
                 if ( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
                 {
-                    if ( pStt->nContent != 0 )
+                    if ( 0 && pStt->nContent != 0 )
                     {
                         // tdf#119571 update the style of the joined paragraph
                         // after a partially deleted paragraph to show its correct style

In my opinion, the problem was bigger previously, because the actual text formatting has changed: accepting the changes resulted losing of paragraph formatting. For example, "chapter 3.3 Exceptions" became a normal paragraph.
Comment 7 László Németh 2019-09-06 15:45:46 UTC
Created attachment 153994 [details]
"Section 3.3 Exceptions" became normal text in LO 6.0.7.3
Comment 8 László Németh 2019-09-06 15:47:35 UTC
Created attachment 153995 [details]
"Section 3.3 Exceptions" keeps its style in LO master
Comment 9 László Németh 2019-09-06 15:49:13 UTC
Created attachment 153996 [details]
"Section 3.3 Exceptions" keeps also its numbering in Hide Changes/mode and after acception in LO master
Comment 10 Timur 2021-06-04 09:02:06 UTC
Created attachment 172606 [details]
Comparison compared in LO versions

Per screenshot, comparison is NOK in 7.2+.
But problem arose in LO 3.6 which is major regression bug 71155.
Comment 11 Gabor Kelemen (allotropia) 2022-02-09 22:51:45 UTC
Created attachment 178178 [details]
Comparison result when setting By word

This also depends on what is selected on the Options - Writer - Comparison tab.
Default is Auto, the wrong behavior happens mostly because of that.
Selecting By word is giving a result more like in 3.5 as seen on attachment  172606 [details]
Comment 12 QA Administrators 2024-02-10 03:13:23 UTC
Dear Smith Kennedy,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug