summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-03 23:18:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-05 13:57:22 +0100
commit83b42cdccb797f1faf427b0beabc3806c5849592 (patch)
tree2209dedcd99b49116aaf5a90a6d1ce1a2dea0971 /tools
parent5daa649c56250b60c35f58e11d245459067d7d83 (diff)
convert (ugly) WriteUniOrByteString to rtl::OUString
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/stream.hxx2
-rw-r--r--tools/source/stream/stream.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index c2749ffb866a..5b5c443ac354 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -410,7 +410,7 @@ public:
rtl::OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet);
/// Write a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE,
/// otherwise convert to eSrcCharSet and write a 16bit length prefixed sequence of bytes
- SvStream& WriteUniOrByteString( const UniString& rStr, rtl_TextEncoding eDestCharSet );
+ SvStream& WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet );
/// Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE,
/// otherwise read a line of Bytecode and convert from eSrcCharSet
sal_Bool ReadUniOrByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index ab3703b6e381..1da4096a92c7 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1414,18 +1414,18 @@ rtl::OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
// -----------------------------------------------------------------------
-SvStream& SvStream::WriteUniOrByteString( const UniString& rStr, rtl_TextEncoding eDestCharSet )
+SvStream& SvStream::WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet )
{
// write UTF-16 string directly into stream ?
if (eDestCharSet == RTL_TEXTENCODING_UNICODE)
{
- sal_uInt32 nLen = rStr.Len();
+ sal_Int32 nLen = rStr.getLength();
operator<< (nLen);
if (nLen)
{
if (bSwap)
{
- const sal_Unicode *pStr = rStr.GetBuffer();
+ const sal_Unicode *pStr = rStr.getStr();
const sal_Unicode *pEnd = pStr + nLen;
for (; pStr < pEnd; pStr++)
@@ -1436,7 +1436,7 @@ SvStream& SvStream::WriteUniOrByteString( const UniString& rStr, rtl_TextEncodin
}
}
else
- Write( rStr.GetBuffer(), nLen << 1 );
+ Write( rStr.getStr(), nLen << 1 );
}
return *this;