summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-06 12:44:59 +0200
committerMichael Stahl <mstahl@redhat.com>2014-02-12 15:32:11 +0000
commitb2878af3223c438abeecc77d9976e56db31a5b49 (patch)
tree74ccf2cfdbec9093671eb98cb58dfe57f27461f1 /tools
parent15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 (diff)
more SvStream:operator>> conversion
Convert the template based read_lenPrefixed methods to regular methods. Change-Id: Ifd0e93aca055e55a0575e4377ec2b8e266dfb019 Reviewed-on: https://gerrit.libreoffice.org/7895 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_stream.cxx8
-rw-r--r--tools/source/inet/inetmsg.cxx4
-rw-r--r--tools/source/stream/stream.cxx4
3 files changed, 8 insertions, 8 deletions
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx
index 8389bcc1fb33..57c30e506eae 100644
--- a/tools/qa/cppunit/test_stream.cxx
+++ b/tools/qa/cppunit/test_stream.cxx
@@ -173,7 +173,7 @@ namespace
char foo[] = "\3foobar";
SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ);
- OString aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt8>(aMemStream);
+ OString aFoo = read_uInt8_lenPrefixed_uInt8s_ToOString(aMemStream);
CPPUNIT_ASSERT(aFoo == "foo");
CPPUNIT_ASSERT(aMemStream.good());
CPPUNIT_ASSERT(!aMemStream.bad());
@@ -181,7 +181,7 @@ namespace
aMemStream.Seek(0);
foo[0] = 10;
- aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt8>(aMemStream);
+ aFoo = read_uInt8_lenPrefixed_uInt8s_ToOString(aMemStream);
CPPUNIT_ASSERT(aFoo == "foobar");
CPPUNIT_ASSERT(!aMemStream.good());
CPPUNIT_ASSERT(!aMemStream.bad());
@@ -191,7 +191,7 @@ namespace
aMemStream.Seek(0);
foo[0] = 0;
foo[1] = 3;
- aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(aMemStream);
+ aFoo = read_uInt16_lenPrefixed_uInt8s_ToOString(aMemStream);
CPPUNIT_ASSERT(aFoo == "oob");
CPPUNIT_ASSERT(aMemStream.good());
CPPUNIT_ASSERT(!aMemStream.bad());
@@ -203,7 +203,7 @@ namespace
foo[1] = 0;
foo[2] = 0;
foo[3] = 0;
- aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt32>(aMemStream);
+ aFoo = read_uInt32_lenPrefixed_uInt8s_ToOString(aMemStream);
CPPUNIT_ASSERT(aFoo == "bar");
CPPUNIT_ASSERT(aMemStream.good());
CPPUNIT_ASSERT(!aMemStream.bad());
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index 9d982e0bd4a5..4c239bc643b3 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -126,7 +126,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
// Copy.
rStrm.ReadUInt32( nTemp );
m_nDocSize = nTemp;
- m_aDocName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm, RTL_TEXTENCODING_UTF8);
+ m_aDocName = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_UTF8);
sal_uIntPtr i, n = 0;
rStrm.ReadUInt32( nTemp );
@@ -1035,7 +1035,7 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
m_nIndex[i] = nTemp;
}
- m_aBoundary = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStrm);
+ m_aBoundary = read_uInt16_lenPrefixed_uInt8s_ToOString(rStrm);
rStrm.ReadUInt32( nTemp );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index bcd73c52ce2d..ea34d30fedf9 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1221,8 +1221,8 @@ OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
{
// read UTF-16 string directly from stream ?
if (eSrcCharSet == RTL_TEXTENCODING_UNICODE)
- return read_lenPrefixed_uInt16s_ToOUString<sal_uInt32>(*this);
- return read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(*this, eSrcCharSet);
+ return read_uInt32_lenPrefixed_uInt16s_ToOUString(*this);
+ return read_uInt16_lenPrefixed_uInt8s_ToOUString(*this, eSrcCharSet);
}
SvStream& SvStream::WriteUniOrByteString( const OUString& rStr, rtl_TextEncoding eDestCharSet )