Bug 81331 - FILESAVE: DOC list styles defined according to item identifier (i.e., character) rather than item text (i.e., paragraph) - OK in LO, not in MSO
Summary: FILESAVE: DOC list styles defined according to item identifier (i.e., charact...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
Depends on:
Blocks: DOC-Bullet-Number-Lists
  Show dependency treegraph
 
Reported: 2014-07-14 09:05 UTC by Murz
Modified: 2021-06-21 11:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file - save it to DOC for got described results (9.75 KB, application/vnd.oasis.opendocument.text)
2014-07-14 09:05 UTC, Murz
Details
Example file that already saved to DOC (10.00 KB, application/msword)
2014-07-14 09:06 UTC, Murz
Details
Next example with 2 styled lists (in ODT format, save it to DOC) (11.83 KB, application/vnd.oasis.opendocument.text)
2014-07-14 09:10 UTC, Murz
Details
Example DOC compared LO MSO (58.17 KB, image/png)
2020-04-01 06:05 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Murz 2014-07-14 09:05:21 UTC
Created attachment 102755 [details]
Example file - save it to DOC for got described results

When I working with numbering list and try to individually format some items, all works well if I saving to ODT format. 

But when I save to DOC (MS Word) format, all list is formatted with only one individual style, so all other styles are lost.

How to reproduce:

1. Create new LibreOffice Writer document.

2. Create numbering list in it:
---
1. Item 1
2. Item 2
3. Item 3
4. Item 4
---

3. Select via mouse text from start of text "Item 2" to end of "Item 3" (screenshot http://i.imgur.com/zelOsvx.png ) and apply bold style (Ctrl+B) - you will got list with "2." and "3." numbers via Bold style, but "1." and "4." without Bold (screenshot http://i.imgur.com/AKbKrS6.png)

4. Save this document as ODT, close and open again - all styles here without changes (this file is attached to issue).

5. Save this document as DOC, close and open again - you will see that all list numbers goes Bold - screenshot http://i.imgur.com/RE5NSTr.png

But Bold must be only 2 and 3 items. Same problem with Italic formatting and other formatting too.

So custom item styles is applied to all items in list when exporting to MS Office DOC format.

---

Described howto is only example how to reproduce, when working with styling and numbering list - this bug is very annoying, because it broke all document styles in lists.

After investigating this issue I see that LibreOffice creates styles like
WW8Num1z0 WW8Num1z1 ...  WW8Num1z8
WW8Num2z0 WW8Num2z1 ...  WW8Num2z8

and your list will be formatted via only one WW8Num1z0 style.

---

Is this issue reproducible on other users? Can we fix it?
Comment 1 Murz 2014-07-14 09:06:02 UTC
Created attachment 102756 [details]
Example file that already saved to DOC
Comment 2 Murz 2014-07-14 09:10:13 UTC
Created attachment 102757 [details]
Next example with 2 styled lists (in ODT format, save it to DOC)

Here is another example that demonstrates the problem with 2 numbered lists - screenshot is here http://i.imgur.com/dtvimOY.png
Comment 3 Urmas 2014-07-14 13:20:59 UTC
The formatting of list items in DOC file appears shifted by 1 item backwards in Word.
Comment 4 Owen Genat (retired) 2014-08-01 06:30:20 UTC
(In reply to comment #0)
> When I working with numbering list and try to individually format some
> items, all works well if I saving to ODT format. 
> 
> But when I save to DOC (MS Word) format, all list is formatted with only one
> individual style, so all other styles are lost.

> After investigating this issue I see that LibreOffice creates styles like
> WW8Num1z0 WW8Num1z1 ...  WW8Num1z8
> 
> and your list will be formatted via only one WW8Num1z0 style.

This is because the MS Binary / OOXML formats do not support named list styles (these are defined in ODF only). Refer this thread for further detail:

http://ask.libreoffice.org/en/question/36453/why-are-my-list-styles-renamed-as-wwnumn-when-converting-from-odt-to-docx/

There is nothing LO can do about this. I think this bug can be RESOLVED as NOTABUG.
Comment 5 Murz 2014-08-01 07:02:38 UTC
Owen Genat, thanks for the info, very useful.
As I understand, main problem is "OOXML doesn't support named numberings", so this issue can not be fully solved, but list of related problems can be minimized.

Main and very annoying problem is when user mark only one item of long list as bold/italic in ODT, in DOC file we got all list styled with this one item style.

So if I use list with 100 items, and mark item 91 as bold, in DOC I will see all list with bold style, this is the main problem. Losting style of item #91 is not so serious problem.

If we cannot store style info for separate item, why we style all list via style of separate item?

Can we cleanup all custom styles of items in list and use defaul style (or first item style) for all list when exporting to DOC? 

This way will considerably decrease described problem and minimize visible differences in odt and doc file.
Comment 6 Owen Genat (retired) 2014-08-09 12:38:17 UTC
(In reply to comment #5)
> Main and very annoying problem is when user mark only one item of long list
> as bold/italic in ODT, in DOC file we got all list styled with this one item
> style.

Thanks for clarifying the issue. One thing to note is that the provide ODT examples do not use list styles e.g., ListN or NumberingN.

The WWNumN list styles appear to be created by the DOC export filter according to the formatting of the identifier, rather than the list item. Attachment 102755 [details] only has bold and regular identifiers, thus WWNum1 (bold) is created when saving that attachment to DOC format. The result however is that all list items end up with bold identifiers and thus use the WWNum1 list style.

In attachment 102757 [details] there are bold, italic, and regular identifiers and again, saving this file to DOC results in three list styles. The styles however in the DOC appear to be WWNum2 (bold+italic), and WWNum3 (Bold) in keeping with the resultant identifier appearance.

This explains why, when one of these WWNumN styles is subsequently modified, it affects numerous list items. Exactly why there is a difference between identifier display and apparent definition in the ODT and that in the DOC is unclear. I must admit however that I find list style definitions in DOC/DOCX difficult to determine so this bug really needs a developer to assess it and see what (if anything) is feasible.

This report is therefore not so much about the naming of the WWNumN list styles as it is about how list styles of this type (name) are defined / translated when saving to DOC. I am therefore going to confirm this. Status set to NEW. Summary edited for clarity. Apologies for any initial misunderstanding of the issue.
Comment 7 QA Administrators 2015-09-04 02:47:37 UTC Comment hidden (obsolete)
Comment 8 Murz 2016-02-25 05:19:06 UTC
The bug is still here on Libreoffice Version: 5.0.0.3.
Comment 9 QA Administrators 2017-03-06 14:52:34 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2020-04-01 03:34:53 UTC Comment hidden (obsolete)
Comment 11 Timur 2020-04-01 06:05:01 UTC
Created attachment 159205 [details]
Example DOC compared LO MSO

As seen, saved DOC number formats are OK when reopen in LO 7.0+ but not in MSO. DOCX is fine.
Comment 12 Justin L 2021-04-21 10:57:06 UTC
This sounds like it will get fixed in LO 7.3 with bug 108518's patch.
Comment 13 Justin L 2021-06-21 11:54:21 UTC
(In reply to Murz from comment #0)
> 5. Save this document as DOC, close and open again - you will see that all
> list numbers goes Bold - screenshot http://i.imgur.com/RE5NSTr.png
This part is fixed in 7.3.

Since this is the essence of the bug report, I'll mark it as fixed.