During export of the ODT file with TOC inside into DOCX format, the TOC title is being exported as regular paragraph. We should surround it with <w:sdt><w:sdtPr><w:sdtContent> to make it (TOC title) recognizable by MS Word as part of the TOC. See test case: https://bugs.documentfoundation.org/attachment.cgi?id=146681
https://gerrit.libreoffice.org/#/c/63786/
Serge Krot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/1575b46276a44fe0566fec8910188a781589dd75%5E%21 tdf#121561: sw: DOCX: add std/stdPr/stdContent around TOC 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.
A polite ping to Serge Krot: Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing? Thanks
Resolved fixed in https://gerrit.libreoffice.org/#/c/63786/ for master.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/1898bd6d5642ff81a09c2a9b6397ae145c3cfd8c%5E%21 tdf#121561: sw: DOCX: add std/stdPr/stdContent around TOC It will be available in 6.2.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.
When LO-saved DOCX is opened in MSO, previously ToC title was out of ToC. Now title is inside ToC and we can change the style and have "Update Table...". But "Update Table..." doesn't work properly. If we do it in MSO on MSO created DOCX, we get dialog: Update page numbers only/Update entire table. If we do it in MSO on LO created DOCX (using attachment), ToC title gets separated from ToC contents. Next click giver error "There's no ToC.." Please check.
Yes, I agreed. The problem comes from that fact that latest paragraph of the TOC field (where field-end keyword is placed) was exported outside the STD frame. Fixing thin, will make correct behavior with MSO and LO.
Thanks for clarification. Shall we reopen this one if you intend to solve it, or open a new bug?
Serge Krot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/fd5599b9d23a2d9b13af6dd88bd2d38f438f7e00%5E%21 tdf#121561 sw DOCX: output toc-end inside last toc paragraph 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.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/e65b94e64315e2ead72679010c73561f79247002%5E%21 tdf#121561 sw DOCX: output toc-end inside last toc paragraph It will be available in 6.2.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.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-1": https://git.libreoffice.org/core/+/05a5037f489971676737808c37ad1cfb9dcd53d9%5E%21 tdf#121561 sw DOCX: output toc-end inside last toc paragraph It will be available in 6.1.6. 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.
Very nice to solve such a long standing bug and backport all.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-1-5": https://git.libreoffice.org/core/+/a3ee3432dc7f9db2cec62daccc76f5e89dfe9459%5E%21 tdf#121561 sw DOCX: output toc-end inside last toc paragraph It will be available in 6.1.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.