summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-21 23:14:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-22 12:46:42 +0000
commit2f0914e5f2957ebdb04bfc7fb5acb1bd6351a0f5 (patch)
treeaab05725213233bd6349dffa3b994e9ffb06a9a5 /svtools
parent32a0646ba6c124544dc209cfc2633ef76c8449fd (diff)
ByteString->rtl::OString
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/ixbm/xbmread.cxx8
-rw-r--r--svtools/source/filter/sgvtext.cxx6
-rw-r--r--svtools/source/filter/wmf/wmfwr.cxx4
-rw-r--r--svtools/source/svhtml/parhtml.cxx28
4 files changed, 24 insertions, 22 deletions
diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx
index 0870eecb7187..d17910a5903f 100644
--- a/svtools/source/filter/ixbm/xbmread.cxx
+++ b/svtools/source/filter/ixbm/xbmread.cxx
@@ -232,15 +232,15 @@ sal_Bool XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XB
for( sal_uInt16 i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ )
{
- const ByteString aToken( aLine.GetToken( i, ',' ) );
- const xub_StrLen nLen = aToken.Len();
+ const rtl::OString aToken(aLine.GetToken(i, ','));
+ const sal_Int32 nLen = aToken.getLength();
sal_Bool bProcessed = sal_False;
nBit = nDigits = nValue = 0;
- for( xub_StrLen n = 0UL; n < nLen; n++ )
+ for (sal_Int32 n = 0; n < nLen; ++n)
{
- const unsigned char cChar = aToken.GetChar( n );
+ const unsigned char cChar = aToken[n];
const short nTable = pHexTable[ cChar ];
if( isxdigit( cChar ) || !nTable )
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index 4eab4c652f39..36f608e8bff9 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -1253,7 +1253,8 @@ void SgfFontLst::AssignFN(const String& rFName)
void SgfFontLst::ReadList()
{
- if (!Tried) {
+ if (!Tried)
+ {
Tried=sal_True;
LastID=0;
LastLn=NULL;
@@ -1262,7 +1263,8 @@ void SgfFontLst::ReadList()
aCfg.SetGroup("SGV Fonts fuer StarView");
sal_uInt16 Anz=aCfg.GetKeyCount();
sal_uInt16 i;
- ByteString FID,Dsc;
+ rtl::OString FID;
+ ByteString Dsc;
for (i=0;i<Anz;i++)
{
diff --git a/svtools/source/filter/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx
index e30e3956330f..5291c28061c5 100644
--- a/svtools/source/filter/wmf/wmfwr.cxx
+++ b/svtools/source/filter/wmf/wmfwr.cxx
@@ -457,10 +457,10 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
}
*pWMF << nPitchFamily;
- ByteString aFontName( rFont.GetName(), eFontNameEncoding );
+ rtl::OString aFontName(rtl::OUStringToOString(rFont.GetName(), eFontNameEncoding));
for ( i = 0; i < W_LF_FACESIZE; i++ )
{
- sal_Char nChar = ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0;
+ sal_Char nChar = ( i < aFontName.getLength() ) ? aFontName[i] : 0;
*pWMF << nChar;
}
UpdateRecordHeader();
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index eb976e541b74..33292b5b2df4 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1881,7 +1881,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// ^<!
//
// where the underlined subexpression has to be a HTML token
- ByteString sCmp;
+ rtl::OString sCmp;
bool bUCS2B = false;
if( bSwitchToUCS2 )
{
@@ -1932,23 +1932,23 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
}
else
{
- sCmp = (sal_Char *)pHeader;
+ sCmp = pHeader;
}
- sCmp.ToUpperAscii();
+ sCmp = sCmp.toAsciiUpperCase();
// A HTML document must have a '<' in the first line
- xub_StrLen nStart = sCmp.Search( '<' );
- if( STRING_NOTFOUND == nStart )
+ sal_Int32 nStart = sCmp.indexOf('<');
+ if (nStart == -1)
return false;
nStart++;
// followed by arbitrary characters followed by a blank or '>'
sal_Char c;
- xub_StrLen nPos;
- for( nPos = nStart; nPos<sCmp.Len(); nPos++ )
+ sal_Int32 nPos;
+ for( nPos = nStart; nPos < sCmp.getLength(); ++nPos )
{
- if( '>'==(c=sCmp.GetChar(nPos)) || HTML_ISSPACE(c) )
+ if( '>'==(c=sCmp[nPos]) || HTML_ISSPACE(c) )
break;
}
@@ -1959,20 +1959,20 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// the string following '<' has to be a known HTML token.
// <DIR> is not interpreted as HTML. Otherwise the output of the DOS command "DIR"
// could be interpreted as HTML.
- String sTest( sCmp.Copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
+ String sTest( sCmp.copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
int nTok = GetHTMLToken( sTest );
if( 0 != nTok && HTML_DIRLIST_ON != nTok )
return true;
// "<!" at the very beginning of the file?
- if( nStart == 1 && '!' == sCmp.GetChar( 1 ) )
+ if( nStart == 1 && '!' == sCmp[1] )
return true;
// <HTML> somewhere in the first 80 characters of the document
- nStart = sCmp.Search( OOO_STRING_SVTOOLS_HTML_html );
- if( nStart!=STRING_NOTFOUND &&
- nStart>0 && '<'==sCmp.GetChar(nStart-1) &&
- nStart+4 < sCmp.Len() && '>'==sCmp.GetChar(nStart+4) )
+ nStart = comphelper::string::indexOfL(sCmp, RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_html));
+ if( nStart != -1 &&
+ nStart>0 && '<'==sCmp[nStart-1] &&
+ nStart+4 < sCmp.getLength() && '>'==sCmp[nStart+4] )
return true;
// Else it's rather not a HTML document