summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-26 11:25:47 +0200
committerEike Rathke <erack@redhat.com>2018-10-26 15:23:49 +0200
commit2107e08fe4798d48610f7472fa581103462081aa (patch)
tree8f0c1a53910b9b0cd634f79792f2a17b7f27128a
parent33623f3117d88683fbc9e66792e5030c0322946e (diff)
Let REGEX() return #N/A instead of #VALUE! if no match, tdf#113977 follow-up
So match can be checked with IFNA(REGEX(...);...) and IF(ISNA(REGEX(...);FALSE();TRUE()) Change-Id: I2b75dce78ad8a955aa6f94ea5d225a79ae0e2dc5 Reviewed-on: https://gerrit.libreoffice.org/62386 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
-rw-r--r--sc/source/core/tool/interpr1.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 020a9cc56b3a..414cb8a19ba3 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9248,7 +9248,7 @@ void ScInterpreter::ScRegex()
utl::TextSearch aSearch( aParam, *ScGlobal::pCharClass);
const bool bMatch = aSearch.SearchForward( aText, &nPos, &nEndPos, &aResult);
if (!bMatch)
- PushNoValue();
+ PushError( FormulaError::NotAvailable);
else
{
assert(aResult.subRegExpressions >= 1);