Kaydet (Commit) 40be618f authored tarafından August Sodora's avatar August Sodora

Refactor scanAlphanumeric

üst f81a7438
......@@ -150,6 +150,17 @@ static SbxDataType GetSuffixType( sal_Unicode c )
// return value is sal_False at EOF or errors
#define BUF_SIZE 80
void SbiScanner::scanAlphanumeric()
{
sal_uInt16 n = nCol;
while(theBasicCharClass::get().isAlphaNumeric(*pLine, bCompatible) || *pLine == '_')
{
pLine++;
nCol++;
}
aSym = aLine.copy(n, nCol - n);
}
void SbiScanner::scanGoto()
{
sal_uInt16 nTestCol = nCol;
......@@ -240,10 +251,8 @@ bool SbiScanner::NextSym()
{ pLine++;
goto eoln; }
bSymbol = true;
sal_uInt16 n = nCol;
for ( ; (theBasicCharClass::get().isAlphaNumeric( *pLine, bCompatible ) || ( *pLine == '_' ) ); pLine++ )
nCol++;
aSym = aLine.copy( n, nCol - n );
scanAlphanumeric();
// Special handling for "go to"
if( bCompatible && *pLine && aSym.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("go") ) )
......
......@@ -46,6 +46,7 @@ class SbiScanner
const sal_Unicode* pLine;
const sal_Unicode* pSaveLine;
void scanAlphanumeric();
void scanGoto();
protected:
::rtl::OUString aSym;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment