summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-24 21:35:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-24 21:35:32 +0000
commite2b73031e810bc5b29101a9d22ab0264ae676d99 (patch)
tree601bccb72bfb166fdf17a5fba5c48f8557953425 /tools
parentb0ba08657f23d273721592c30f10d37e43a49ec2 (diff)
ByteString->rtl::OString
Diffstat (limited to 'tools')
-rw-r--r--tools/source/inet/inetstrm.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index eadeec566a2e..6b1011b1fe7c 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -503,14 +503,14 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
// Check for header or body.
if (!IsHeaderParsed())
{
- ByteString aField (pData);
- sal_uInt16 nPos = aField.Search (':');
- if (nPos != STRING_NOTFOUND)
+ rtl::OString aField(pData);
+ sal_Int32 nPos = aField.indexOf(':');
+ if (nPos != -1)
{
- ByteString aName (
- aField.Copy (0, nPos));
- ByteString aValue (
- aField.Copy (nPos + 1, aField.Len() - nPos + 1));
+ rtl::OString aName(
+ aField.copy(0, nPos));
+ rtl::OString aValue(
+ aField.copy(nPos + 1, aField.getLength() - nPos + 1));
aValue = comphelper::string::stripStart(aValue, ' ');
pTargetMsg->SetHeaderField (
@@ -1614,11 +1614,11 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
// Determine boundary.
rtl::OString aType(rtl::OUStringToOString(
pMsg->GetContentType(), RTL_TEXTENCODING_ASCII_US));
- ByteString aLowerType(aType);
- aLowerType.ToLowerAscii();
+ rtl::OString aLowerType(aType.toAsciiLowerCase());
- sal_uInt16 nPos = aLowerType.Search ("boundary=");
- ByteString aBoundary(aType.copy(nPos + 9));
+ sal_Int32 nPos = comphelper::string::indexOfL(aLowerType,
+ RTL_CONSTASCII_STRINGPARAM("boundary="));
+ rtl::OString aBoundary(aType.copy(nPos + 9));
aBoundary = comphelper::string::strip(aBoundary, ' ');
aBoundary = comphelper::string::strip(aBoundary, '"');