summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-01-23 12:41:52 +0100
committerMichael Stahl <mstahl@redhat.com>2013-01-28 17:36:20 +0100
commit0dc532bffcda35d15a4719c05bb258e470355b98 (patch)
treeec7adac5e52ca5aebb52d06a2498654af82e1200 /tools
parent7e8e9031c6ef46d67d5579ca42d0c0f5975d4f98 (diff)
fdo#38838 Some removal/replacement of the String/UniString with OUString
Changed SfxItemPool::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const; to use OUString. Change-Id: I656c1d321ff96f1f2e5b77f6adc103ef0a6fdf66
Diffstat (limited to 'tools')
-rw-r--r--tools/source/inet/inetmime.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 2aa1a7ee005c..423f32f448e1 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -51,7 +51,7 @@ inline Charset::Charset(rtl_TextEncoding eTheEncoding,
DBG_ASSERT(m_pRanges, "Charset::Charset(): Bad ranges");
}
-void appendISO88591(UniString & rText, sal_Char const * pBegin,
+void appendISO88591(OUString & rText, sal_Char const * pBegin,
sal_Char const * pEnd);
}
@@ -173,14 +173,14 @@ bool Charset::contains(sal_uInt32 nChar) const
namespace unnamed_tools_inetmime {
-void appendISO88591(UniString & rText, sal_Char const * pBegin,
+void appendISO88591(OUString & rText, sal_Char const * pBegin,
sal_Char const * pEnd)
{
xub_StrLen nLength = static_cast< xub_StrLen >(pEnd - pBegin);
sal_Unicode * pBuffer = new sal_Unicode[nLength];
for (sal_Unicode * p = pBuffer; pBegin != pEnd;)
*p++ = sal_uChar(*pBegin++);
- rText.Append(pBuffer, nLength);
+ rText += OUString(pBuffer, nLength);
delete[] pBuffer;
}
@@ -279,7 +279,7 @@ bool parseParameters(ParameterList const & rInput,
+ rInput.m_pList->
m_aCharset.
getLength());
- UniString aValue;
+ OUString aValue;
bool bBadEncoding = false;
Parameter * pNext = p;
do
@@ -311,21 +311,21 @@ bool parseParameters(ParameterList const & rInput,
while (pNext && pNext->m_nSection > 0);
if (bBadEncoding)
{
- aValue.Erase();
+ aValue = OUString();
for (pNext = p;;)
{
if (pNext->m_bExtended)
{
for (sal_Int32 i = 0; i < pNext->m_aValue.getLength(); ++i)
- aValue += sal_Unicode(
+ aValue += OUString(sal_Unicode(
sal_Unicode(
sal_uChar(pNext->m_aValue[i]))
- | 0xF800);
+ | 0xF800));
}
else
{
for (sal_Int32 i = 0; i < pNext->m_aValue.getLength(); ++i)
- aValue += sal_Unicode(sal_uChar(pNext->m_aValue[i]));
+ aValue += OUString( sal_Unicode(sal_uChar(pNext->m_aValue[i])) );
}
pNext = pNext->m_pNext;
if (!pNext || pNext->m_nSection == 0)
@@ -2413,7 +2413,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
const sal_Char * pBegin = rBody.getStr();
const sal_Char * pEnd = pBegin + rBody.getLength();
- UniString sDecoded;
+ OUString sDecoded;
const sal_Char * pCopyBegin = pBegin;
/* bool bStartEncodedWord = true; */
@@ -2666,7 +2666,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
{
appendISO88591(sDecoded, pCopyBegin, pWSPBegin);
if (eType == HEADER_FIELD_TEXT)
- sDecoded.Append(
+ sDecoded += OUString(
pUnicodeBuffer,
static_cast< xub_StrLen >(nUnicodeSize));
else if (nCommentLevel == 0)
@@ -2698,10 +2698,10 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
case '\\':
case '\x0D':
case '=':
- sDecoded += '\\';
+ sDecoded += "\\";
break;
}
- sDecoded += *pTextPtr;
+ sDecoded += OUString(*pTextPtr);
}
}
delete[] pUnicodeBuffer;
@@ -2720,7 +2720,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
{
if (bQuotedEncodedText)
{
- sDecoded += '"';
+ sDecoded += "\"";
const sal_Unicode * pTextPtr = sEncodedText.getStr();
const sal_Unicode * pTextEnd = pTextPtr + sEncodedText.getLength();
for (;pTextPtr != pTextEnd; ++pTextPtr)
@@ -2730,12 +2730,12 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
case '"':
case '\\':
case '\x0D':
- sDecoded += '\\';
+ sDecoded += "\\";
break;
}
- sDecoded += *pTextPtr;
+ sDecoded += OUString(*pTextPtr);
}
- sDecoded += '"';
+ sDecoded += "\"";
}
else
sDecoded += sEncodedText;
@@ -2781,7 +2781,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
sal_Unicode aUTF16Buf[2];
xub_StrLen nUTF16Len = static_cast< xub_StrLen >(
putUTF32Character(aUTF16Buf, nCharacter) - aUTF16Buf);
- sDecoded.Append(aUTF16Buf, nUTF16Len);
+ sDecoded += OUString(aUTF16Buf, nUTF16Len);
p = pUTF8End;
pCopyBegin = p;
}