Bug 131649 - TOC gets empty title line when there's no title - only in DOCX
Summary: TOC gets empty title line when there's no title - only in DOCX
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-TableofContents
  Show dependency treegraph
 
Reported: 2020-03-28 17:28 UTC by Eyal Rozenberg
Modified: 2020-03-31 17:37 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document exhibiting the bug (9.50 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-28 17:29 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this 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.