[Libreoffice-commits] core.git: sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 31 10:47:25 UTC 2020
sc/source/core/tool/interpr1.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit fc92e4e8c51cee379781b15670507e72510a9f60
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Fri Oct 30 16:57:16 2020 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Sat Oct 31 11:46:43 2020 +0100
Let INDIRECT() bail out early on empty string
e.g. if obtained from yet empty cell.
Change-Id: I18597b86b37d5d216213f9a101e8b84b307b2a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105090
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 3268efdf2015..321f80328095 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8084,11 +8084,18 @@ void ScInterpreter::ScIndirect()
bTryXlA1 = false;
}
+ OUString sRefStr = GetString().getString();
+ if (sRefStr.isEmpty())
+ {
+ // Bail out early for empty cells, rely on "we do have a string" below.
+ PushError( FormulaError::NoRef);
+ return;
+ }
const ScAddress::Details aDetails( bTryXlA1 ? FormulaGrammar::CONV_OOO : eConv, aPos );
const ScAddress::Details aDetailsXlA1( FormulaGrammar::CONV_XL_A1, aPos );
SCTAB nTab = aPos.Tab();
- OUString sRefStr = GetString().getString();
+
ScRefAddress aRefAd, aRefAd2;
ScAddress::ExternalInfo aExtInfo;
if ( ConvertDoubleRef(mrDoc, sRefStr, nTab, aRefAd, aRefAd2, aDetails, &aExtInfo) ||
More information about the Libreoffice-commits
mailing list