summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-24 21:52:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-25 15:37:19 +0000
commit03e3a20868b971595481e6742725a1c80745e7b7 (patch)
treebde5b669189ce587df0265601a54563d6ff92585
parent39e54d04804d1d8ad0d0dc10aad8ef89c2ff1e40 (diff)
ByteString->rtl::OString
-rw-r--r--svtools/source/filter/ixbm/xbmread.cxx15
-rw-r--r--svtools/source/inc/xbmread.hxx2
-rw-r--r--svtools/source/misc/imap2.cxx16
3 files changed, 14 insertions, 19 deletions
diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx
index 3e8bec34af05..aae46dcc4cfe 100644
--- a/svtools/source/filter/ixbm/xbmread.cxx
+++ b/svtools/source/filter/ixbm/xbmread.cxx
@@ -197,7 +197,7 @@ long XBMReader::ParseDefine( const sal_Char* pDefine )
// ------------------------------------------------------------------------
-sal_Bool XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat )
+sal_Bool XBMReader::ParseData( SvStream* pInStm, const rtl::OString& aLastLine, XBMFormat eFormat )
{
rtl::OString aLine;
long nRow = 0;
@@ -283,16 +283,14 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
// kehren wir zurueck und warten auf neue Daten
if ( rIStm.GetError() != ERRCODE_IO_PENDING )
{
- ByteString aLine;
-
rIStm.Seek( nLastPos );
bStatus = sal_False;
- aLine = FindTokenLine( &rIStm, "#define", "_width" );
+ rtl::OString aLine = FindTokenLine( &rIStm, "#define", "_width" );
if ( bStatus )
{
int nValue;
- if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 )
+ if ( ( nValue = (int) ParseDefine( aLine.getStr() ) ) > 0 )
{
nWidth = nValue;
aLine = FindTokenLine( &rIStm, "#define", "_height" );
@@ -310,7 +308,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
if ( bStatus )
{
- if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 )
+ if ( ( nValue = (int) ParseDefine( aLine.getStr() ) ) > 0 )
{
nHeight = nValue;
aLine = FindTokenLine( &rIStm, "static", "_bits" );
@@ -319,9 +317,10 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
XBMFormat eFormat = XBM10;
- if ( aLine.Search( "short" ) != STRING_NOTFOUND )
+ using comphelper::string::indexOfL;
+ if (indexOfL(aLine, RTL_CONSTASCII_STRINGPARAM("short")) != -1)
eFormat = XBM10;
- else if ( aLine.Search( "char" ) != STRING_NOTFOUND )
+ else if (indexOfL(aLine, RTL_CONSTASCII_STRINGPARAM("char")) != -1)
eFormat = XBM11;
else
bStatus = sal_False;
diff --git a/svtools/source/inc/xbmread.hxx b/svtools/source/inc/xbmread.hxx
index 0bf513638eea..438179065fc4 100644
--- a/svtools/source/inc/xbmread.hxx
+++ b/svtools/source/inc/xbmread.hxx
@@ -72,7 +72,7 @@ class XBMReader : public GraphicReader
rtl::OString FindTokenLine( SvStream* pInStm, const char* pTok1,
const char* pTok2 = NULL, const char* pTok3 = NULL );
long ParseDefine( const sal_Char* pDefine );
- sal_Bool ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat );
+ sal_Bool ParseData( SvStream* pInStm, const rtl::OString& aLastLine, XBMFormat eFormat );
public:
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 41dff428ed16..252346b48c95 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -261,14 +261,12 @@ sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
void ImageMap::ImpReadCERNLine( const rtl::OString& rLine, const String& rBaseURL )
{
- ByteString aStr( rLine );
-
- aStr = comphelper::string::stripStart(aStr, ' ');
+ rtl::OString aStr = comphelper::string::stripStart(rLine, ' ');
aStr = comphelper::string::stripStart(aStr, '\t');
aStr = comphelper::string::remove(aStr, ';');
- aStr.ToLowerAscii();
+ aStr = aStr.toAsciiLowerCase();
- const char* pStr = aStr.GetBuffer();
+ const char* pStr = aStr.getStr();
char cChar = *pStr++;
// Anweisung finden
@@ -405,14 +403,12 @@ sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
void ImageMap::ImpReadNCSALine( const rtl::OString& rLine, const String& rBaseURL )
{
- ByteString aStr( rLine );
-
- aStr = comphelper::string::stripStart(aStr, ' ');
+ rtl::OString aStr = comphelper::string::stripStart(rLine, ' ');
aStr = comphelper::string::stripStart(aStr, '\t');
aStr = comphelper::string::remove(aStr, ';');
- aStr.ToLowerAscii();
+ aStr = aStr.toAsciiLowerCase();
- const char* pStr = aStr.GetBuffer();
+ const char* pStr = aStr.getStr();
char cChar = *pStr++;
// Anweisung finden