From 1aa9bae0ffea4b37392175197f58f26001c06c66 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Sat, 23 Nov 2013 12:16:51 +0100
Subject: [PATCH 012/109] resolved fdo#61946 use correct TabDelta for
UpdateReference
The sheet delta was reverted resulting in the references not being
updated when conditional formats were copy-pasted between sheets. Saved
to .ods then was an identical calcext:target-range-address as for the
copied source range.
(cherry picked from commit ef8e0beba442f58abe3bc77f6f55fc6109025dd4)
Backported.
Change-Id: I038b58f20f71ff1393dccafa3021dac02cd69e4b
Reviewed-on: https://gerrit.libreoffice.org/6768
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
---
sc/source/core/data/table2.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 220211c..6c530d3 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -712,7 +712,7 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
ScConditionalFormat* pNewFormat = itr->Clone(pDocument);
pNewFormat->AddRange(aIntersectedRange);
- pNewFormat->UpdateReference(URM_COPY, aNewRange, nDx, nDy, pTable->nTab - nTab, true);
+ pNewFormat->UpdateReference(URM_COPY, aNewRange, nDx, nDy, nTab - pTable->nTab, true);
sal_uLong nMax = 0;
for(ScConditionalFormatList::const_iterator itrCond = mpCondFormatList->begin();
--
1.8.4.2