Bug 93300 - Style formatting overrides direct formatting when using conditional formatting
Summary: Style formatting overrides direct formatting when using conditional formatting
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.7.2 release
Hardware: Other All
: medium minor
Assignee: Markus Mohrhard
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:6.4....
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2015-08-09 13:48 UTC by Helder Guerreiro
Modified: 2021-12-03 00:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Conditional formating can't be overiden by direct format (23.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-09 13:48 UTC, Helder Guerreiro
Details
My reproduction test (8.30 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-09-11 19:29 UTC, Buovjaga
Details
Spreadsheet in which styles override manual format. (13.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-03-10 13:42 UTC, Anjpr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helder Guerreiro 2015-08-09 13:48:28 UTC
Created attachment 117784 [details]
Conditional formating can't be overiden by direct format

For instance, if a style is created in which the number format is defined, if this style is applied using conditional formatting it is not possible to change the number format using Format --> Cells... Please view attached example. This is true for every property defined in the style, even if, at a latter time, we choose the default values for the property.

If we apply a style manually we can change aspects of the formatting using direct format tools even if these properties are defined in the style. 

I think the behaviour should be consistent, ie, if we can direct format properties in cells that have a style that also defines these properties and was manually applied, the same should also be true for styles applied using conditional format. 

Another option would be to lock or unlock the properties of a style.
Comment 1 Buovjaga 2015-09-11 19:29:27 UTC
Created attachment 118621 [details]
My reproduction test

I confirm with attachment 117784 [details], but I get a bit different results, if I create from scratch in 5.0.1.

Please install 5.0.1, try my file and try reproducing from scratch and tell me what you think.
Comment 2 Buovjaga 2015-09-11 19:29:40 UTC
Win 7 Pro 64-bit, Version: 5.0.1.2 (32-bit)
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: fi-FI (fi_FI)
Comment 3 Helder Guerreiro 2015-09-11 21:44:02 UTC
> Please install 5.0.1, try my file and try reproducing from scratch and tell
> me what you think.

The behaviour persists. Can't change the background colour of the 'ODD' style when applied using conditional formatting. However I can change the number format. 

If I edit number format in the 'ODD' style, then I can reproduce the behaviour I've observed on 4.3.7.2. I reckon you didn't change the number formatting string when defining the 'ODD' style.
Comment 4 Buovjaga 2015-09-12 08:06:16 UTC
(In reply to Helder Guerreiro from comment #3)
> > Please install 5.0.1, try my file and try reproducing from scratch and tell
> > me what you think.
> 
> The behaviour persists. Can't change the background colour of the 'ODD'
> style when applied using conditional formatting. However I can change the
> number format. 
> 
> If I edit number format in the 'ODD' style, then I can reproduce the
> behaviour I've observed on 4.3.7.2. I reckon you didn't change the number
> formatting string when defining the 'ODD' style.

Hmm.. I emulated what you had done, your ODD style had the default number format.

But I confirm what you say about bg and modifying ODD style number format.

I guess this is better described as a bug rather than enhancement.
Comment 5 Commit Notification 2016-03-31 16:16:13 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c728b0ae7f52691b1a3d5ab555225f5e8ac95a5

tdf#93300, handle hard formatting with cond format correct

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-03-31 16:33:34 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c1f94a5ea387551e9140cf43d4ed7ca5dcae8298&h=libreoffice-5-1

tdf#93300, handle hard formatting with cond format correct

It will be available in 5.1.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 peci1 2018-05-22 23:01:54 UTC
I see the same buggy behavior with border width, color and background color of conditionally formatted cells.
Comment 8 Commit Notification 2019-10-26 22:01:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2b0626161d3ef7c4a51007018d13ec391d3a2b04

Resolves: tdf#117715 Conditional format takes precedence; reverts tdf#93300

It will be available in 6.4.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 9 Commit Notification 2019-10-30 17:05:18 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/0b9e0f20763f0e723d66f31aee85205deec9f6f8

Resolves: tdf#117715 Conditional format takes precedence; reverts tdf#93300

It will be available in 6.3.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.
Comment 10 Anjpr 2020-03-10 13:42:05 UTC
Created attachment 158553 [details]
Spreadsheet in which styles override manual format.
Comment 11 Anjpr 2020-03-10 13:45:38 UTC
Comment on attachment 158553 [details]
Spreadsheet in which styles override manual format.

This bug is present in Windows 7 professional. LibreOffice 6.3.5.2. I have attached an ods file with conditional formatting applied to all cells based on the value of one column. Manual formatting cannot override sytle formatting.