[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 4 15:40:10 UTC 2020
sc/source/core/tool/interpr1.cxx | 2 --
1 file changed, 2 deletions(-)
New commits:
commit 22c7ad49679c2abcac4409c93d32b20746b16904
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 2 13:31:59 2020 +0000
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Fri Dec 4 16:39:23 2020 +0100
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 at redhat.com>
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 95185b71aa19..38bcc983c36e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8199,8 +8199,6 @@ void ScInterpreter::ScIndirect()
if (nIndex >= 3 && sRefStr[nIndex-1] == '\'')
{
bExternalName = true;
- if (eConv == FormulaGrammar::CONV_OOO)
- eConv = FormulaGrammar::CONV_XL_A1;
}
}
}
More information about the Libreoffice-commits
mailing list