summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-04-01 12:50:03 +0200
committerEike Rathke <erack@redhat.com>2016-04-01 13:05:27 +0200
commit73480e7a18536b62d314929fbfe27a8f2c0a03cc (patch)
tree7b2d73d7d8c0c9b271336f415c9218a89248071c /sc
parent04bb10f1d8370465be835fe65df4cb63198829e7 (diff)
early bail out only on same doc
... and rename that variable to what it actually does.. Change-Id: Ifd6b9a612d8a8dbc700e42eeb5a732295af283a3
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 9f94264f3183..ac877f8e7803 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -698,9 +698,9 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
// If no range name was found copy it.
if (!pRangeData)
{
- bool bCopyGlobalName = (nOldSheet < 0 && (bGlobalNamesToLocal || !bSameDoc));
+ bool bEarlyBailOut = (nOldSheet < 0 && bSameDoc);
MightReferenceSheet eMightReference = mightRangeNameReferenceSheet( pOldRangeData, nOldTab);
- if (bCopyGlobalName && eMightReference == MightReferenceSheet::NONE)
+ if (bEarlyBailOut && eMightReference == MightReferenceSheet::NONE)
return;
if (eMightReference == MightReferenceSheet::NAME)
@@ -713,7 +713,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
sc::UpdatedRangeNames aReferencingNames;
findRangeNamesReferencingSheet( aReferencingNames, pToken, pOldDoc,
nGlobalRefTab, nLocalRefTab, nOldTokenTab, nOldTokenTabReplacement, 0);
- if (bCopyGlobalName && aReferencingNames.isEmpty(-1) && aReferencingNames.isEmpty(nOldTokenTabReplacement))
+ if (bEarlyBailOut && aReferencingNames.isEmpty(-1) && aReferencingNames.isEmpty(nOldTokenTabReplacement))
return;
SheetIndexMap aSheetIndexMap;