Kaydet (Commit) 7d042c50 authored tarafından Caolán McNamara's avatar Caolán McNamara

use rtl_ustr_getLength instead of a temporary string just to find length

Change-Id: Ibbf777e57af6b98611cb5dce5a31517de80305b7
üst df4c929b
...@@ -433,8 +433,7 @@ bool SbiScanner::NextSym() ...@@ -433,8 +433,7 @@ bool SbiScanner::NextSym()
// from 4.1.1996: buffer full, go on scanning empty // from 4.1.1996: buffer full, go on scanning empty
if( (p-buf) == (BUF_SIZE-1) ) if( (p-buf) == (BUF_SIZE-1) )
bBufOverflow = true; bBufOverflow = true;
else if( String( cmp ).Search( ch ) != STRING_NOTFOUND ) else if( rtl::OUString( cmp ).indexOf( ch ) != -1 )
//else if( strchr( cmp, ch ) )
*p++ = ch; *p++ = ch;
else else
{ {
...@@ -522,7 +521,7 @@ PrevLineCommentLbl: ...@@ -522,7 +521,7 @@ PrevLineCommentLbl:
{ {
bPrevLineExtentsComment = false; bPrevLineExtentsComment = false;
aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REM")); aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REM"));
sal_Int32 nLen = String( pLine ).Len(); sal_Int32 nLen = rtl_ustr_getLength(pLine);
if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' )
bPrevLineExtentsComment = true; bPrevLineExtentsComment = true;
nCol2 = nCol2 + nLen; nCol2 = nCol2 + nLen;
......
...@@ -553,7 +553,7 @@ sal_uLong TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSe ...@@ -553,7 +553,7 @@ sal_uLong TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSe
} }
if ( pSep ) if ( pSep )
nLen += (nEndNode-nStartNode) * String( pSep ).Len(); nLen += (nEndNode-nStartNode) * rtl_ustr_getLength(pSep);
} }
return nLen; return nLen;
......
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