diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-27 08:21:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:02 +0000 |
commit | 3fd28200f1c1a46970789f21ee6fce3f6f3ac1ec (patch) | |
tree | 18600b1b78ed5ede7f7068a98fe3fe7b6962b311 /tools/source | |
parent | 48221d6a2bf4c327b6cadcdc65169997f7d7408d (diff) |
ByteString->rtl::OString[Buffer]
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/inet/inetstrm.cxx | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 40932bf5e08a..d70d84d2c30c 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -1444,7 +1444,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) rtl::OStringBuffer aDelim( RTL_CONSTASCII_STRINGPARAM("--")); aDelim.append(pMsg->GetMultipartBoundary()); - aDelim.append("\r\n"); + aDelim.append(RTL_CONSTASCII_STRINGPARAM("\r\n")); rtl_copyMemory(pData, aDelim.getStr(), aDelim.getLength()); @@ -1460,13 +1460,14 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) if (pMsg->IsMultipart()) { // Insert close delimiter. - ByteString aDelim ("--"); - aDelim += pMsg->GetMultipartBoundary(); - aDelim += "--\r\n"; + rtl::OStringBuffer aDelim( + RTL_CONSTASCII_STRINGPARAM("--")); + aDelim.append(pMsg->GetMultipartBoundary()); + aDelim.append(RTL_CONSTASCII_STRINGPARAM("--\r\n")); - rtl_copyMemory ( - pData, aDelim.GetBuffer(), aDelim.Len()); - return aDelim.Len(); + rtl_copyMemory (pData, aDelim.getStr(), + aDelim.getLength()); + return aDelim.getLength(); } } } @@ -1626,14 +1627,18 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) } ByteString aPlainDelim (pMsg->GetMultipartBoundary()); - ByteString aDelim ("--"); - aDelim += aPlainDelim; - - ByteString aPlainClose (aPlainDelim); - aPlainClose += "--"; - - ByteString aClose (aDelim); - aClose += "--"; + ByteString aDelim = rtl::OStringBuffer( + RTL_CONSTASCII_STRINGPARAM("--")). + append(aPlainDelim). + makeStringAndClear(); + ByteString aPlainClose = rtl::OStringBuffer( + aPlainDelim). + append(RTL_CONSTASCII_STRINGPARAM("--")). + makeStringAndClear(); + ByteString aClose = rtl::OStringBuffer( + aDelim). + append(RTL_CONSTASCII_STRINGPARAM("--")). + makeStringAndClear(); if (pMsgBuffer == NULL) pMsgBuffer = new SvMemoryStream; pMsgBuffer->Write (pData, nSize); |