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:55:20 +0100
commit1c60abfdb617039cedc53982c7c8eca640e28cac (patch)
tree212afc590a5eed1e6bb5ff8c64a8c9eb84b4af8a
parentc1cff220853c803f40ff4284fd6046a86cc15d43 (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);
}