summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-13 14:26:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-13 14:26:03 +0000
commit4e85b537d1229348bef16bb006d9e6b5303bd6c9 (patch)
treef69a50b9b4cbaa2e622df2717d2d3f1691f1599f /vcl/generic
parenteed2ad8025fbfd8c8b9ed8d83068700585bf7b13 (diff)
tidy some string types
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontcache.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
index 40877fc62e08..616799a5939e 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -267,7 +267,7 @@ void FontCache::read()
OString 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
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()
int nDir = 0;
FontDirMap* pDir = NULL;
- xub_StrLen nIndex;
bool bKeepOnlyUserOverridden = false;
do
{
@@ -286,12 +285,12 @@ void FontCache::read()
aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "EmptyFontCacheDirectory:" ) ) == 0 )
{
bool bEmpty = (aLine.compareTo( RTL_CONSTASCII_STRINGPARAM ("Empty" ) ) == 0);
- xub_StrLen nSearchIndex = bEmpty ? 24 : 19;
+ sal_Int32 nSearchIndex = bEmpty ? 24 : 19;
OString aDir;
sal_Int64 nTimestamp = 0;
- xub_StrLen nTEnd = aLine.indexOf( ':', nSearchIndex );
- if( nTEnd != STRING_NOTFOUND )
+ sal_Int32 nTEnd = aLine.indexOf( ':', nSearchIndex );
+ if( nTEnd != -1 )
{
rtl::OString aTimeStamp = aLine.copy( nSearchIndex, nTEnd - nSearchIndex );
nTimestamp = aTimeStamp.toInt64();
@@ -368,6 +367,8 @@ void FontCache::read()
default: break;
}
+ sal_Int32 nIndex;
+
for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
;
@@ -376,7 +377,7 @@ void FontCache::read()
sal_True );
while( nIndex < nLen )
{
- xub_StrLen nLastIndex = nIndex+1;
+ sal_Int32 nLastIndex = nIndex+1;
for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
;
if( nIndex - nLastIndex )