[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Mar 13 09:26:20 PDT 2015
sc/source/core/tool/compiler.cxx | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
New commits:
commit e1fee5ae6e762994737ec80d2fb267d8b956339a
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 13 16:18:33 2015 +0000
TableRef: scan whatever (translated) item name up to the next ']' closer
Change-Id: Ifd18e4dd369a0fbe98da7a7b972c012f5269af3e
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index fd0bf45..7188176 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -89,6 +89,7 @@ enum ScanState
ssGetReference,
ssSkipReference,
ssGetErrorConstant,
+ ssGetTableRefItem,
ssStop
};
@@ -1985,7 +1986,10 @@ Label_MaskStateMachine:
else if( nMask & SC_COMPILER_C_CHAR_ERRCONST )
{
*pSym++ = c;
- eState = ssGetErrorConstant;
+ if (!maTableRefs.empty() && maTableRefs.back().mnLevel)
+ eState = ssGetTableRefItem;
+ else
+ eState = ssGetErrorConstant;
}
else if( nMask & SC_COMPILER_C_CHAR_DONTCARE )
{
@@ -2188,6 +2192,26 @@ Label_MaskStateMachine:
}
}
break;
+ case ssGetTableRefItem:
+ {
+ // Scan whatever up to the next ']' closer.
+ if (c != ']')
+ {
+ if( pSym == &cSymbol[ MAXSTRLEN-1 ] )
+ {
+ SetError( errStringOverflow);
+ eState = ssStop;
+ }
+ else
+ *pSym++ = c;
+ }
+ else
+ {
+ --pSrc;
+ eState = ssStop;
+ }
+ }
+ break;
case ssGetReference:
if( pSym == &cSymbol[ MAXSTRLEN-1 ] )
{
More information about the Libreoffice-commits
mailing list