Bug 129402

Summary: ToC and its title in a DOCX imported wrong
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Mike Kaganski <mikekaganski>
Status: VERIFIED FIXED    
Severity: normal CC: anonim288
Priority: medium Keywords: regression
Version: 3.6.0.4 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=129353
https://bugs.documentfoundation.org/show_bug.cgi?id=77129
https://bugs.documentfoundation.org/show_bug.cgi?id=92786
https://bugs.documentfoundation.org/show_bug.cgi?id=130214
https://bugs.documentfoundation.org/show_bug.cgi?id=134614
Whiteboard: target:6.5.0 target:6.4.1 target:6.3.5
Crash report or crash signature: Regression By:
Attachments: A testdoc from unit test for tdf#77129

Description Mike Kaganski 2019-12-14 09:11:49 UTC
Created attachment 156585 [details]
A testdoc from unit test for tdf#77129

Open attachment 97029 [details] from tdf#77129, or the testdoc attached here, which is from [1].

Look at the table of contents:
1. The title "Contents" is imported "Content", losing the last character.
2. There is a page break after the title, absent when opening in Word
3. The entries of the ToC are imported outside of the ToC field, as normal paragraphs.

Tested with Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

[1] https://opengrok.libreoffice.org/xref/core/sw/qa/extras/ooxmlexport/data/fdo77129.docx?r=9948d956
Comment 1 Mike Kaganski 2019-12-14 09:29:03 UTC
https://gerrit.libreoffice.org/85089
Comment 2 Commit Notification 2019-12-16 16:25:20 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5cdb14345842c07eb1a466897753da910e9488f8

tdf#129353, tdf#129402: fix node creation on index import

It will be available in 6.5.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 3 Commit Notification 2020-01-09 07:19:50 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/e76fcb8f169acac3d81bdaf9b126cc4c98e2eb8e

tdf#129353, tdf#129402: fix node creation on index import

It will be available in 6.4.1.

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 4 Commit Notification 2020-01-09 11:16:28 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/3018dcbf12fe96e57fe52dc1b2d7a1235b480eef

tdf#129353, tdf#129402: fix node creation on index import

It will be available in 6.3.5.

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 5 Timur 2020-01-09 12:26:08 UTC
I set Verified. 
Seems regression from 3.6, looked OK in Lo 3.5, with different problems later. 
Thanks Mike for fixing this oldie.
Comment 6 Timur 2020-01-09 12:33:11 UTC
Mike, can you please see why "How" is seen in ToC on fileopen, and only Update changes to "Abstract".
Comment 7 Mike Kaganski 2020-01-09 12:37:51 UTC
(In reply to Timur from comment #6)

Because it's the custom text put there, which is preserved on import :-)
Comment 8 Timur 2020-01-09 12:42:08 UTC
*** Bug 117547 has been marked as a duplicate of this bug. ***