Bug 138038

Summary: FILEOPEN DOCX Change tracked TOC addition incorrectly imported
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: László Németh <nemeth>
Status: ASSIGNED ---    
Severity: normal CC: aron.budea, nemeth
Priority: medium Keywords: filter:docx
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=150085
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 115709    
Attachments: Example file from Word
Screenshot of the original document side by side in Word and Writer
Screenshot of the original document side by side in Word and Writer after rejecting the change
Example DOC saved in MSO from DOCX

Description NISZ LibreOffice Team 2020-11-06 13:03:46 UTC
Created attachment 167059 [details]
Example file from Word

Attached example document contains a TOC that was added in Word after enabling change tracking.
This is imported incorrectly, since rejecting the change does not make the TOC disappear, only its title.

Steps to reproduce:
    1. Add in Word a few heading paragraphs
    2. Enable change tracking
    3. Insert a TOC
    4. Save as DOCX, open in Writer
    5. Reject the change.

Actual results:
TOC title disappears, TOC contents stays.

Expected results:
All of the TOC removed when the change is rejected.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: eeed9103350d886f5913aed9b525d863a421dffa
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Also in:
Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: en-US (hu_HU); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 NISZ LibreOffice Team 2020-11-06 13:04:04 UTC
Created attachment 167060 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 NISZ LibreOffice Team 2020-11-06 13:04:17 UTC
Created attachment 167061 [details]
Screenshot of the original document side by side in Word and Writer after rejecting the change
Comment 3 Timur 2020-11-09 12:35:58 UTC
Created attachment 167131 [details]
Example DOC saved in MSO from DOCX

Repro. Both for DOCX ans MSO created DOC (let's keep it here so far).