summaryrefslogtreecommitdiff
path: root/sc/inc/colorscale.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-04 05:03:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-11 08:01:24 +0200
commit08ed74c89f7f018167b858e74cc30ae0272fae6c (patch)
tree6a254c979cab2dff9edec61f740b800f3696b01d /sc/inc/colorscale.hxx
parent13ed8001c9e825d28a9a0aa67fbf88d2d3e3b30e (diff)
integrate color formats into conditional formats
Change-Id: I3c235f6dd0b69d3fc560910fcc890d2c80c995c0
Diffstat (limited to 'sc/inc/colorscale.hxx')
-rw-r--r--sc/inc/colorscale.hxx25
1 files changed, 7 insertions, 18 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index d8b294c13e0b..32be4a60ffed 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -31,6 +31,7 @@
#include <formula/grammar.hxx>
#include <tools/color.hxx>
#include <rangelst.hxx>
+#include "conditio.hxx"
#include <vector>
@@ -140,13 +141,7 @@ struct ScDataBarFormatData
boost::scoped_ptr<ScColorScaleEntry> mpLowerLimit;
};
-enum ScColorFormatType
-{
- COLORSCALE,
- DATABAR
-};
-
-class SC_DLLPUBLIC ScColorFormat
+class SC_DLLPUBLIC ScColorFormat : public ScFormatEntry
{
public:
ScColorFormat(ScDocument* pDoc);
@@ -157,19 +152,13 @@ public:
const ScRangeList& GetRange() const;
virtual void DataChanged(const ScRange& rRange) = 0;
- virtual void UpdateMoveTab(SCTAB nOldTab, SCTAB nNewTab) = 0;
- virtual void UpdateReference( UpdateRefMode eUpdateRefMode,
- const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) = 0;
-
- virtual ScColorFormat* Clone(ScDocument* pDoc = NULL) const = 0;
-
- virtual ScColorFormatType GetType() const = 0;
+ virtual void SetParent(ScConditionalFormat* pParent);
protected:
void getValues( std::vector<double>& rValues ) const;
ScRangeList maRanges;
- ScDocument* mpDoc;
+ ScConditionalFormat* mpParent;
};
class SC_DLLPUBLIC ScColorScaleFormat : public ScColorFormat
@@ -198,7 +187,7 @@ public:
virtual void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
- virtual ScColorFormatType GetType() const;
+ virtual condformat::ScFormatEntryType GetType() const;
typedef ColorScaleEntries::iterator iterator;
typedef ColorScaleEntries::const_iterator const_iterator;
iterator begin();
@@ -224,7 +213,7 @@ public:
virtual void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
- virtual ScColorFormatType GetType() const;
+ virtual condformat::ScFormatEntryType GetType() const;
private:
double getMin(double nMin, double nMax) const;
double getMax(double nMin, double nMax) const;
@@ -262,7 +251,7 @@ public:
// see http://www.boost.org/doc/libs/1_49_0/libs/ptr_container/doc/tutorial.html#cloneability
//for MSVC we need:
-inline ScColorFormat* new_clone( const ScColorFormat& rFormat )
+inline ScFormatEntry* new_clone( const ScColorFormat& rFormat )
{
return rFormat.Clone();
}