Kaydet (Commit) 4e85b537 authored tarafından Caolán McNamara's avatar Caolán McNamara

tidy some string types

üst eed2ad80
...@@ -267,7 +267,7 @@ void FontCache::read() ...@@ -267,7 +267,7 @@ void FontCache::read()
OString aLine; OString aLine;
aStream.ReadLine( aLine ); aStream.ReadLine( aLine );
if( !aLine.equals( rtl::OString(RTL_CONSTASCII_STRINGPARAM( CACHE_MAGIC )) ) ) if (!aLine.equalsL(RTL_CONSTASCII_STRINGPARAM(CACHE_MAGIC)))
{ {
#if OSL_DEBUG_LEVEL >1 #if OSL_DEBUG_LEVEL >1
fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() );
...@@ -277,7 +277,6 @@ void FontCache::read() ...@@ -277,7 +277,6 @@ void FontCache::read()
int nDir = 0; int nDir = 0;
FontDirMap* pDir = NULL; FontDirMap* pDir = NULL;
xub_StrLen nIndex;
bool bKeepOnlyUserOverridden = false; bool bKeepOnlyUserOverridden = false;
do do
{ {
...@@ -286,12 +285,12 @@ void FontCache::read() ...@@ -286,12 +285,12 @@ void FontCache::read()
aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "EmptyFontCacheDirectory:" ) ) == 0 ) aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "EmptyFontCacheDirectory:" ) ) == 0 )
{ {
bool bEmpty = (aLine.compareTo( RTL_CONSTASCII_STRINGPARAM ("Empty" ) ) == 0); bool bEmpty = (aLine.compareTo( RTL_CONSTASCII_STRINGPARAM ("Empty" ) ) == 0);
xub_StrLen nSearchIndex = bEmpty ? 24 : 19; sal_Int32 nSearchIndex = bEmpty ? 24 : 19;
OString aDir; OString aDir;
sal_Int64 nTimestamp = 0; sal_Int64 nTimestamp = 0;
xub_StrLen nTEnd = aLine.indexOf( ':', nSearchIndex ); sal_Int32 nTEnd = aLine.indexOf( ':', nSearchIndex );
if( nTEnd != STRING_NOTFOUND ) if( nTEnd != -1 )
{ {
rtl::OString aTimeStamp = aLine.copy( nSearchIndex, nTEnd - nSearchIndex ); rtl::OString aTimeStamp = aLine.copy( nSearchIndex, nTEnd - nSearchIndex );
nTimestamp = aTimeStamp.toInt64(); nTimestamp = aTimeStamp.toInt64();
...@@ -368,6 +367,8 @@ void FontCache::read() ...@@ -368,6 +367,8 @@ void FontCache::read()
default: break; default: break;
} }
sal_Int32 nIndex;
for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
; ;
...@@ -376,7 +377,7 @@ void FontCache::read() ...@@ -376,7 +377,7 @@ void FontCache::read()
sal_True ); sal_True );
while( nIndex < nLen ) while( nIndex < nLen )
{ {
xub_StrLen nLastIndex = nIndex+1; sal_Int32 nLastIndex = nIndex+1;
for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
; ;
if( nIndex - nLastIndex ) if( nIndex - nLastIndex )
......
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