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: 2019-09-06 15:49 UTC (History)
4 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

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