sc/source/core/tool/compiler.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 8b9c9af2996704abc6d5655f4eae1c645560f0a2 Author: Eike Rathke <[email protected]> AuthorDate: Tue Nov 23 18:38:27 2021 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 24 18:33:14 2021 +0100 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 <[email protected]> Tested-by: Jenkins (cherry picked from commit 51a0a85247fab56040416e40b7c7d878689acb26) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125715 Reviewed-by: Caolán McNamara <[email protected]> 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 ) {
