Bug 128325 - Default cell style colors added to "Document colors" palette of existing spreadsheet
Summary: Default cell style colors added to "Document colors" palette of existing spre...
Status: RESOLVED DUPLICATE of bug 107381
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.3.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Document-Colors-Palette
  Show dependency treegraph
 
Reported: 2019-10-22 15:37 UTC by Ming Hua
Modified: 2020-04-30 18:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Empty ODS file created with Calc 5.2.7, one color in the "Document color" palette (7.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-10-22 15:42 UTC, Ming Hua
Details
Same empty ODS file opened and saved in Calc 6.3.3 rc1, eleven colors in the "Document colors" palette (8.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-10-22 15:48 UTC, Ming Hua
Details
ODS file with all cell styles deleted in 6.2.8, back to one color (7.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-11-29 11:48 UTC, Ming Hua
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2019-10-22 15:37:54 UTC
(Bugzilla doesn't have version 6.3.3 rc1 yet, so I chose master, please change if necessary.)

This is related to bug 107381.  Since 5.4 series, newly created ODS files have a lot of colors in the "Document colors" palette.  For users like me who use that palette a lot, it's rather annoying.  But I can work around it by creating the spreadsheet in Calc 5.2.7, and things are fine, since opening existing spreadsheet keeps that palette intact.

Some time between 6.3.1 release and 6.3.3 rc1, this behavior changed, and now opening an old ODS file with Calc 6.3.3 rc1, the user will see all the default cell style colors (10 of them!) in the "Document colors" palette.  Even worse, after editing and saving (even if no changes, just a "Save as..."), the palette in the saved file is changed as well, and users opening the touched file in older versions of Calc will see a bloated palette.

My "About LO" information:
版本: 6.3.3.1 (x64)
Build ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU 线程: 2; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded
Comment 1 Ming Hua 2019-10-22 15:42:14 UTC
Created attachment 155235 [details]
Empty ODS file created with Calc 5.2.7, one color in the "Document color" palette
Comment 2 Ming Hua 2019-10-22 15:48:59 UTC
Created attachment 155236 [details]
Same empty ODS file opened and saved in Calc 6.3.3 rc1, eleven colors in the "Document colors" palette

These two attached ODS files show the difference in the "Document colors" palette.  For versions prior to and including 6.3.1 release, one can edit and save attachment 155235 [details] while keeping the "Document colors" palette just the colors the users touch.  In 6.3.3 rc1 if attachment 155235 [details] is opened and re-saved it will be like this one.
Comment 3 V Stuart Foote 2019-10-22 17:18:20 UTC
Now deffinitely pulling fo:background-color from https://opengrok.libreoffice.org/xref/core/sc/res/xml/styles.xml?r=d61228c8

Was that "enabled" recently with
https://gerrit.libreoffice.org/77936
Comment 4 Ming Hua 2019-11-29 11:48:11 UTC
Created attachment 156181 [details]
ODS file with all cell styles deleted in 6.2.8, back to one color

This change has more impact than I first realized.

So for users can't bear with cluttered "Document colors" palette, I found another workaround (besides opening the ODS file as a ZIP archive and tinkering with the styles.xml file within): I deleted all the cell styles except "Default" in attachment 155236 [details] with LO 6.2.8, and the "Document colors" palette is back to one color again.

However, if such a file (attached) is opened in 6.3.3, all the cell styles are automatically added back.  And the user can't even delete these cell styles in 6.3.3.
Comment 5 Buovjaga 2020-04-27 13:06:10 UTC
Looks like this can be NEW
Comment 6 Julien Nabet 2020-04-30 16:50:46 UTC
On pc Debian x86-64 with master sources updated today, I got 13 colors each time.
Comment 7 V Stuart Foote 2020-04-30 18:21:13 UTC
From UX perspective, the colors present in templates/styles should never be treated as 'in-use' in the document so as to show up in the 'Document colors' palette.

Colors can show up as 'Recent' to the user profile, but unless they have been selected and applied to an object in the document no colors should show as used in the 'Document colors'.  And pulling colors out of unused templates/styles is wrong.

But this has been known for a while and is a dupe of bug 107381 resulting from work on bug 90937

*** This bug has been marked as a duplicate of bug 107381 ***