Bug 92335 - FILEOPEN FILESAVE: Character style for bullets added every time docx document is saved
Summary: FILEOPEN FILESAVE: Character style for bullets added every time docx documen...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.4.2 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Character DOCX-Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2015-06-25 15:01 UTC by Gordo
Modified: 2019-10-31 12:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordo 2015-06-25 15:01:33 UTC
1. New Text Document.
2. Type “test” and turn Bullets on.
3. Save as docx and reload document.
Note:  In Style and Formatting, Character Styles, there is a “ListLabel 1” style
4. Close document and extract styles.xml.
Note:  “ListLabel 1” style does not appear.
5. Open document again.
6. Place the cursor after “test” and type “ test”.
7. Save as docx and reload document.
Note:  There are now two styles:  “ListLabel 1” and “ListLabel 2” in Character Styles.  Bullets and Numbering shows that “ListLabel 2” is being used.
8. Close document and extract styles.xml.
Note:  Only “ListLabel 1” appears.
9. Open document again.
10. Place the cursor after “test” and type “ test”.
11. Save as docx and reload document.
Note:  There are now three styles:  “ListLabel 1”, “ListLabel 2”, and “ListLabel 3” in Character Styles.  Bullets and Numbering shows that “ListLabel 3” is being used.
12. Close document and extract styles.xml.
Note:  Only “ListLabel 1” and “ListLabel 2” appear.
Result:
Character style added every time the document is saved.

For good measure I also tested amending the document some place other than a line with a bullet and I got the same result.

It looks like Writer is interpreting the style every time the document is opened.

Windows Vista 64
Version: 4.4.4.2
Build ID: f784c932ccfd756d01b70b6bb5e09ff62e1b3285

Version: 5.1.0.0.alpha1+
Build ID: 89b5967658392d27fb3147e85abb2b5c1c34b101
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-24_04:10:17
Comment 1 Buovjaga 2015-07-01 10:47:22 UTC
Repro.
Not sure about severity, I guess this could become quite a problem after (auto-)saving hundreds of times. So I won't put it to minor..

Win 7 Pro 64-bit, Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: fi_FI
Comment 2 QA Administrators 2016-09-20 10:14:41 UTC Comment hidden (obsolete)
Comment 3 lbrown86tmp 2016-11-01 02:42:23 UTC
This bug still occurs, and has gotten worse. I am using v5.2.3 on Debian Sid (amd64).

Repeating the reproducibility steps given in the original report, every time the original reporter saw one new Listlabel style being added, when I tested a couple of weeks ago I was seeing NINE being added, one selected, and eight additional unused ones.

This creates a usability problem, as I have experienced working recently on some docx files. Over several days I quickly ended up with thousands of these Listlabel styles, which pollutes and lengthens the list.

Furthermore, with the largest docx document I have been working on, just as I had it finished, I opened it again to discover that all of my paragraph styles had been lost. I don't know for certain whether this relates to the total number of Listlabel styles I had accumulated (4100+), but after importing the styles from an older ODF file backup, and reapplying the styles, I kept running into the problem after a couple of saves. I solved this problem by importing the styles, and then using a rough macro I put together to strip out all of the ListLabel styles, before then reapplying all of the styles, and everything seems fine with it again, which suggests that it is related. Thankfully I was aware of this bug, could make an educated guess at what might have been wrong, had enough skill to create a macro to get rid of these styles, had a backup, and thus got through the problem, but there are many people out there who would be completely lost, and experiencing a problem like this would be likely to discourage people from switching away from word to Libreoffice.
Comment 4 QA Administrators 2018-06-26 02:45:06 UTC Comment hidden (obsolete)
Comment 5 jl.baldridge 2018-08-16 21:37:23 UTC
Version: 5.4.5.1
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
CPU threads: 8; OS: Windows 6.2; UI render: default; 
Locale: en-US (en_US); Calc: group

(Version is as approved by my corporate overlords; apologies if there is a newer release.) 

Just removed about 700 styles by hand. A macro probably would have been a good idea.
Comment 6 Commit Notification 2019-05-28 14:39:28 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/7376a47680b65cbdfd747a736f288e06f51f7f2d%5E%21

tdf#92335 DOCX: fix multiplying of "ListLabel" styles

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.
Comment 7 László Németh 2019-05-28 14:42:00 UTC
Note: LibreOffice with the commit above will remove also the redundant styles from the older DOCX documents during a new import/export cycle.