summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-11 11:50:26 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-11 11:52:08 -0500
commit390c0b86a91f6c65e8da84b26ecd9c2b726715b8 (patch)
tree0697ac7e2d1d8a58af528795ef8dd03ff79b0c74
parent23e6f8b208bce0412e8aa0cb46a29f0395eb8317 (diff)
fdo#44661: No need to update the source range when it's a named range.
Otherwise deleting a sheet that shifts the position of the pivot table would turn the named range into the raw range that the name references.
-rw-r--r--sc/source/core/data/dpobject.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 8cc76c7d43ca..51be02db8971 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -745,6 +745,11 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode,
if ( pSheetDesc )
{
+ const OUString& rRangeName = pSheetDesc->GetRangeName();
+ if (!rRangeName.isEmpty())
+ // Source range is a named range. No need to update.
+ return;
+
const ScRange& rSrcRange = pSheetDesc->GetSourceRange();
nCol1 = rSrcRange.aStart.Col();
nRow1 = rSrcRange.aStart.Row();