[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Jan 11 08:52:27 PST 2012


 sc/source/core/data/dpobject.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 34219bd53d4270e6741e2b8596b4210e1c47da1a
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Jan 11 11:50:26 2012 -0500

    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.

diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 8cc76c7..51be02d 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();


More information about the Libreoffice-commits mailing list