INTEGRATION: CWS uno2 (1.7.6); FILE MERGED
2003/04/11 14:20:45 ab 1.7.6.1: #108672# Basic Modules > 64K
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: scanner.cxx,v $
|
* $RCSfile: scanner.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.7 $
|
* $Revision: 1.8 $
|
||||||
*
|
*
|
||||||
* last change: $Author: hr $ $Date: 2003-03-18 16:28:35 $
|
* last change: $Author: rt $ $Date: 2003-04-23 16:57:09 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
SbiScanner::SbiScanner( const String& rBuf, StarBASIC* p ) : aBuf( rBuf )
|
SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf )
|
||||||
{
|
{
|
||||||
pBasic = p;
|
pBasic = p;
|
||||||
pLine = NULL;
|
pLine = NULL;
|
||||||
@@ -199,20 +199,20 @@ BOOL SbiScanner::NextSym()
|
|||||||
if( !pLine )
|
if( !pLine )
|
||||||
{
|
{
|
||||||
USHORT n = nBufPos;
|
USHORT n = nBufPos;
|
||||||
USHORT nLen = aBuf.Len();
|
USHORT nLen = aBuf.getLength();
|
||||||
if( nBufPos >= nLen )
|
if( nBufPos >= nLen )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
const sal_Unicode* p = aBuf.GetBuffer();
|
const sal_Unicode* p = aBuf.getStr();
|
||||||
p += n;
|
p += n;
|
||||||
while( ( n < nLen ) && ( *p != '\n' ) && ( *p != '\r' ) )
|
while( ( n < nLen ) && ( *p != '\n' ) && ( *p != '\r' ) )
|
||||||
p++, n++;
|
p++, n++;
|
||||||
aLine = aBuf.Copy( nBufPos, n - nBufPos );
|
aLine = aBuf.copy( nBufPos, n - nBufPos );
|
||||||
if( ( n < nLen ) && *p == '\r' && *( p+1 ) == '\n' )
|
if( ( n < nLen ) && *p == '\r' && *( p+1 ) == '\n' )
|
||||||
n += 2;
|
n += 2;
|
||||||
else
|
else
|
||||||
n++;
|
n++;
|
||||||
nBufPos = n;
|
nBufPos = n;
|
||||||
pLine = aLine.GetBuffer();
|
pLine = aLine.getStr();
|
||||||
nOldLine = ++nLine;
|
nOldLine = ++nLine;
|
||||||
nCol = nCol1 = nCol2 = nOldCol1 = nOldCol2 = 0;
|
nCol = nCol1 = nCol2 = nOldCol1 = nOldCol2 = 0;
|
||||||
nColLock = 0;
|
nColLock = 0;
|
||||||
@@ -240,7 +240,7 @@ BOOL SbiScanner::NextSym()
|
|||||||
short n = nCol;
|
short n = nCol;
|
||||||
for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine & 0xFF ) || ( *pLine == '_' ) ); pLine++ )
|
for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine & 0xFF ) || ( *pLine == '_' ) ); pLine++ )
|
||||||
nCol++;
|
nCol++;
|
||||||
aSym = aLine.Copy( n, nCol - n );
|
aSym = aLine.copy( n, nCol - n );
|
||||||
// Abschliessendes '_' durch Space ersetzen, wenn Zeilenende folgt
|
// Abschliessendes '_' durch Space ersetzen, wenn Zeilenende folgt
|
||||||
// (sonst falsche Zeilenfortsetzung)
|
// (sonst falsche Zeilenfortsetzung)
|
||||||
if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' )
|
if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' )
|
||||||
@@ -427,7 +427,7 @@ BOOL SbiScanner::NextSym()
|
|||||||
if( *pLine != cSep || cSep == ']' ) break;
|
if( *pLine != cSep || cSep == ']' ) break;
|
||||||
} else aError = cSep, GenError( SbERR_EXPECTED );
|
} else aError = cSep, GenError( SbERR_EXPECTED );
|
||||||
}
|
}
|
||||||
aSym = aLine.Copy( n, nCol - n - 1 );
|
aSym = aLine.copy( n, nCol - n - 1 );
|
||||||
// Doppelte Stringbegrenzer raus
|
// Doppelte Stringbegrenzer raus
|
||||||
String s( cSep );
|
String s( cSep );
|
||||||
s += cSep;
|
s += cSep;
|
||||||
@@ -454,7 +454,7 @@ BOOL SbiScanner::NextSym()
|
|||||||
case '>': if( *pLine == '=' ) n = 2; break;
|
case '>': if( *pLine == '=' ) n = 2; break;
|
||||||
case ':': if( *pLine == '=' ) n = 2; break;
|
case ':': if( *pLine == '=' ) n = 2; break;
|
||||||
}
|
}
|
||||||
aSym = aLine.Copy( nCol, n );
|
aSym = aLine.copy( nCol, n );
|
||||||
pLine += n-1; nCol += n;
|
pLine += n-1; nCol += n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user