create closing bracket token only when necessary
Change-Id: Ifb705279ff01d4c886678a183de0499ec5bb119e
This commit is contained in:
@@ -4320,17 +4320,21 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula )
|
|||||||
aCorrectedFormula += mxSymbols->getSymbol(ocArrayClose);
|
aCorrectedFormula += mxSymbols->getSymbol(ocArrayClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nBrackets)
|
||||||
|
{
|
||||||
FormulaByteToken aToken( ocClose );
|
FormulaByteToken aToken( ocClose );
|
||||||
while( nBrackets-- )
|
while( nBrackets-- )
|
||||||
{
|
{
|
||||||
if( !pArr->AddToken( aToken ) )
|
if( !pArr->AddToken( aToken ) )
|
||||||
{
|
{
|
||||||
SetError(errCodeOverflow); break;
|
SetError(errCodeOverflow);
|
||||||
|
break; // while
|
||||||
}
|
}
|
||||||
if ( bAutoCorrect )
|
if ( bAutoCorrect )
|
||||||
aCorrectedFormula += mxSymbols->getSymbol(ocClose);
|
aCorrectedFormula += mxSymbols->getSymbol(ocClose);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ( nForced >= 2 )
|
if ( nForced >= 2 )
|
||||||
pArr->SetRecalcModeForced();
|
pArr->SetRecalcModeForced();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user