Bug 124106 - "Y" is inserted ahead of ToC when its title is empty, when saving to DOCX
Summary: "Y" is inserted ahead of ToC when its title is empty, when saving to DOCX
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.3.0 target:6.2.3 target:6.1.6
Keywords: bibisected, bisected, regression
Depends on: 121456
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-15 19:03 UTC by Mike Kaganski
Modified: 2019-04-09 09:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ToC with empty title (5.13 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-03-15 19:03 UTC, Mike Kaganski
Details
Actual ODT with ToC without title (8.74 KB, application/vnd.oasis.opendocument.text)
2019-03-16 17:08 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-03-15 19:03:21 UTC
Created attachment 150006 [details]
ToC with empty title

Saving the attachment as DOCX and reopening, a "Y" is inserted before ToC. This is just a new Writer document, where a heading paragraph is added, and a ToC is inserted, with ToC's Title emptied.

Version: 6.2.2.1 (x64)
Build ID: fcd633fb1bf21b0a99c9acb3ad6e526437947b01
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL
Comment 1 Mike Kaganski 2019-03-15 19:45:34 UTC
Regression after https://git.libreoffice.org/core/+/ff4f2ba3242d303f7f238a7a142440f1f4b1f288
Comment 2 Julien Nabet 2019-03-16 15:34:50 UTC
Would it be possible you attach the original odt file?
Indeed, I created a brand new file by following these steps:
- Launch Writer
- type h1 + Enter
- Select h1 line and choose Heading 1 style
- put cursor at the beginning of doc
- insert TOC
- save in odt format first
- save in docx format
- close LO
- open docx
=> no "Y" before TOC.
Comment 3 Mike Kaganski 2019-03-16 17:08:49 UTC
Created attachment 150015 [details]
Actual ODT with ToC without title

(In reply to Julien Nabet from comment #2)
> Would it be possible you attach the original odt file?

Oh - it was intended that I attach the ODT - I even wrote "Saving the attachment as", implying that one needs to change format... but apparently I selected the wrong file :-D Sorry for that.
Comment 4 Julien Nabet 2019-03-17 11:39:04 UTC
No pb, only those who do nothing... :-)
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 5 Serge Krot (CIB) 2019-04-08 08:05:06 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e47a5543f4b8c9e317d1e43af8c0e5a732e461fd%5E%21

tdf#121456 sw: DOCX: fix loading of empty TOC title

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Xisco Faulí 2019-04-09 09:32:07 UTC
For some reason, all the commit notification messages are missing...
All commit in gerrit -> https://gerrit.libreoffice.org/#/q/tdf%2523121456
Comment 7 Mike Kaganski 2019-04-09 09:34:30 UTC
(In reply to Xisco Faulí from comment #6)
> For some reason, all the commit notification messages are missing...

... maybe because they all reference tdf#121456, not this tdf#124106 ? ;-)
Comment 8 Xisco Faulí 2019-04-09 09:36:27 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 040a54d89e8ca33171e86647ced8dc58efd85fbe
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Serge Krot, thanks for fixing this issue!
Comment 9 Xisco Faulí 2019-04-09 09:37:29 UTC
(In reply to Mike Kaganski from comment #7)
> (In reply to Xisco Faulí from comment #6)
> > For some reason, all the commit notification messages are missing...
> 
> ... maybe because they all reference tdf#121456, not this tdf#124106 ? ;-)

ahh, stupid me, thanks for the clarification...