Bug 119565 - FILESAVE XLSX Line property of shape inherited from theme lost
Summary: FILESAVE XLSX Line property of shape inherited from theme lost
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3 all versions
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.6.0 target:7.5.4
Keywords: bibisected, bisected, filter:xlsx, regression
Depends on:
Blocks: OOXML-Doc-Themes XLSX-Shapes
  Show dependency treegraph
 
Reported: 2018-08-28 14:13 UTC by Gabor Kelemen (allotropia)
Modified: 2023-04-28 08:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Line properties when opening attachment #144508 in Excel and Calc (109.76 KB, image/png)
2018-08-28 14:13 UTC, Gabor Kelemen (allotropia)
Details
The line properties in Calc-saved attachment #144510 (95.27 KB, image/png)
2018-08-28 14:14 UTC, Gabor Kelemen (allotropia)
Details
Extended test file from Excel 2013 (15.04 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-10-09 06:38 UTC, NISZ LibreOffice Team
Details
The example file as saved by Calc 7.1 alpha (10.79 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-10-09 06:38 UTC, NISZ LibreOffice Team
Details
attachment #166217 in Excel and Calc - good (122.73 KB, image/png)
2020-10-09 06:39 UTC, NISZ LibreOffice Team
Details
attachment #166217 and attachment #166218 in Excel - good line width (135.79 KB, image/png)
2020-10-09 06:41 UTC, NISZ LibreOffice Team
Details
attachment #166218 in Excel and Calc - bad line width in Calc only (136.10 KB, image/png)
2020-10-09 06:43 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-08-28 14:13:33 UTC
Created attachment 144514 [details]
Line properties when opening attachment #144508 [details] in Excel and Calc

LibreOffice Calc imports fine, but losts during export the line property of shapes in XLSX files, when the shape was created in Microsoft Excel with default properties. If we change the properties (like thickness or color) of the line, the line is preserved. This bug is most likely related to (or even duplicate of) a similar bug #97057 which causes the theme color to be lost when the shape is saved.

Steps to reproduce:
    1. Create a new spreadsheet in Microsoft Excel
    2. Insert a shape with default properties. Do not change anything after the shape has been inserted!
    3. Save the spreadsheet as XLSX and close it. For example: attachment #144508 [details]
    4. Open the same file in LibreOffice Calc.
    5. Save the file as XLSX and reload it.

Actual results:
Both the background color (as we saw in the bug #97057) and the line properties of the shape are lost.

Expected results:
The line properties should be preserved (and also the background color, although that's a different, but most likely related bug).

LibreOffice details:
Version: 6.2.0.0.alpha0+
Build ID: af579ed7d1482df5cfa7e12e8af2603917d40602
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: hu-HU (hu_HU); Calc: CL
Comment 1 Gabor Kelemen (allotropia) 2018-08-28 14:14:56 UTC
Created attachment 144515 [details]
The line properties in Calc-saved attachment #144510 [details]
Comment 2 raal 2018-09-05 21:00:30 UTC
I can confirm with Version: 6.2.0.0.alpha0+
Build ID: 4b5fcd417587cfb9e6d8b61ecb037ab165eeb5b9
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
Comment 3 Xisco Faulí 2018-09-06 09:33:10 UTC
I can also reproduce it in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

but not in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 4 Xisco Faulí 2018-09-06 09:42:38 UTC
bibisect-43max points to 4a969ac35174520f1ffeb4f919f5d7bb6d99a628.
Searching for this hash in Bugzilla points to bug 97057, which makes sense...
Closing as RESOLVED DUPLICATED

*** This bug has been marked as a duplicate of bug 97057 ***
Comment 5 NISZ LibreOffice Team 2020-10-09 06:38:15 UTC
Created attachment 166217 [details]
Extended test file from Excel 2013

Extended the original example file, after seeing attachment #121871 [details] from bug #97057 still missing the line width in Calc.

This has three shapes with 1, 1.5 and 0.5 pt line width coming from the shape theme.

Roundtrip is still not good with:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: a883002d8e2fd77f80c43b7b2e6ac329d83d929d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 6 NISZ LibreOffice Team 2020-10-09 06:38:48 UTC
Created attachment 166218 [details]
The example file as saved by Calc 7.1 alpha
Comment 7 NISZ LibreOffice Team 2020-10-09 06:39:29 UTC
Created attachment 166219 [details]
attachment #166217 [details] in Excel and Calc - good
Comment 8 NISZ LibreOffice Team 2020-10-09 06:41:27 UTC
Created attachment 166220 [details]
attachment #166217 [details] and attachment #166218 [details] in Excel - good line width
Comment 9 NISZ LibreOffice Team 2020-10-09 06:43:18 UTC
Created attachment 166221 [details]
attachment #166218 [details] in Excel and Calc - bad line width in Calc only

This is like the fill color in bug #124013 - Excel uses the default since the actual theme.xml is missing from the file, while Calc defaults to 0 for all three shapes.
Comment 10 Commit Notification 2023-04-25 12:52:39 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5ee52d401e2086f79f794a4ec1a1d7beec8aa582

tdf#119565 XLSX export: fix lost line properties inherited from theme

It will be available in 7.6.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 11 NISZ LibreOffice Team 2023-04-27 07:01:34 UTC
VERIFIED IN:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a555d79b3b00793edf1d51a8a7c76b723cc436d
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL threaded
Comment 12 Commit Notification 2023-04-28 08:53:50 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6a865763291752af0975da8f5765443096ef5181

tdf#119565 XLSX export: fix lost line properties inherited from theme

It will be available in 7.5.4.

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.