summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index d2227cd73521..c19b29f8c776 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -90,6 +90,7 @@ enum ScanState
ssSkipReference,
ssGetErrorConstant,
ssGetTableRefItem,
+ ssGetTableRefColumn,
ssStop
};
@@ -1901,7 +1902,12 @@ Label_MaskStateMachine:
case ssGetChar :
{
// Order is important!
- if( nMask & SC_COMPILER_C_ODF_LABEL_OP )
+ if (eLastOp == ocTableRefOpen && c != '[' && c != '#' && c != ']')
+ {
+ *pSym++ = c;
+ eState = ssGetTableRefColumn;
+ }
+ else if( nMask & SC_COMPILER_C_ODF_LABEL_OP )
{
// '!!' automatic intersection
if (GetCharTableFlags( pSrc[0], 0 ) & SC_COMPILER_C_ODF_LABEL_OP)
@@ -2213,6 +2219,26 @@ Label_MaskStateMachine:
}
}
break;
+ case ssGetTableRefColumn:
+ {
+ // Scan whatever up to the next unescaped ']' closer.
+ if (c != ']' || cLast == '\'')
+ {
+ if( pSym == &cSymbol[ MAXSTRLEN-1 ] )
+ {
+ SetError( errStringOverflow);
+ eState = ssStop;
+ }
+ else
+ *pSym++ = c;
+ }
+ else
+ {
+ --pSrc;
+ eState = ssStop;
+ }
+ }
+ break;
case ssGetReference:
if( pSym == &cSymbol[ MAXSTRLEN-1 ] )
{