Bug 97057 - Shapes with Theme Color Lost When Resaved as XLSX File
Summary: Shapes with Theme Color Lost When Resaved as XLSX File
Status: RESOLVED DUPLICATE of bug 124013
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, filter:xlsx, regression
: 106108 (view as bug list)
Depends on:
Blocks: OOXML-Object-Fill OOXML-Doc-Themes
  Show dependency treegraph
Reported: 2016-01-12 07:31 UTC by Kevin Suo
Modified: 2020-10-09 06:46 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

shape.xlsx (9.77 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-01-12 07:32 UTC, Kevin Suo
shape2.xlsx (resaved from shape.xlsx) (6.06 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-01-12 07:33 UTC, Kevin Suo
The original file and its saved version in current Calc (157.69 KB, image/png)
2020-09-22 10:14 UTC, NISZ LibreOffice Team

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2016-01-12 07:31:48 UTC
The attached XLSX file has an rectangle shape formatted as blue background and white text. When resave this file with LibreOffice, the blue shape background color is gone. This makes the text on the shape not visible.

Steps to Reproduce:
1. Resave the attached shape.xlsx file to shape2.xlsx.
2. Open shaple2.xlsx compare with shape.xlsx.
---> Shape's blue background color is gone.

Reproduced in the following versions:

Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Locale: zh-CN (zh_CN)

Version: (x64)
Build ID: bcace328aabc4c8c10b56daa87da0a2ee6579b5a
Threads 4; Ver: Windows 6.19; Render: default; 
Locale: zh-CN (zh_CN)
Comment 1 Kevin Suo 2016-01-12 07:32:19 UTC
Created attachment 121871 [details]
Comment 2 Kevin Suo 2016-01-12 07:33:00 UTC
Created attachment 121872 [details]
shape2.xlsx (resaved from shape.xlsx)
Comment 3 raal 2016-01-13 18:41:17 UTC
I can confirm with Version:
Build ID: 75f0f9d5538577e0d4923b4d46ba6f88b6199814
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-12_14:23:15

and Version:
Comment 4 raal 2016-01-13 18:43:11 UTC
works OK in LibreOffice 3.5.0 
Build ID: d6cde02 -> regression
Comment 5 raal 2016-01-13 19:08:16 UTC Comment hidden (obsolete)
Comment 6 Matúš Kukan 2016-01-16 20:47:50 UTC
(In reply to raal from comment #5)
> This seems to have begun at the below commit.
> ...    
>     commit 4a969ac35174520f1ffeb4f919f5d7bb6d99a628
>     Author:     Matúš Kukan <matus.kukan@collabora.com>
>     AuthorDate: Tue Dec 17 21:59:50 2013 +0100
>     Commit:     Matúš Kukan <matus.kukan@collabora.com>
>     CommitDate: Fri Dec 20 16:26:35 2013 +0100
>         svx: split into direct implementation getFactories
>         Change-Id: I888f10a923dc2b97247b2a66cc6bd116eee280a7

Ah, I was wondering how this commit could be responsible and it's not.
That commit is broken in general. Many tests don't work. It was reverted and done later properly.

Anyhow, I think I've found the commit responsible, so keeping this as bisected, just need to double check.
Comment 7 Matúš Kukan 2016-01-17 10:17:30 UTC
So, the problem commit is

commit 7e745ab5f235ba6d93c48755642642d0a9f83763
Author: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Date:   Thu Jan 16 10:27:46 2014 +0100

    ooxml: Preserve shape theme attribute for solid fill
It makes the output more similar to the origin, but in this case (always in xlsx?) we don't write theme/theme1.xml and can't get "accent1" color to be used.
Previously, we were writing color explicitly as
  <a:srgbClr val="4f81bd"/>

(Well, this commit only changes background color, borders are still visible and were broken somewhere later.. perhaps in 5391d4872e71d1edba7acc4ad2d2e3b5b97e1723)
Comment 8 Aron Budea 2016-08-15 04:13:34 UTC
Adding Jacobo to CC list, as per Comment 7.
Comment 9 Jacobo Aragunde Pérez 2016-10-27 11:24:15 UTC
These comments also apply here: https://bugs.documentfoundation.org/show_bug.cgi?id=103478#c7

The source of the problem is the same for both bugs.
Comment 10 QA Administrators 2018-05-30 02:38:32 UTC Comment hidden (obsolete)
Comment 11 Xisco Faulí 2018-09-06 09:42:38 UTC
*** Bug 119565 has been marked as a duplicate of this bug. ***
Comment 12 Buovjaga 2019-04-13 19:26:20 UTC
*** Bug 106108 has been marked as a duplicate of this bug. ***
Comment 13 NISZ LibreOffice Team 2020-09-22 10:14:07 UTC
Created attachment 165764 [details]
The original file and its saved version in current Calc

Looks better after bug #124013 was fixed. Fill color is now saved in:

Version: (x64)
Build ID: 52a49f9e480ca03e231cfda82640a928393131c9
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Note: the line width around it goes from 0.07 cm (2 pt in Excel) to 0.
Comment 14 NISZ LibreOffice Team 2020-10-09 06:46:54 UTC
Setting as duplicate since original report was about the background color disappearing, which is now preserved.

Unduplicated bug #119565 for the missing theme-based line width.

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