Bug 131649

Summary: TOC gets empty title line when there's no title - only in DOCX
Product: LibreOffice Reporter: Eyal Rozenberg <eyalroz1>
Component: filters and storageAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: medium    
Version: 6.4.0.3 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104524    
Attachments: Document exhibiting the bug

Description Eyal Rozenberg 2020-03-28 17:28:43 UTC
Description:
When a .docx file is opened (or saved?), and has an empty title, the title somehow gets an extra 0x000A which later appears as a TOC title line.

Steps to Reproduce:
Consider the attached .docx document.

The document has no title in its properties (nor any text in the Title style). If you update its TOC, however, an empty title line appear. If you then "Edit Index" on it (e.g. via a right-click), you'll see the title text is a 0x000A. Yes, a 4-letter hex code box for your UX pleasure... if you delete that character, the title line disappears. This can _not_ be repeated immediately, but if you save the file, close and reopen - it is again repeatable once.




Actual Results:
See above.

Expected Results:
See above.


Reproducible: Always


User Profile Reset: No



Additional Info:
If you save the file as an .odt - you won't get this behavior when you open the file anew.
Comment 1 Eyal Rozenberg 2020-03-28 17:29:50 UTC
Created attachment 159102 [details]
Document exhibiting the bug

Note the empty TOC title line will not appear until you right-click, then Update Index on the TOC.
Comment 2 Timur 2020-03-31 07:36:38 UTC
DOCX is saved by LO. Invalid report. Only acceptable is ODT source or MSO created DOC/X.
Comment 3 Timur 2020-03-31 07:38:29 UTC
If you can reproduce with ODT saved in recent LO (best try master) as DOCX, feel free to set Unconfirmed.
Comment 4 Eyal Rozenberg 2020-03-31 17:37:07 UTC
(In reply to Timur from comment #2)
> DOCX is saved by LO. Invalid report. Only acceptable is ODT source or MSO
> created DOC/X.

I don't understand this comment. Why is a docx created by LO "invalid" as an example?

> If you can reproduce with ODT saved in recent LO (best try master) as DOCX, feel free to set Unconfirmed.

I'll try to reproduce with a recent LO.