Bug 150197 - number lost (after assigning numbering to style) when exporting to DOCX
Summary: number lost (after assigning numbering to style) when exporting to DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: All All
: high major
Assignee: Justin L
URL:
Whiteboard: target:7.5.0 target:7.4.1 target:7.3.6
Keywords: bibisected, bisected, regression
: 148690 (view as bug list)
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2022-07-29 17:19 UTC by Justin L
Modified: 2022-08-23 15:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2022-07-29 17:19:27 UTC
Steps to reproduce:
1.) Open attachment 167206 [details].
2.) Change paragraph style Heading 2 to use Outline and List, List Style to a numbering style like "Numbering 123". Notice numbering on the first paragraph.
3.) Save as DOCX/DOC/RTF
4.) reload the document. The numbering is missing (although the numbering style is still there and appears active).

This started in LO 7.3 (and was backported to 7.2.4) with
author	Vasily Melenchuk on 2021-11-05 10:54:47 +0100
commit e0b41fcb56e51f20684da4ba44d7ed6e0e1a3234
   tdf#144668: docx export: simpler way to create lvlText in numberings

Found using bibisect-linux-64-7.3. The last good was
bibisect commit:b0a3393e5bfa13d8592d333aae8cc2be35360889
    source sha:4a7022c199addb1fbc7445708c0f4801fbf1e47f

Export started crashing on Vasily's commit
bibisect commit"0956f199b8a4253aa4cfade66fd758d643334a34
    source sha: e0b41fcb56e51f20684da4ba44d7ed6e0e1a3234

until that was repaired by Caolan with
bibisect commit91c9f8a1681e004d4cb0bad7034b86c19a51831f
    source sha: efd2510e225232ac35707a3ed55b83be9fa046af
Comment 1 raal 2022-07-29 18:58:03 UTC
Confirm with Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: c4f7043c593823b8c5605e779371ff430659eb20
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 Justin L 2022-07-29 19:29:43 UTC
if we KNOW that this will just be a simple entry, we could just add something like

else
    sNumStr = rFormat.GetPrefix() + (SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() ? rtl::OUStringChar(static_cast<char>(nLvl)) : "") + rFormat.GetSuffix();

Otherwise, I assume we just bring back the old behaviour.
Comment 3 John 2022-07-30 11:20:54 UTC
I have read what was written -- I have to keep an old version running as this is a critical issue to my business.  Any fix is appreciated.
Comment 4 Justin L 2022-07-30 14:27:58 UTC
Proposed fix at http://https://gerrit.libreoffice.org/c/core/+/137632
Comment 5 Commit Notification 2022-08-01 11:25:50 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#150197 sw: NONE numbering still returns prefix/suffix

It will be available in 7.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 6 Commit Notification 2022-08-01 14:41:51 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/56d5a31d6ec2b45e43659be4b5fd4964de29e61f

tdf#150197 sw: convert pre-defined num styles to ListFormat

It will be available in 7.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 7 Commit Notification 2022-08-01 20:54:30 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#150197: SwWrtShell::NumOrBulletOn should SetListFormat

It will be available in 7.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 8 Commit Notification 2022-08-01 21:42:48 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/654454a32bd6dc40d131861fab5dbe0a9111a7c3

related tdf#150197 editeng: clear oListFormat on SetListFormat()

It will be available in 7.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 9 Justin L 2022-08-01 21:44:03 UTC
backport in progress for 7.4 and 7.3.
Comment 10 Commit Notification 2022-08-02 00:02:25 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#150197: sd should SetListFormat

It will be available in 7.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 11 Gabor Kelemen (allotropia) 2022-08-02 10:51:38 UTC
*** Bug 148690 has been marked as a duplicate of this bug. ***
Comment 12 Commit Notification 2022-08-06 00:38:54 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/68e173760d6cc5dd80384b231428d8d9a658d4b9

tdf#150197 sw: convert pre-defined num styles to ListFormat

It will be available in 7.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 13 Commit Notification 2022-08-08 12:17:03 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/4663cde12ae413ca06c5799095a213950b83c2d6

tdf#150197 sw: convert pre-defined num styles to ListFormat

It will be available in 7.3.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.
Comment 14 Commit Notification 2022-08-11 14:13:18 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/727c5ed30f68abc28bb04531b25a1df30810760f

related tdf#150197: use SetListFormat instead of SetPrefix/Suffix

It will be available in 7.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 15 Commit Notification 2022-08-12 14:28:36 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/835cda561217bd8c53af2de927158dd5712b06c0

related tdf#150197: use SetListFormat or SetPrefix/Suffix

It will be available in 7.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 16 Commit Notification 2022-08-18 13:35:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1ad2d1336a3f82e13e2bdfe979154c3a8c936ed6

related tdf#150197 doc import: ANLV - always SetListFormat

It will be available in 7.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 17 Commit Notification 2022-08-23 15:53:18 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/285f5306d75892963707b64a3782850c80d4a315

related tdf#150197 doc import: ANLV2 - always SetListFormat

It will be available in 7.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.