summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-06 00:03:35 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-06 00:26:42 +0200
commitfa02cce6800cd6021e0160e4698b9e90496a94c5 (patch)
treebcccc7b6c8fdf79e0da0def99522ee1a554efefa /sc/source/ui
parent4921d9650d2ec41e3973e346ed73a20991255cde (diff)
also support removing of conditional formats
Change-Id: I47ba632ccf752611a41b29c0da8e5d0f28a88565
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c68b03d0feb0..99a65a2d30c7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5061,9 +5061,10 @@ sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
namespace {
-void RemoveCondFormatAttributes(ScDocument* pDoc, const ScConditionalFormat* pFormat)
+void RemoveCondFormatAttributes(ScDocument* pDoc, const ScConditionalFormat* pFormat, SCTAB nTab)
{
const ScRangeList& rRangeList = pFormat->GetRange();
+ pDoc->RemoveCondFormatData( rRangeList, nTab, pFormat->GetKey() );
}
void SetConditionalFormatAttributes(ScDocument* pDoc, const ScRangeList& rRanges, sal_uLong nIndex, SCTAB nTab)
@@ -5087,7 +5088,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
pRepaintRange.reset(new ScRange( pOldFormat->GetRange().Combine() ));
if(pOldFormat)
{
- RemoveCondFormatAttributes(pDoc, pOldFormat);
+ RemoveCondFormatAttributes(pDoc, pOldFormat, nTab);
}
pDoc->DeleteConditionalFormat(nOldFormat, nTab);
@@ -5124,7 +5125,7 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
ScConditionalFormatList* pOldList = pDoc->GetCondFormList(nTab);
for(ScConditionalFormatList::const_iterator itr = pOldList->begin(), itrEnd = pOldList->end(); itr != itrEnd; ++itr)
{
- RemoveCondFormatAttributes(pDoc, &(*itr));
+ RemoveCondFormatAttributes(pDoc, &(*itr), nTab);
}
// then set new entries