diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-02 13:31:59 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-07-08 12:25:35 +0200 |
commit | 79523008fba5765d27e6a3d214362f68ca46b1db (patch) | |
tree | 9b01e4e4544b9afbe9a07ee8005fd89e5da173a2 /sc/source/core/tool/interpr1.cxx | |
parent | ac407ab285b69f67e0e82bc10ea4abdbe8f9c08f (diff) |
cid#1468696 Logically dead code
bool bTryXlA1 = (eConv == FormulaGrammar::CONV_A1_XL_A1);
if (...)
eConv = FormulaGrammar::CONV_XL_R1C1;
if (bTryXlA1 || eConv == FormulaGrammar::CONV_OOO)
{
if (...)
{
bExternalName = true;
eConv = FormulaGrammar::CONV_OOO;
}
}
if (!bExternalName && (bTryXlA1 || eConv != FormulaGrammar::CONV_OOO))
{
if (...)
{
if (eConv == FormulaGrammar::CONV_OOO)
{
// this condition can only be reached if bTryXlA1 is true
// but bTryXlA1 is only true if eConv was originally
// CONV_A1_XL_A1. The only things eConv can be changed to
// in this function are CONV_XL_R1C1 or CONV_OOO. If it
// was changed to CONV_OOO then bExternalName was also
// set to true and the block isn't entered if that is true
}
}
}
maybe an unconditional assignment of
eConv = FormulaGrammar::CONV_XL_A1
is a better solution
Change-Id: I45f9947c21662369474048acf2d648733a9b9a6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107076
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 22c7ad49679c2abcac4409c93d32b20746b16904)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118602
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 4204215d8d97..4f2789160a1c 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -8241,8 +8241,6 @@ void ScInterpreter::ScIndirect() if (nIndex >= 3 && sRefStr[nIndex-1] == '\'') { bExternalName = true; - if (eConv == FormulaGrammar::CONV_OOO) - eConv = FormulaGrammar::CONV_XL_A1; } } } |