summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-11-23 18:38:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-11-24 18:33:14 +0100
commit8b9c9af2996704abc6d5655f4eae1c645560f0a2 (patch)
tree12bcae0df179a35b6e1ce4771b610dc2c8eff3f6 /sc
parentbb3bbc2c579d22b5674ee1889f35e839e6e207f6 (diff)
Resolves: ofz#41299 Rewind also on last resort #REF! IsReference()
Otherwise for #ref!e:o NextNewToken() bailed out with an uninitialized maRawToken. Change-Id: I8b3b399a5a3636ccda3104ba2a5971e5e9a8fc02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125736 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 51a0a85247fab56040416e40b7c7d878689acb26) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125715 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 4ff62fc5862a..628465e0d085 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4378,6 +4378,8 @@ bool ScCompiler::NextNewToken( bool bInArray )
OUString aUpper;
+Label_Rewind:
+
do
{
const OUString aOrg( cSymbol );
@@ -4511,7 +4513,11 @@ bool ScCompiler::NextNewToken( bool bInArray )
// and 2016 until 5.1.4
OUString aErrRef( mxSymbols->getSymbol( ocErrRef));
if (aUpper.indexOf( aErrRef) >= 0 && IsReference( aUpper, &aErrRef))
+ {
+ if (mbRewind)
+ goto Label_Rewind;
return true;
+ }
if ( meExtendedErrorDetection != EXTENDED_ERROR_DETECTION_NONE )
{