summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-04-17 19:47:44 +0200
committerEike Rathke <erack@redhat.com>2015-04-18 00:46:08 +0200
commitaecf1ea0c8ba2cbbe40754d48f22f0a58dbe0cf3 (patch)
tree2a757e17446bda168b14b9055c23621773052a02 /sc/source/core/tool/compiler.cxx
parentc8b9b398fc74cb625f796a0e336c32be21c08b7a (diff)
TableRef: scan any column specifier
Change-Id: I9eb51741d8c5ace52cff70b1954ebde678e6b338
Diffstat (limited to 'sc/source/core/tool/compiler.cxx')
-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 ] )
{