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.
Created attachment 149721 [details]
Compare "wd-ippauth-20190304.odt" against this file
Created attachment 149723 [details]
PDF of what I'm seeing when I export the comparison to PDF
Documents can be fetched from here as well:
This was produced by following the bug's instructions:
Thank you for reporting the bug. I can confirm the bug present in
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
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.
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
@@ -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.
Created attachment 153994 [details]
"Section 3.3 Exceptions" became normal text in LO 220.127.116.11
Created attachment 153995 [details]
"Section 3.3 Exceptions" keeps its style in LO master
Created attachment 153996 [details]
"Section 3.3 Exceptions" keeps also its numbering in Hide Changes/mode and after acception in LO master