From 0ee960fb555deb0a91e8c0e81812ab888ff13c2f Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 16 Mar 2017 20:08:30 +0100 Subject: the range should be updated after the references, tdf#104026 Change-Id: I2cb674b8b3bc64df031b473b337d266a2eaab43d Reviewed-on: https://gerrit.libreoffice.org/35289 Tested-by: Jenkins Reviewed-by: Markus Mohrhard (cherry picked from commit 3f0f35c89f3f64fcb110483fd562a59f729dc344) Reviewed-on: https://gerrit.libreoffice.org/35297 Reviewed-by: Christian Lohmaier --- sc/source/core/data/conditio.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 6657dcf37608..f4f0f116ba61 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1926,13 +1926,13 @@ void ScConditionalFormat::CompileXML() void ScConditionalFormat::UpdateReference( sc::RefUpdateContext& rCxt, bool bCopyAsMove ) { + for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) + (*itr)->UpdateReference(rCxt); + if (rCxt.meMode == URM_COPY && bCopyAsMove) maRanges.UpdateReference(URM_MOVE, pDoc, rCxt.maRange, rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta); else maRanges.UpdateReference(rCxt.meMode, pDoc, rCxt.maRange, rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta); - - for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) - (*itr)->UpdateReference(rCxt); } void ScConditionalFormat::InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize) -- cgit