Download it now!
Bug 102619 - FILESAVE: Numbering style not saved correctly on DOCX export
Summary: FILESAVE: Numbering style not saved correctly on DOCX export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.2.0 target:6.1.0.2
Keywords: filter:docx
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2016-09-27 08:43 UTC by Gabor Kelemen
Modified: 2018-07-20 08:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document in odt (9.47 KB, application/vnd.oasis.opendocument.text)
2016-09-27 08:44 UTC, Gabor Kelemen
Details
Test document in docx (5.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-09-27 08:44 UTC, Gabor Kelemen
Details
Side by side view of the two docs - Numbering style setting (255.75 KB, image/png)
2016-09-27 08:45 UTC, Gabor Kelemen
Details
Side by side view of the two docs - Next style setting (285.81 KB, image/png)
2016-09-27 08:50 UTC, Gabor Kelemen
Details
Next Style in MSO2013 (23.55 KB, image/png)
2016-09-29 07:19 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2016-09-27 08:43:39 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier: 

I'm trying to create a Q&A sheet in Writer 5.3 alpha.

I defined two custom styles: 
Question has numbering style "List 1" with an arrow as bullet mark.
Answer has numbering style "List 2" with a check mark as bullet mark.

When saved to ODT or DOC these are retained, but when saved to DOCX the numbering style for both custom styles appears as "None".

The two styles are set as "Next style" for each other. After saving to DOCX the "Next style" is Question for both custom styles.

Reproducible: Always

Steps to Reproduce:
1. Open the attached documents
2. Go to Styles and Formatting, filter Custom Styles, right click on the  Question or Answer style, select Modify
3a. On the Outline & Numbering tab check the Numbering style for "Body text" outline level.
3b. On the Organizer tab check the Next style setting.
Actual Results:  
- Numbering style is None in the DOCX. When adding a new paragraph after Answer3, it should have the arrow bullet mark, but it has the check mark.

- Another problem is that the style of any new paragraphs is Question, instead of the expected Answer after a Question styled paragraph.

Expected Results:  
- Numbering style should be List 1 or List 2 in the DOCX too, not only in the ODT.

- Paragraph style should be Answer after a Question paragraph.




Reset User Profile?No
Comment 1 Gabor Kelemen 2016-09-27 08:44:12 UTC
Created attachment 127661 [details]
Test document in odt
Comment 2 Gabor Kelemen 2016-09-27 08:44:35 UTC
Created attachment 127662 [details]
Test document in docx
Comment 3 Gabor Kelemen 2016-09-27 08:45:48 UTC
Created attachment 127663 [details]
Side by side view of the two docs - Numbering style setting
Comment 4 Gabor Kelemen 2016-09-27 08:50:37 UTC
Created attachment 127664 [details]
Side by side view of the two docs - Next style setting

View of the Organizer panel, the Next Style settings don't match.
The Inherit from and Category fields don't match either.
Comment 5 Gabor Kelemen 2016-09-29 07:19:20 UTC
Created attachment 127715 [details]
Next Style in MSO2013

Opening the example document in MSO 2013 results in a correct Next Style being read.
Comment 6 Buovjaga 2016-10-12 12:14:39 UTC
Repro.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha0+
Build ID: e2f6c7f0d0cc14f851d7028ff846c5dc658a81c6
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-10_23:08:02
Locale: fi-FI (fi_FI); Calc: group

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 7 Justin L 2018-07-06 15:37:23 UTC
proposed fixes for Question's Follow:
https://gerrit.libreoffice.org/57074 tdf#102619 writerfilter: first create style, then set FollowStyle
https://gerrit.libreoffice.org/57075 ~NFC related tdf#102619 writerfilter: use ConvertStyleName()
Comment 8 Justin L 2018-07-06 16:32:52 UTC
The way DOCX numbering/lists are exported is garbage. Extremely complicated on the Microsoft side already, and then we need to emulate it to fit the LO model. A recipe for complete disaster.  Leaving the bug open for someone else to deal with that problem.
Comment 9 Commit Notification 2018-07-09 04:04:12 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=39a4f21fc4a16f7c57a9b6f1ddd5ce2953781576

tdf#102619 writerfilter: first create style, then set FollowStyle

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-07-10 04:10:28 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab16d43dd649b111e095a06f3b75ab77721830fe

~NFC related tdf#102619 writerfilter: use ConvertStyleName()

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-07-11 15:41:43 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d9e0874becde20d901fda561633202e2e478eff&h=libreoffice-6-1

backport combined tdf#95115 and tdf#102619: writerfilter

It will be available in 6.1.0.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Gabor Kelemen 2018-07-20 08:10:43 UTC
Looks like this can be closed, thanks!