Download it now!
Bug 108086 - conditional format not working due to direct formating with style:data-style-name
Summary: conditional format not working due to direct formating with style:data-style-...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2017-05-25 15:56 UTC by Oliver Brinzing
Modified: 2019-02-24 09:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
demo_conditional_format_aoo (8.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-05-25 15:56 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2017-05-25 15:56:33 UTC
Created attachment 133576 [details]
demo_conditional_format_aoo

i have several spreadsheet documents originally created with aoo, where zero values will be hidden using conditional formating - but LO will show zero values.

steps to reproduce:
- open attached spreadsheet with LO
  -> cell A2 will show 0,00
- open same spreadsheet with aoo412 
  -> cell A2 is empty

the problems is caused due to an existing "style:data-style-name="N4"" attribute:

<office:automatic-styles>
 <style:style style:name="ce3" style:family="table-cell" 
  style:parent-style-name="DecimalNumber" style:data-style-name="N4">
  <style:map style:condition="cell-content()=0" 
   style:apply-style-name="HideEmptyValues" 
   style:base-cell-address="Tabelle1.A2"/>
 </style:style>
</office:automatic-styles>

the attribute seems to override the conditional formating data style.
Comment 1 Buovjaga 2017-06-04 13:03:49 UTC
Yep, it's ok in 3.6.7.2

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: c855400e9686ddd8bcba5691393f839f6f52c966
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 2nd 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 2 raal 2017-06-05 19:13:43 UTC
This seems to have begun at the below commit.
Adding Cc: to Markus Mohrhard; Could you possibly take a look at this one? Thanks

da7753060ea125a2bdf21e7af87367142ae59467 is the first bad commit
commit da7753060ea125a2bdf21e7af87367142ae59467
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Apr 2 21:31:18 2016 -0700

    source sha:2c728b0ae7f52691b1a3d5ab555225f5e8ac95a5

	author	Markus Mohrhard <markus.mohrhard@googlemail.com>	2016-02-03 19:28:40 (GMT)
committer	Eike Rathke <erack@redhat.com>	2016-03-31 16:13:52 (GMT)
commit	2c728b0ae7f52691b1a3d5ab555225f5e8ac95a5 (patch)
tree	879ced4a17952e3e95ae77a95bfa66dc81a5a2be
parent	eaced256be7e5c2ebcea01d14b2f521629e22848 (diff)
tdf#93300, handle hard formatting with cond format correct
Comment 3 Markus Mohrhard 2017-06-21 22:34:14 UTC
This was a bug in OOo and old LibreOffice versions that we fixed later. Conditional formatting should not overwrite hard formatting.