summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-05 02:25:33 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-05 02:54:11 +0100
commitf81676d11fc9e2ee86c60dafd6201663b6ee202f (patch)
treeb271ef39f2a2624717e18552659d0eb0f7500127
parentad0bdb90b5eb6cdb94c89dcb82d16c6ce0069458 (diff)
adapt cond format range when copying sheets, fdo#56742
Change-Id: I9b28ac161f326ebeeaf0fa22e0a96915187d7c94
-rw-r--r--sc/source/core/data/conditio.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 5e038e50f6df..c1936070902e 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1972,7 +1972,11 @@ void ScConditionalFormat::CompileXML()
void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- maRanges.UpdateReference( eUpdateRefMode, pDoc, rRange, nDx, nDy, nDz );
+ if( eUpdateRefMode == URM_COPY && nDz != 0 )
+ 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);
}