diff options
author | August Sodora <augsod@gmail.com> | 2011-11-18 21:35:01 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2011-11-18 21:40:39 -0500 |
commit | 76f4712c7d1382752edfc153e3879fb447e70db5 (patch) | |
tree | 604bbdf1a139dabe6c50374c446adfdfc8a232d5 /basic | |
parent | 53a662f53055ea5f262d7e0358d1346bab7f353d (diff) |
Remove uses of pLine in scanner
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/scanner.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 2b594de03766..09e96bc235b4 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -163,21 +163,17 @@ inline bool lclIsWhitespace( sal_Unicode cChar ) void SbiScanner::scanGoto() { - const sal_Unicode* pTestLine = pLine; short nTestCol = nCol; - while( lclIsWhitespace( *pTestLine ) ) - { - pTestLine++; + while(nTestCol < aLine.getLength() && lclIsWhitespace(aLine[nTestCol])) nTestCol++; - } - if( *pTestLine && *(pTestLine + 1) ) + if(nTestCol + 1 < aLine.getLength()) { - String aTestSym = aLine.copy( nTestCol, 2 ); - if( aTestSym.EqualsIgnoreCaseAscii( "to" ) ) + ::rtl::OUString aTestSym = aLine.copy(nTestCol, 2); + if(aTestSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("to"))) { - aSym = String::CreateFromAscii( "goto" ); - pLine = pTestLine + 2; + aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goto")); + pLine = pLine + (nCol - nTestCol) + 2; nCol = nTestCol + 2; } } |