diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-21 15:47:23 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-21 15:51:03 +0200 |
commit | f654980aebb5d41a83dd7de94ec2ebf0173c67a7 (patch) | |
tree | efa2975e45b4813f6b6d880eaedbaf1ec4b221b8 /sc/inc/colorscale.hxx | |
parent | 485792374600cd9919ab6edf201e8bd97d640261 (diff) |
initial support for percentile in data bars/color scales
Color Scales look correctly but in the databar code seems to be an error
if all values are positive.
Change-Id: I0bfb277df50021bd20a4b13a5da342670102b649
Diffstat (limited to 'sc/inc/colorscale.hxx')
-rw-r--r-- | sc/inc/colorscale.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 997c2a0c6f36..9f4d02fb406a 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -32,6 +32,8 @@ #include <tools/color.hxx> #include <rangelst.hxx> +#include <vector> + //TODO: merge this with conditio.hxx class ScDocument; @@ -49,6 +51,7 @@ private: bool mbMin; bool mbMax; bool mbPercent; + bool mbPercentile; public: ScColorScaleEntry(double nVal, const Color& rCol); ScColorScaleEntry(const ScColorScaleEntry& rEntry); @@ -65,11 +68,13 @@ public: bool GetMin() const; bool GetMax() const; bool GetPercent() const; + bool GetPercentile() const; bool HasFormula() const; const ScTokenArray* GetFormula() const; void SetMin(bool bMin); void SetMax(bool bMax); void SetPercent(bool bPercent); + void SetPercentile(bool bPercentile); }; namespace databar @@ -160,6 +165,8 @@ public: virtual ScColorFormatType GetType() const = 0; protected: + void getValues( std::vector<double>& rValues ) const; + ScRangeList maRanges; ScDocument* mpDoc; }; @@ -175,6 +182,7 @@ private: void calcMinMax(double& nMin, double& nMax) const; bool CheckEntriesForRel(const ScRange& rRange) const; + double CalcValue(double nMin, double nMax, ColorScaleEntries::const_iterator& rItr) const; public: ScColorScaleFormat(ScDocument* pDoc); ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleFormat& rFormat); |