summaryrefslogtreecommitdiff
path: root/basic/source/comp/scanner.cxx
diff options
context:
space:
mode:
authorHenning Brinkmann <hbrinkm@openoffice.org>2011-01-05 13:59:51 +0100
committerHenning Brinkmann <hbrinkm@openoffice.org>2011-01-05 13:59:51 +0100
commit6f7f71b8531eebddacb4dee830de80824ebb8e08 (patch)
treef9b50f370b4e22dc213c783e0727c37425a5d4cb /basic/source/comp/scanner.cxx
parentb91af42051ea8d7d8c283711b4263c58898c5b56 (diff)
parent794c821e4d48c34aa376cdc7b6ab2cb029d9574d (diff)
merged DEV300_m96
Diffstat (limited to 'basic/source/comp/scanner.cxx')
-rw-r--r--basic/source/comp/scanner.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index dd68f20893f5..26c6af53cc56 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -224,6 +224,30 @@ BOOL SbiScanner::NextSym()
for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine, bCompatible ) || ( *pLine == '_' ) ); pLine++ )
nCol++;
aSym = aLine.copy( n, nCol - n );
+
+ // Special handling for "go to"
+ if( bCompatible && *pLine && aSym.EqualsIgnoreCaseAscii( "go" ) )
+ {
+ const sal_Unicode* pTestLine = pLine;
+ short nTestCol = nCol;
+ while( *pTestLine && (( *pTestLine == ' ' ) || ( *pTestLine == '\t' )) )
+ {
+ pTestLine++;
+ nTestCol++;
+ }
+
+ if( *pTestLine && *(pTestLine + 1) )
+ {
+ String aTestSym = aLine.copy( nTestCol, 2 );
+ if( aTestSym.EqualsIgnoreCaseAscii( "to" ) )
+ {
+ aSym = String::CreateFromAscii( "goto" );
+ pLine = pTestLine + 2;
+ nCol = nTestCol + 2;
+ }
+ }
+ }
+
// Abschliessendes '_' durch Space ersetzen, wenn Zeilenende folgt
// (sonst falsche Zeilenfortsetzung)
if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' )