summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-16 22:43:43 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-28 04:33:10 +0200
commit49922897d68835ae4e5c850b3c55107157fe7548 (patch)
treef42918f443d9ccfe6d711e88c89ecd10f19de127 /sc/inc
parent669c12d59b6131f44945f166c77ae98df52ebb9e (diff)
repaint whole range for range based cond formats, tdf#105696
The range based cond formats need to be repainted across the whole range. This ensures that a change in condition which affects all cells causes a repaint. Change-Id: Ie6dd10088a1c11c1bafd1faa9c429a35a6469ff2 Reviewed-on: https://gerrit.libreoffice.org/35302 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/colorscale.hxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index bdf0148268cf..ad702f6980a6 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -49,6 +49,7 @@ private:
std::unique_ptr<ScFormulaCell> mpCell;
std::unique_ptr<ScFormulaListener> mpListener;
ScColorScaleEntryType meType;
+ ScConditionalFormat* mpFormat;
public:
ScColorScaleEntry(double nVal, const Color& rCol);
@@ -74,6 +75,8 @@ public:
ScColorScaleEntryType GetType() const { return meType;}
void SetType( ScColorScaleEntryType eType );
+
+ void SetRepaintCallback(ScConditionalFormat* pParent);
};
namespace databar
@@ -97,7 +100,10 @@ struct SC_DLLPUBLIC ScDataBarFormatData
meAxisPosition(databar::AUTOMATIC),
mnMinLength(0),
mnMaxLength(100),
- mbOnlyBar(false){}
+ mbOnlyBar(false),
+ mpUpperLimit(new ScColorScaleEntry()),
+ mpLowerLimit(new ScColorScaleEntry())
+ {}
ScDataBarFormatData(const ScDataBarFormatData& r):
maPositiveColor(r.maPositiveColor),
@@ -114,8 +120,12 @@ struct SC_DLLPUBLIC ScDataBarFormatData
if(r.mpLowerLimit)
mpLowerLimit.reset( new ScColorScaleEntry(*r.mpLowerLimit));
+ else
+ mpLowerLimit.reset(new ScColorScaleEntry());
if(r.mpUpperLimit)
mpUpperLimit.reset( new ScColorScaleEntry(*r.mpUpperLimit));
+ else
+ mpUpperLimit.reset(new ScColorScaleEntry());
}
/**
@@ -255,6 +265,8 @@ public:
virtual ~ScColorScaleFormat() override;
virtual ScColorFormat* Clone(ScDocument* pDoc) const override;
+ virtual void SetParent(ScConditionalFormat* pParent) override;
+
Color* GetColor(const ScAddress& rAddr) const;
void AddEntry(ScColorScaleEntry* pEntry);
@@ -288,6 +300,8 @@ public:
ScDataBarFormat(ScDocument* pDoc, const ScDataBarFormat& rFormat);
virtual ScColorFormat* Clone(ScDocument* pDoc) const override;
+ virtual void SetParent(ScConditionalFormat* pParent) override;
+
ScDataBarInfo* GetDataBarInfo(const ScAddress& rAddr) const;
void SetDataBarData( ScDataBarFormatData* pData );
@@ -348,6 +362,8 @@ public:
virtual ScColorFormat* Clone(ScDocument* pDoc) const override;
+ virtual void SetParent(ScConditionalFormat* pParent) override;
+
ScIconSetInfo* GetIconSetInfo(const ScAddress& rAddr) const;
void SetIconSetData( ScIconSetFormatData* pData );