Bug 112444

Summary: FILESAVE: XLSX - Conditional formatting not preserved
Product: LibreOffice Reporter: Yousuf Philips (jay) (retired) <philipz85>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aron.budea, kelemeng, raal, xiscofauli
Priority: medium Keywords: regression
Version: 6.0.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=109144
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104839, 113782    
Attachments: File exported from LO6 master
Conditonal format set in the original attachment#134667
List of conditional formatting styles in the exported file
File exported by a LO master build from last week

Description Yousuf Philips (jay) (retired) 2017-09-17 14:13:13 UTC
Steps
1. open attachment 134667 [details]
2. notice a2, a3, a4 have red strike thru formatting
3. save as new xlsx
4. close file
5. reopen saved file
6. red strike thru formatting is gone

regression as this worked in 5.4 and last month in master, but doesnt now.

Version: 5.4.1.0.0+
Build ID: 520a5a8a21e986355e4f7f5e8b5bddecb00a34d9
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-4, Time: 2017-07-14_07:33:17
Locale: en-US (en_US.UTF-8); Calc: group

Version: 6.0.0.0.alpha0+
Build ID: 7315f325ff7ada3d6bd85a471058fdaeaff8cdb0
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-17_06:58:21
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Yousuf Philips (jay) (retired) 2017-09-17 14:34:25 UTC
This master version from last month works fine, so the issue is something newly introduce in the last 2 or 3 weeks.

Version: 6.0.0.0.alpha0+
Build ID: 7f4e02e3809e10564bd2bb91465c99f4dd207da7
CPU threads: 4; OS: Windows 6.29; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-29_22:58:12
Locale: en-US (en_US); Calc: group

Excel 2013 also gives an error trying to open the file saying "Repaired Records: Conditional formatting from /xl/worksheets/sheet1.xml part", though i compared sheet1.xml from the latest master with the sheet1.xml produced with the version above and they are identical, so the issue seems to be somewhere else.
Comment 2 Yousuf Philips (jay) (retired) 2017-09-17 14:42:32 UTC
So the issue is that /xl/styles.xml is no longer outputting

<dxfs count="1">
 <dxf>
  <font>
   <strike val="1"/>
   <color rgb="FFFF0000"/>
  </font>
 </dxf>
</dxfs>

which is being referenced in /xl/worksheets/sheet1.xml with dxfId

<conditionalFormatting sqref="A2:A5">
  <cfRule ... dxfId="0">
  <formula>100</formula>
 </cfRule>
</conditionalFormatting>
Comment 3 Aron Budea 2017-09-17 18:05:02 UTC
Works with LO 6.0 daily build (2017-09-14_00:10:31, f70e0ec6b3c61a7c7caa469949b0ac8016c89854), so the regression was introduced between 09-14 and 09-17.
Comment 4 Xisco FaulĂ­ 2017-09-17 21:24:38 UTC
I can't reproduce it in

Version: 6.0.0.0.alpha0+
Build ID: 83288332f7ced698610739419989c464256f1c4d
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 raal 2017-09-18 19:09:50 UTC
no repro in Version: 6.0.0.0.alpha0+
Build ID: 7315f325ff7ada3d6bd85a471058fdaeaff8cdb0
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-09-17_05:38:00
Comment 6 Gabor Kelemen (allotropia) 2017-09-19 05:38:57 UTC
Created attachment 136355 [details]
File exported from LO6 master

Does not work in 

Version: 6.0.0.0.alpha0+
Build ID: e38d2f05cb16e981381434a940aa5c89e910cc78
CPU threads: 4; OS: Linux 4.4; UI render: GL; VCL: gtk2; 
Locale: hu-HU (hu_HU.UTF-8); Calc: group

As far as I see, the original attachment #134667 [details] has a conditional formatting named ConditionalStyle_1 ("inherited" from Excel), which formats the content as red and strikethrough. 
This file does not have that style anymore and sets the A2:A5 range to the Default conditional format style.
Comment 7 Gabor Kelemen (allotropia) 2017-09-19 05:41:04 UTC
Created attachment 136356 [details]
Conditonal format set in the original attachment#134667 [details]
Comment 8 Gabor Kelemen (allotropia) 2017-09-19 05:42:15 UTC
Created attachment 136357 [details]
List of conditional formatting styles in the exported file

I did not remove it manually I swear :)
Comment 9 Gabor Kelemen (allotropia) 2017-09-19 06:41:15 UTC
Created attachment 136360 [details]
File exported by a LO master build from last week

Does not happen with this version I have at work:

Version: 6.0.0.0.alpha0+
Build ID: f70e0ec6b3c61a7c7caa469949b0ac8016c89854
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-09-14_00:10:31
Locale: hu-HU (hu_HU); Calc: group
Comment 10 Aron Budea 2017-09-24 05:19:24 UTC
No repro.

Version: 6.0.0.0.alpha0+
Build ID: 0db08432c69adc36ed464c1f7c8e672acb3752d4
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-09-22_22:54:52
Locale: en-US (en_US); Calc: CL
Comment 11 Yousuf Philips (jay) (retired) 2017-09-24 10:56:55 UTC
Verified its now fine in master [2017-09-22] and in excel 2010.

Version: 6.0.0.0.alpha0+
Build ID: b439971c9f580db43a5cdcce9217ba1b555d5cce
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group