Bug 89305 - Formatting Enhacement: Cell Style 'Default' should be empty
Summary: Formatting Enhacement: Cell Style 'Default' should be empty
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.1 rc
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-11 08:37 UTC by Horst Schottky
Modified: 2015-10-18 22:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Horst Schottky 2015-02-11 08:37:43 UTC
I have to develop several Calendar sheets with the same functionality in Excel and Calc. The color marking of the weekends I do with conditional formatting.
All lines contain different font-styles (narrow and normal fonts) for better readability. The only change for the conditional formatting should be the background color. 

In Excel this is easy done because the changes of conditional formatting is done by value.
In calc this is done by hierarchical cell styles. This is actually a good idea. But because of the 'Default' cell-style, which is the root of all cell-styles,  contends a font, this feature makes it impossible to apply a change of only the background-color to a line with several font-styles.
Actually I have to convert some Excel-sheets to calc. In the converted sheet the 'Default' cell-style contains several formattings. So the converted ConditionalStyles, which should only change the background-color, can't be shown correct.

As a workaround, I edit the styles.xml in the .ods file an delete all formattings in the default cell-style. With this modification most of the converted Excel sheets run out of the box.
In spite of this experience there should be made the following changes:

1. The default template of calc should have an empty default cell-style. (I have already changed this on my system with good experience.) Another way to do this could be to make it possible to create cell-styles which are inherited from nothing, like the default style itself.
2. When importing a excel-sheet, the default cell-style should also be empty and all ConditionalStyles should be inherited from this empty style.
3. In the 'modify' dialog of styles there should be the possibility to delete properties. (Actually if I set e.g. a font, I can get rid of it later)
Comment 1 Joel Madero 2015-10-16 04:06:48 UTC
I am almost positive we will close this as WONTFIX as we don't like changing default styles that will literally affect every spreadsheet ever made (absent those that use no default styles). While you may not have seen problems, this isn't sufficient to risk the possible consequences of such a change. Furthermore, it appears like no other user has had similar issues (I see no duplicate issues, no comments over 8 months, etc...). 

That being said, I am getting expert input and will report back. If one of our spreadsheet experts agrees, it will be closed as WONTFIX.
Comment 2 Joel Madero 2015-10-18 18:44:50 UTC
I've spoken with Markus who is one of the most experienced Calc programmers on the project:

He has said that you describe a real issue but your proposed solution is WONTFIX. That being said, he said that "I solve it in the ooxml import already with styles that don't inherit from anything."

So I am closing this as WONTFIX because expert has said the proposed solution will not be implemented. Try master install to see what you think (I have no idea what he did with ooxml import but it seems like he thinks it resolves your problem).

Thanks
Comment 3 Markus Mohrhard 2015-10-18 22:19:33 UTC
To add to Joel's comment:

As OOXML has dxf (differential formatting) we now (I think since 5.0) implement something like this through styles that don't inherit from any style.

Doing the same for ODF and internally is not trivial as our whole style system is normally based on inheritance. I think the OOXML solution only works during import but the UI support for it is horrible at best.

So the idea to have better support for something like differential styles might be a good idea however the solution requested for this goal in this bug report is an absolute no-go.

Deleting these information from the default cell style will just cause issues for other cells, as it means that for some cells you have no formatting. I think the better solution if you edit the file is to see if not inheriting any style for the conditional format style might work.