summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-11 07:33:11 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-11 08:01:26 +0200
commit6655d658984ad7518b8ccae492433bf2f45bceb0 (patch)
treec937091205a626bb024dc3bc9f4144f7fbcde1bd /sc
parentcorrectly copy the cond formats, fdo#50679 (diff)
downloadcore-6655d658984ad7518b8ccae492433bf2f45bceb0.tar.gz
core-6655d658984ad7518b8ccae492433bf2f45bceb0.zip
fix rebase problems
Change-Id: If025dbfc3364f49151638a606928229dba0ee645
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/conditio.hxx1
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/table.hxx1
-rw-r--r--sc/source/core/data/conditio.cxx8
-rw-r--r--sc/source/core/data/documen4.cxx6
5 files changed, 15 insertions, 3 deletions
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index e8b3b3677b3b..1b241cfd21d6 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -322,6 +322,7 @@ private:
public:
ScConditionalFormatList() {}
ScConditionalFormatList(const ScConditionalFormatList& rList);
+ ScConditionalFormatList(ScDocument* pDoc, const ScConditionalFormatList& rList);
~ScConditionalFormatList() {}
void InsertNew( ScConditionalFormat* pNew )
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 61ab60eb7396..6ae7572d5b64 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1201,6 +1201,8 @@ public:
SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab );
void ConditionalChanged( sal_uLong nKey, SCTAB nTab );
+ void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
+
SC_DLLPUBLIC sal_uLong AddValidationEntry( const ScValidationData& rNew );
SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uLong nIndex ) const;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 7756f770cedd..78cd9779eb1a 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -796,6 +796,7 @@ public:
ScConditionalFormatList* GetCondFormList();
const ScConditionalFormatList* GetCondFormList() const;
+ void SetCondFormList( ScConditionalFormatList* pList );
void DeleteConditionalFormat(sal_uLong nOldIndex);
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 52e5e2fa273b..7a555a6fa4fa 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1586,12 +1586,14 @@ bool ScConditionalFormat::MarkUsedExternalReferences() const
ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList& rList)
{
- // fuer Ref-Undo - echte Kopie mit neuen Tokens!
-
for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
InsertNew( itr->Clone() );
+}
- //! sortierte Eintraege aus rList schneller einfuegen ???
+ScConditionalFormatList::ScConditionalFormatList(ScDocument* pDoc, const ScConditionalFormatList& rList)
+{
+ for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
+ InsertNew( itr->Clone(pDoc) );
}
bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index f6bb911e95e4..a757d0456e95 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -712,6 +712,12 @@ ScConditionalFormatList* ScDocument::GetCondFormList(SCTAB nTab) const
return NULL;
}
+void ScDocument::SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab )
+{
+ if(VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ maTabs[nTab]->SetCondFormList(pList);
+}
+
const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) const
{