Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

here is my next patch for problems around local range names. We need to
update local range names like global range names. This patch only fixes some
part of it, but updating when the sheet number changes need some more rework
for fdo#38204 first.

We do a similar update for global range names already but forgot to update
local range names.

So what I still need to do:(depending on my fix for the uno problem around
(local) range names)
 -InsertTab
 -DeleteTab
 -MoveTab
 -CopyTab

Regards,
Markus
From a52e170b4268287b1e4eba2509afc87d2b474803 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Tue, 21 Jun 2011 10:14:01 +0200
Subject: [PATCH] fix for fdo#38380: local range names must be updated too

---
 sc/source/core/data/table1.cxx |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2927aa0..1463c68 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1303,6 +1303,12 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, 
SCROW
         bUpdated |= aCol[i].UpdateReference(
             eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, pUndoDoc );
 
+    if ( mpRangeName )
+    {
+        ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
+        mpRangeName->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
+    }
+
     if ( bIncludeDraw )
         UpdateDrawRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, 
bUpdateNoteCaptionPos );
 
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.