diff options
-rw-r--r-- | sc/inc/colorscale.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index a95eec6d1c95..8a5b203aca05 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -59,6 +59,7 @@ public: bool GetMin() const; bool GetMax() const; bool GetPercent() const; + bool HasFormula() const; void SetMin(bool bMin); void SetMax(bool bMax); void SetPercent(bool bPercent); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index c24fc357e901..33aff616ce9f 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -104,6 +104,11 @@ bool ScColorScaleEntry::GetPercent() const return mbPercent; } +bool ScColorScaleEntry::HasFormula() const +{ + return mpCell; +} + void ScColorScaleEntry::SetMin(bool bMin) { mbMin = bMin; @@ -369,7 +374,13 @@ bool ScColorScaleFormat::CheckEntriesForRel(const ScRange& rRange) const for(const_iterator itr = begin(); itr != end(); ++itr) { if(itr->GetMin() || itr->GetMax()) + { bNeedUpdate = true; + break; + } + + if(itr->HasFormula()) + return true; } // TODO: check also if the changed value is the new min/max |