summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-04-20 00:20:29 +0200
committerEike Rathke <erack@redhat.com>2012-04-20 00:20:29 +0200
commit9a9121929408e8ffc86b91606355ff5fe9514f7d (patch)
treecc22039e5b34dc5fd7810e376c9adf5b90f0a86f /sc/inc
parent9eed733f85e8003696271e63a3fcfc660511b7ef (diff)
resolved fdo#48856 update sheet-local named expressions correctly
This combines from master: 44481da569df85aa91455fdc2892a4e0c5818e6c Author: Markus Mohrhard <markus.mohrhard@googlemail.com> update relative local range names, fdo#48856 Signed-off-by: Eike Rathke <erack@redhat.com> 409f11ae387c859dcf9275c08093649a676e1f9e Author: Eike Rathke <erack@redhat.com> fdo#48856 update sheet-local named expressions correctly * Named expression must be updated before any formulas that would access them. * Handle all ocName tokens differentiating between global and sheet-local names. Signed-off-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/compiler.hxx9
-rw-r--r--sc/inc/rangenam.hxx6
2 files changed, 11 insertions, 4 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 371192c2db2c..765187e15b8c 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -364,6 +364,13 @@ private:
void SetRelNameReference();
+ /** Obtain range data for ocName token, global or sheet local.
+
+ Prerequisite: rToken is a FormulaIndexToken so IsGlobal() and
+ GetIndex() can be called on it. We don't check with RTTI.
+ */
+ ScRangeData* GetRangeData( const formula::FormulaToken& pToken ) const;
+
static void InitCharClassEnglish();
public:
@@ -442,7 +449,7 @@ public:
bool UpdateNameReference( UpdateRefMode eUpdateRefMode,
const ScRange&,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- bool& rChanged, bool bSharedFormula = false);
+ bool& rChanged, bool bSharedFormula = false, bool bLocal = false);
ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode,
const ScAddress& rOldPos, const ScRange&,
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 53e9ec8f0a8a..e2bf10b8bc18 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -140,7 +140,7 @@ public:
const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT );
void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bLocal = false );
bool IsModified() const { return bModified; }
SC_DLLPUBLIC void GuessPosition();
@@ -203,9 +203,9 @@ public:
SC_DLLPUBLIC const ScRangeData* findByRange(const ScRange& rRange) const;
SC_DLLPUBLIC ScRangeData* findByUpperName(const rtl::OUString& rName);
SC_DLLPUBLIC const ScRangeData* findByUpperName(const rtl::OUString& rName) const;
- SC_DLLPUBLIC ScRangeData* findByIndex(sal_uInt16 i);
+ SC_DLLPUBLIC ScRangeData* findByIndex(sal_uInt16 i) const;
void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange& rRange,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bLocal = false);
void UpdateTabRef(SCTAB nTable, sal_uInt16 nFlag, SCTAB nNewTable = 0, SCTAB nNewSheets = 1);
void UpdateTranspose(const ScRange& rSource, const ScAddress& rDest);
void UpdateGrow(const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY);