Kaydet (Commit) 03e3a208 authored tarafından Caolán McNamara's avatar Caolán McNamara

ByteString->rtl::OString

üst 39e54d04
......@@ -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;
......
......@@ -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:
......
......@@ -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
......
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