diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-23 01:14:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-24 12:38:11 +0200 |
commit | 655d61042f5b6130643d2dde3cd46e4e4d3bbb2b (patch) | |
tree | 34227fb45a7c2bf064770b4d14cdacd05a68f342 /sc/inc | |
parent | 99f61e9b635a7c30f28192c01a534acb1e2a6ca3 (diff) |
make color formats and conditional formats a sheet property
TODO:
- UNO needs some love to accept this change
- we need a new uno interface for conditional formats in 4.0
- copy/paste
- undo/redo
Change-Id: I2c8a233888a95c7298dfb151d1c12b6a6a58520d
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 19 | ||||
-rw-r--r-- | sc/inc/fmtuno.hxx | 2 | ||||
-rw-r--r-- | sc/inc/table.hxx | 17 |
3 files changed, 26 insertions, 12 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index ed8eb3bbc3ee..20b47abe25e5 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -245,8 +245,6 @@ private: VirtualDevice* pVirtualDevice_100th_mm; ScDrawLayer* pDrawLayer; // SdrModel rtl::Reference<XColorList> pColorList; - ScConditionalFormatList* pCondFormList; // conditional formats - boost::scoped_ptr<ScColorFormatList> mpColorScaleList; //color scales ScValidationDataList* pValidationList; // validity SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats TableContainer maTabs; @@ -1198,22 +1196,21 @@ public: void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); - SC_DLLPUBLIC sal_uLong AddCondFormat( const ScConditionalFormat& rNew ); - SC_DLLPUBLIC sal_uLong AddColorFormat( ScColorFormat* pNew ); - SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ); + SC_DLLPUBLIC sal_uLong AddCondFormat( const ScConditionalFormat& rNew, SCTAB nTab ); + SC_DLLPUBLIC sal_uLong AddColorFormat( ScColorFormat* pNew, SCTAB nTab ); + SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, SCTAB nTab, ScRangeList& rRanges ); SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab ); - void ConditionalChanged( sal_uLong nKey ); + void ConditionalChanged( sal_uLong nKey, SCTAB nTab ); SC_DLLPUBLIC sal_uLong AddValidationEntry( const ScValidationData& rNew ); SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uLong nIndex ) const; - ScConditionalFormatList* GetCondFormList() const // Ref-Undo - { return pCondFormList; } - void SetCondFormList(ScConditionalFormatList* pNew); + SC_DLLPUBLIC ScConditionalFormatList* GetCondFormList( SCTAB nTab ) const; + void SetCondFormList(ScConditionalFormatList* pNew, SCTAB nTab); - SC_DLLPUBLIC const ScColorFormatList* GetColorScaleList() const; - SC_DLLPUBLIC ScColorFormatList* GetColorScaleList(); + SC_DLLPUBLIC const ScColorFormatList* GetColorScaleList(SCTAB nTab) const; + SC_DLLPUBLIC ScColorFormatList* GetColorScaleList(SCTAB nTab); ScValidationDataList* GetValidationList() const { return pValidationList; } diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx index 6632ce25e7df..003806a2f8a5 100644 --- a/sc/inc/fmtuno.hxx +++ b/sc/inc/fmtuno.hxx @@ -94,7 +94,7 @@ private: ScTableConditionalFormat(); // disable public: ScTableConditionalFormat(ScDocument* pDoc, sal_uLong nKey, - formula::FormulaGrammar::Grammar eGrammar); + SCTAB nTab, formula::FormulaGrammar::Grammar eGrammar); virtual ~ScTableConditionalFormat(); void FillFormat( ScConditionalFormat& rFormat, ScDocument* pDoc, diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index d684c8ff6015..397da579b096 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -73,6 +73,10 @@ class ScProgress; class ScRangeList; class ScSheetEvents; class ScSortInfoArray; +class ScColorFormatList; +class ScColorFormat; +class ScConditionalFormat; +class ScConditionalFormatList; class ScStyleSheet; class ScTableLink; class ScTableProtection; @@ -169,6 +173,9 @@ private: ScDBData* pDBDataNoName; mutable ScRangeName* mpRangeName; + boost::scoped_ptr<ScConditionalFormatList> mpCondFormatList; + boost::scoped_ptr<ScColorFormatList> mpColorFormatList; + ScNotes maNotes; bool bScenario:1; @@ -792,6 +799,16 @@ public: ScRangeName* GetRangeName() const; void UpdateMoveTab(SCTAB nOldPos,SCTAB nNewPos); + ScConditionalFormatList* GetCondFormList(); + const ScConditionalFormatList* GetCondFormList() const; + void SetCondFormList(ScConditionalFormatList* pNew); + + sal_uLong AddCondFormat( const ScConditionalFormat& rNew ); + sal_uLong AddColorFormat( ScColorFormat* pNew ); + ScColorFormatList* GetColorFormatList(); + const ScColorFormatList* GetColorFormatList() const; + + private: void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, |