diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-04 05:03:42 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-11 08:01:24 +0200 |
commit | 08ed74c89f7f018167b858e74cc30ae0272fae6c (patch) | |
tree | 6a254c979cab2dff9edec61f740b800f3696b01d /sc/inc/conditio.hxx | |
parent | 13ed8001c9e825d28a9a0aa67fbf88d2d3e3b30e (diff) |
integrate color formats into conditional formats
Change-Id: I3c235f6dd0b69d3fc560910fcc890d2c80c995c0
Diffstat (limited to 'sc/inc/conditio.hxx')
-rw-r--r-- | sc/inc/conditio.hxx | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index 9a7f1af0ac15..b11261868ed4 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -70,6 +70,7 @@ enum ScConditionMode }; class ScConditionalFormat; +class ScDataBarInfo; namespace condformat { @@ -83,9 +84,21 @@ enum ScFormatEntryType } +struct ScCondFormatData +{ + ScCondFormatData(): + pColorScale(NULL), + pDataBar(NULL) {} + + Color* pColorScale; + ScDataBarInfo* pDataBar; + rtl::OUString aStyleName; +}; + class SC_DLLPUBLIC ScFormatEntry { public: + ScFormatEntry(ScDocument* pDoc); virtual ~ScFormatEntry() {} virtual condformat::ScFormatEntryType GetType() const = 0; @@ -93,9 +106,12 @@ public: const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) = 0; virtual void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) = 0; - virtual ScFormatEntry* Clone( ScDocument* pDoc ) const = 0; + virtual ScFormatEntry* Clone( ScDocument* pDoc = NULL ) const = 0; virtual void SetParent( ScConditionalFormat* pNew ) = 0; +protected: + ScDocument* mpDoc; + }; class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry @@ -120,7 +136,6 @@ class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry String aSrcString; // formula source position as text during XML import ScFormulaCell* pFCell1; ScFormulaCell* pFCell2; - ScDocument* pDoc; bool bRelRef1; bool bRelRef2; bool bFirstRun; @@ -186,11 +201,11 @@ public: virtual condformat::ScFormatEntryType GetType() const { return condformat::CONDITION; } - virtual ScFormatEntry* Clone(ScDocument* pDoc) const; + virtual ScFormatEntry* Clone(ScDocument* pDoc = NULL) const; protected: virtual void DataChanged( const ScRange* pModified ) const; - ScDocument* GetDocument() const { return pDoc; } + ScDocument* GetDocument() const { return mpDoc; } ScConditionalFormat* pCondFormat; }; @@ -274,6 +289,8 @@ public: const String& GetCellStyle( ScBaseCell* pCell, const ScAddress& rPos ) const; + ScCondFormatData GetData( ScBaseCell* pCell, const ScAddress& rPos ) const; + bool EqualEntries( const ScConditionalFormat& r ) const; void DoRepaint( const ScRange* pModified ); |