summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-08-30 09:00:21 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-08-30 09:00:21 +0000
commit868cb20bb9edc4266ea439ec49e23fae0dab73c0 (patch)
treeb5446ab1ce804017e2f1aaf856b04950f614cfe6 /basic
parent69ba0d06525ec7d7706b7c4a3aa107d26485c535 (diff)
INTEGRATION: CWS npower7 (1.23.42); FILE MERGED
2007/05/02 09:45:21 npower 1.23.42.1: #i#68898#
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/scanner.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index b93cba2c07c9..72dcc2a1b2e9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: scanner.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: vg $ $Date: 2006-11-02 11:02:47 $
+ * last change: $Author: vg $ $Date: 2007-08-30 10:00:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -53,6 +53,7 @@
#include <unotools/charclass.hxx>
#endif
+#include <runtime.hxx>
SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf )
{
@@ -76,6 +77,7 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf
bSymbol =
bUsedForHilite =
bCompatible =
+ bVBASupportOn =
bPrevLineExtentsComment = FALSE;
bHash =
bErrors = TRUE;
@@ -424,7 +426,11 @@ BOOL SbiScanner::NextSym()
if( *pLine != cSep || cSep == ']' ) break;
} else aError = cSep, GenError( SbERR_EXPECTED );
}
- aSym = aLine.copy( n, nCol - n - 1 );
+ // If VBA Interop then doen't eat the [] chars
+ if ( cSep == ']' && bVBASupportOn )
+ aSym = aLine.copy( n - 1, nCol - n + 1);
+ else
+ aSym = aLine.copy( n, nCol - n - 1 );
// Doppelte Stringbegrenzer raus
String s( cSep );
s += cSep;