Hey Thorsten,
I'm open for suggestions how I can add this sanely to ods. I would
like to support as much from MSO 2010's color scale feature as
possible but have no idea yet what I can achieve in the remaining 4
weeks.
Hi Markus,
you're the man on the ground, so I'd guess you'll know best how to
do it, and do it future-proof. That said, conceptually, ODF has
historically preferred attributes over too deeply nested element
hierarchies - which tend to provide less structure.
The question here is more how to deal with having the conditional
formatting information stored inside the style section. Color scales
and data bars are a special form of conditional formatting that have
nothing to do with styles. I could add them with some work into the
styles section of the ods file but this just feels wrong.
A possible way a color scale entry would look like is:
<colorScale range="$A$4:$D$10">
<entry type="value" val="10" col="ff11ff">
<entry type="max" col="ffffff">
</colorScale>
<colorScale range="$H3:$I$20">
<entry type="min" col="ff11ff">
<entry type="percent" val="30" col="aaaaaa">
<entry type="percent" val="70" col="bbbbbb">
<entry type="max" col="ffffff">
</colorScale>
For color scales and data bars( that are more or less just another way
to represent the same information ) there are quite some differences
to normal conditional formatting. One important difference is that the
range the color scale is applied to is really important (min, max,
percent, percentile) don't make sense without a range. They don't
refer to a fixed style information, the color mentioned in the xml is
only there to calculate the real color. I think the types are totally
different to the types defined for normal conditional formatting,
except for formula and value they always refer to the range.
I know that these ideas and comment don't really help finding a
solution for my problem but right now I mostly know what color scales
are not. And the first thing I had to learn is that they don't really
fit into our existing conditional formatting system. This is not
limited to odf, I have exactly the same problem with style system vs.
dynamically calculating the formatting information in my
implementation
Regards,
Markus
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.