summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-23 00:22:27 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-25 08:16:17 +0100
commit5d8548da365c326919597fa0d2699a6762889dc9 (patch)
tree892665d18bc8319e89f1adc7e233bc8c4c707fc1 /sc/source
parent76b3e61bb4ac66decd7800ef309f3241e77d538f (diff)
use URM_COPY when copying cond formats, fdo#60306, fdo#60311
Change-Id: I7a232c27dd0c1eee6f389d30f46658500aaded47
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/conditio.cxx10
-rw-r--r--sc/source/core/data/table2.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 93127c4ceb2f..bf364e5332cc 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1992,15 +1992,15 @@ void ScConditionalFormat::CompileXML()
}
void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
- const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
+ const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bCopyAsMove )
{
- if( eUpdateRefMode == URM_COPY && nDz != 0 )
+ for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
+ itr->UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
+
+ if( eUpdateRefMode == URM_COPY && bCopyAsMove )
maRanges.UpdateReference( URM_MOVE, pDoc, rRange, nDx, nDy, nDz );
else
maRanges.UpdateReference( eUpdateRefMode, pDoc, rRange, nDx, nDy, nDz );
-
- for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
- itr->UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
}
void ScConditionalFormat::DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index db43e5e2f081..4add7ef75f61 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -685,7 +685,7 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
ScConditionalFormat* pNewFormat = itr->Clone(pDocument);
pNewFormat->AddRange(aIntersectedRange);
- pNewFormat->UpdateReference(URM_MOVE, aNewRange, nDx, nDy, pTable->nTab - nTab);
+ pNewFormat->UpdateReference(URM_COPY, aNewRange, nDx, nDy, pTable->nTab - nTab, true);
sal_uLong nMax = 0;
for(ScConditionalFormatList::const_iterator itrCond = mpCondFormatList->begin();