diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-22 14:34:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-23 11:37:06 +0000 |
commit | b1f74de0311af25596e861c24be8b829f4b27cb4 (patch) | |
tree | a5c17d136efca429a72d2d17f0640fa9e5b9e12f /svtools/bmpmaker | |
parent | drop tools/string.hxx include (diff) | |
download | core-b1f74de0311af25596e861c24be8b829f4b27cb4.tar.gz core-b1f74de0311af25596e861c24be8b829f4b27cb4.zip |
ByteString->rtl::OString
Diffstat (limited to 'svtools/bmpmaker')
-rw-r--r-- | svtools/bmpmaker/bmpcore.cxx | 28 | ||||
-rw-r--r-- | svtools/bmpmaker/bmpsum.cxx | 8 |
2 files changed, 19 insertions, 17 deletions
diff --git a/svtools/bmpmaker/bmpcore.cxx b/svtools/bmpmaker/bmpcore.cxx index 5209a923d160..2a7c709fdb34 100644 --- a/svtools/bmpmaker/bmpcore.cxx +++ b/svtools/bmpmaker/bmpcore.cxx @@ -93,7 +93,7 @@ void BmpCreator::ImplCreate( const ::std::vector< DirEntry >& rInDirs, if( !rInDirs.empty() ) { - ByteString aLine; + rtl::OString aLine; String aInfo, aPrefix, aName( rName ), aString; SvFileStream aOutStream; BitmapEx aTotalBmpEx; @@ -123,7 +123,7 @@ void BmpCreator::ImplCreate( const ::std::vector< DirEntry >& rInDirs, aOutFile += DirEntry( aName ); // get number of bitmaps - while( aLine.Search( '}' ) == STRING_NOTFOUND ) + while( aLine.indexOf('}') == -1 ) { if( !pSRS->ReadLine( aLine ) ) break; @@ -136,11 +136,11 @@ void BmpCreator::ImplCreate( const ::std::vector< DirEntry >& rInDirs, { aString = aPrefix; - if( atoi( aLine.GetBuffer() ) < 10000 ) + if( atoi( aLine.getStr() ) < 10000 ) aString += String::CreateFromInt32( 0 ); // search for pngs by default - String aPngString( aString += String( aLine.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + String aPngString( aString += rtl::OStringToOUString(aLine, RTL_TEXTENCODING_UTF8) ); aNameVector.push_back( aPngString += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ) ); } } @@ -361,9 +361,11 @@ void BmpCreator::Create( const String& rSRSName, else { String aText; - ByteString aByteText; + rtl::OString aByteText; sal_Bool bLangDep = sal_False; + using comphelper::string::indexOfL; + do { do @@ -371,24 +373,24 @@ void BmpCreator::Create( const String& rSRSName, if (!pSRS->ReadLine(aByteText)) break; } - while ( aByteText.Search( "ImageList" ) == STRING_NOTFOUND ); + while ( indexOfL(aByteText, RTL_CONSTASCII_STRINGPARAM("ImageList")) == -1 ); do { if (!pSRS->ReadLine( aByteText ) ) break; } - while ( aByteText.Search( "File" ) == STRING_NOTFOUND ); - aText = String::CreateFromAscii( aByteText.GetBuffer() ); + while ( indexOfL(aByteText, RTL_CONSTASCII_STRINGPARAM("File")) == -1 ); + aText = rtl::OStringToOUString(aByteText, RTL_TEXTENCODING_ASCII_US); const String aName( aText.GetToken( 1, '"' ) ); do { if( !bLangDep && - aByteText.Search( "File" ) != STRING_NOTFOUND && - aByteText.Search( '[' ) != STRING_NOTFOUND && - aByteText.Search( ']' ) != STRING_NOTFOUND ) + indexOfL(aByteText, RTL_CONSTASCII_STRINGPARAM("File")) != -1 && + aByteText.indexOf('[') != -1 && + aByteText.indexOf(']') != -1 ) { bLangDep = sal_True; } @@ -396,8 +398,8 @@ void BmpCreator::Create( const String& rSRSName, if (!pSRS->ReadLine(aByteText)) break; } - while (aByteText.Search( "IdList" ) == STRING_NOTFOUND ); - aText = String::CreateFromAscii( aByteText.GetBuffer() ); + while (indexOfL(aByteText, RTL_CONSTASCII_STRINGPARAM("IdList")) == -1); + aText = rtl::OStringToOUString(aByteText, RTL_TEXTENCODING_ASCII_US); // if image list is not language dependent, don't do anything for languages except german if( aText.Len() ) diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx index ead4930b4f09..223f76d79b63 100644 --- a/svtools/bmpmaker/bmpsum.cxx +++ b/svtools/bmpmaker/bmpsum.cxx @@ -297,15 +297,15 @@ void BmpSum::ProcessFileList( const String& rInFileList, if( aIStm.IsOpen() && aOStm.IsOpen() ) { - ByteString aReadLine; + rtl::OString aReadLine; ::std::set< ByteString > aFileNameSet; while( aIStm.ReadLine( aReadLine ) ) { - if( aReadLine.Len() ) + if( !aReadLine.isEmpty() ) aFileNameSet.insert( aReadLine ); - if( aReadLine.Search( "enus" ) != STRING_NOTFOUND ) + if( comphelper::string::indexOfL(aReadLine, RTL_CONSTASCII_STRINGPARAM("enus") ) != -1 ) { static const char* aLanguages[] = { @@ -340,7 +340,7 @@ void BmpSum::ProcessFileList( const String& rInFileList, } } - aReadLine.Erase(); + aReadLine = rtl::OString(); } aIStm.Close(); |