summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-21 10:44:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-21 13:44:52 +0000
commitc4f0efc2378cebc3b581bc949da70a2b2f149961 (patch)
tree3c0a330f7811c9407a787cec45382993b4037a6f /basic
parent073431d26d39216a7f5f85489ecd4eb60806ee88 (diff)
convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just return the string and for writing the number of bytes written Doesn't need to be members, make standalone functions Rename to read_lenPrefixed_uInt8s_ToO[U]String and write_lenPrefixed_uInt8s_FromO[U]String, lengthy, but much less unambiguous, seeing as a lot of users of it don't seem to be aware that they read/write pascal-style length prefixed strings, which isn't surprising given the apparent simplicity of their original name. added a unit test
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/iosys.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index a2fe3bd9a096..1a63f943d5a7 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -656,7 +656,7 @@ SbError SbiStream::Read( ByteString& rBuf, sal_uInt16 n, bool bForceReadingPerBy
n = nLen;
if( !n )
return nError = SbERR_BAD_RECORD_LENGTH;
- rtl::OStringBuffer aBuffer(read_uInt8s_AsOString(*pStrm, n));
+ rtl::OStringBuffer aBuffer(read_uInt8s_ToOString(*pStrm, n));
//Pad it out with ' ' to the requested length on short read
sal_Int32 nRequested = sal::static_int_cast<sal_Int32>(n);
comphelper::string::padToLength(aBuffer, nRequested, ' ');