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

Remove use of pLine in scanner

üst c3259776
...@@ -219,12 +219,10 @@ bool SbiScanner::NextSym() ...@@ -219,12 +219,10 @@ bool SbiScanner::NextSym()
sal_Int32 nOldCol1 = nCol1; sal_Int32 nOldCol1 = nCol1;
sal_Int32 nOldCol2 = nCol2; sal_Int32 nOldCol2 = nCol2;
sal_Unicode buf[ BUF_SIZE ], *p = buf; sal_Unicode buf[ BUF_SIZE ], *p = buf;
bHash = false;
eScanType = SbxVARIANT; eScanType = SbxVARIANT;
aSym = ::rtl::OUString(); aSym = ::rtl::OUString();
bSymbol = bHash = bSymbol = bNumber = bSpaces = false;
bNumber = bSpaces = false;
// read in line? // read in line?
if( !pLine ) if( !pLine )
...@@ -236,7 +234,7 @@ bool SbiScanner::NextSym() ...@@ -236,7 +234,7 @@ bool SbiScanner::NextSym()
nOldCol1 = nOldCol2 = 0; nOldCol1 = nOldCol2 = 0;
} }
while( theBasicCharClass::get().isWhitespace( *pLine ) ) while(nCol < aLine.getLength() && theBasicCharClass::get().isWhitespace(aLine[nCol]))
++pLine, ++nCol, bSpaces = true; ++pLine, ++nCol, bSpaces = true;
nCol1 = nCol; nCol1 = nCol;
...@@ -256,7 +254,7 @@ bool SbiScanner::NextSym() ...@@ -256,7 +254,7 @@ bool SbiScanner::NextSym()
} }
// copy character if symbol // copy character if symbol
if( theBasicCharClass::get().isAlpha( *pLine, bCompatible ) || *pLine == '_' ) if(nCol < aLine.getLength() && (theBasicCharClass::get().isAlpha(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
{ {
// if there's nothing behind '_' , it's the end of a line! // if there's nothing behind '_' , it's the end of a line!
if( *pLine == '_' && !*(pLine+1) ) if( *pLine == '_' && !*(pLine+1) )
......
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