summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-19 15:41:28 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-19 15:51:01 +0200
commit44481da569df85aa91455fdc2892a4e0c5818e6c (patch)
treed217fbb17a23afaa04d0e14111dba4fe18b361c8 /sc/source/core/tool/compiler.cxx
parent42899582314181641d59dcc5f78358d0631b3677 (diff)
update relative local range names, fdo#48856
Diffstat (limited to 'sc/source/core/tool/compiler.cxx')
-rw-r--r--sc/source/core/tool/compiler.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 9b2fa2e00dfe..be051c9d69e3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4454,7 +4454,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
bool ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- bool& rChanged, bool bSharedFormula)
+ bool& rChanged, bool bSharedFormula, bool bLocal)
{
bool bRelRef = false; // set if relative reference
rChanged = false;
@@ -4474,15 +4474,12 @@ bool ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
if (!bUpdate && t->GetType() == svDoubleRef)
bUpdate = !rRef.Ref2.IsColRel() || !rRef.Ref2.IsRowRel() ||
!rRef.Ref2.IsTabRel();
- if (!bSharedFormula)
+ if (!bSharedFormula && !bLocal)
{
// We cannot update names with sheet-relative references, they may
// be used on other sheets as well and the resulting reference
// would be wrong. This is a dilemma if col/row would need to be
// updated for the current usage.
- // TODO: seems the only way out of this would be to not allow
- // relative sheet references and have sheet-local names that can be
- // copied along with sheets.
bUpdate = bUpdate && !rRef.Ref1.IsTabRel() && !rRef.Ref2.IsTabRel();
}
if (bUpdate)