Docx files created in MS word (2019) which includes styles that have bulleting / numbering as part of the style lose the bullet / number part of the style when opened in Writer.
Steps to Reproduce:
1. Create new Docx in MS Word
2. Define a style which includes a Bullet/Number
3. Open in Writer
4. Open styles pane and apply style
No bullet/number is applied as part of the style. Style definition is missing the bullet/number part.
If you then save as a new Docx file from Writer and open in MS Word the bullet/number is also missing from the style.
Bullet/number should be retained as part of the style.
User Profile Reset: Yes
Version: 126.96.36.199 (x64)
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 16; OS: Windows 10.0; UI render: GL; VCL: win;
Locale: en-AU (en_AU); UI-Language: en-GB
Have also tried latest release with same results:
Version: 188.8.131.52 (x64)
Build ID: 4d224e95b98b138af42a64d84056446d09082932
CPU threads: 16; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win;
Locale: en-AU (en_AU); UI-Language: en-GB
Created attachment 158661 [details]
Simple example file which causes the bug
RTF files are similarly affected. However, doc files are not.
Created attachment 158672 [details]
printscreen from LO 7
Looks good to me with Version: 184.108.40.206.alpha0+
Build ID: a11c10a83f6fceae6cfb519725d06f8eaf1013fb
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Please compare with Word, if it's still wrong attach printscreen from Word.
Created attachment 158705 [details]
Comparison of styles between original MSO docx and LO docx
See attached image showing the comparison between the original .docx file created in MS Word and the output .docx after converting from docx -> odt -> docx (Using latest build of LO7).
The content is unaffected. However in the Styles section you can see that MyBulletStyle and MyNumberStyle have lost the bullet/number part of the style during the conversion.
[Automated Action] NeedInfo-To-Unconfirmed
(In reply to Michelle from comment #0)
> Actual Results:
> No bullet/number is applied as part of the style. Style definition is
> missing the bullet/number part.
I can confirm that with
Version: 220.127.116.11.alpha0+ (x64)
Build ID: 5dcbd1bb557450a2d658a710c163b310c0cee157
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win;
Locale: de-DE (de_DE); UI-Language: en-GB
But if I open the format dialog to change MyBulletStyle in MS Word (I use 2016), it has also no numbering. I can set a numbering format to that style, but when I press OK and open style format again it seems, that Word doesn't save that setting.
So in sum I would say NOTOURBUG.
I confirm the bug as fileopen (test 7.0+ in Win).
What may confuse in LO: while it looks OK, it's not, styles really don't have numbering, can be seen if applied on empty paragraph.
What may confuse in MSO: Modify Style - Format - Numbering doesn't mark applied bullet/numner, but it is applied, as seen in Modify Style descriptipo which says "Bulleted" or "Numbered".
Interesting that bullet and numbering styles worked in LO 4.3, so regression from 4.4.
So many regressions...
The regression in LO 4.4 was from commit e49d2b31fb2020d065b4ad940d1031d07b10f32b
Author: Vinaya Mandke CommitDate: Tue Jun 10 09:57:45 2014 +0200
fdo#78939 [DOCX] Hang while opening due to incorrect modification of Style
modifies the referenced style of the numbering rule to use the current numbering rule. Actually the referenced style is not supposed to be modified.
As the numbering level format only uses that properties particular style, which may or may not be a numbering style.
For this Particular document the numbering format refers the "Default Style" (Normal). Almost all of the styles in style.xml are based on it. Normal was modified, and as a result the whole document was bulletized; Which caused the hang while opening.
Removed the addition of style as a PARA_STYLE, as the properties of the referenced style are already added in ListLevel::AddParaProperties
Reviewed on: https://gerrit.libreoffice.org/9668
It is fairly easy to revert this. https://gerrit.libreoffice.org/c/core/+/91996
However, that won't do much except to allow a one-time import. Exporting has never round-tripped the values, and it is irrelevant for viewing - only for editing - and so round-tripping support is essential.
Everything about numbering is crazy - since we have to emulate what Word does which isn't exactly how LO does things - and grabbagging is probably useless for numbering. At this point I can't even understand Microsoft's documentation on how this is SUPPOSED to work. But I'll try and see if I can work out what to do for exporting...
A little history lesson, using ooxmlexport's tdf95376.docx, looking at the Paragraph style Bullet (parent style Plain Text).
Back in LO 3.6, numbering was not imported. Then it switched to "Outline Numbering" likely due to fixing an exception related to the string of patches starting with commit fb68711fc3fbab99e47cc94f5abd27b1425bc468 by Author: Lubo? Lu?ák on Thu Apr 5 13:57:05 2012 +0200
That was quickly fixed to set the numbering style to WWNum1 by commit 042da092165eea856596db5ba5f18ea1273b88eb Author: Lubo? Lu?ák on Wed May 2 17:40:10 2012 +0200
finish handling of w:pStyle in numbering (bnc#751028)
But I think the premise is ALL WRONG here. w:pStyle should have nothing to do with assigning this numbering style to a paragraph style. It just means that you get certain properties from that style. (see ListLevel::AddParaProperties)
This ought to come from NumPr_numId - where the style assigns itself to a nonAbstract numbering list. So I think the real question is why isn't this working?
(In reply to Justin L from comment #10)
> So I think the real question is why isn't this working?
A big part of that is because Styles are finished before lists are processed.
Numbering needs style information from char styles, and para styles, so we can't simply switch those two around (and doing so caused a unit test failure in ooxmlexport10 - good).
Created attachment 159472 [details]
tdf131321_paraStyleNumbering.odt: export to DOCX is fine - just missing import
(In reply to Justin L from comment #9)
> Exporting has never round-tripped the values...
Please recognize the conversation has changed here. pStyle - the numbering.xml property - has never been exported.
numPr's numId in styles.xml IS being exported.
proposed patch https://gerrit.libreoffice.org/c/core/+/92058
This fixes DOCX import (and since export already worked, it is completely fixed).
RTF export is not working (it explicitly only tries to export for paragraphs, not styles) and so I will ignore that case. A separate bug report should be made if that case is important.
Justin Luth committed a patch related to this issue.
It has been pushed to "master":
tdf#131321 writerfilter: ApplyNumberingStyleNameToParaStyles()
It will be available in 7.0.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:
Affected users are encouraged to test the fix and report feedback.
thanks for fixing this issue. Do you think it would make sense to backport it to libreoffice-6-4 considering it's a regression ?
(In reply to Xisco Faulí from comment #16)
> considering it's a regression ?
Ultimately, this was not a regression. It just happened to work in one specific case, but the original implementation was completely wrong.
Because there could be strange interactions with chapter numbering, I wasn't planning on backporting. This doesn't affect layout at all, and few people would use numbering and styles, so importance is very low.
Created attachment 160530 [details]
Example compared MSO LO
Looks OK now, I'll set Verified.
I see that bullets are wrong on filesave and reopen, I hope that's not related.
I may bibisect later.
Bullet is bug 132766.
Good thing I didn't backport this. It exposed nasty import weaknesses, as reported in bug 133000. Numbering code is so fragile...