summaryrefslogtreecommitdiff
path: root/svl/source
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 /svl/source
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 'svl/source')
-rw-r--r--svl/source/items/cntwall.cxx3
-rw-r--r--svl/source/numbers/zformat.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index f81bd487d48a..31ef07e8a06e 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -80,8 +80,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
readUnicodeString(rStream, _aURL, false);
// "Read" SfxWallpaperItem's string member _aFilter.
- ByteString aDummy;
- rStream.ReadByteString(aDummy);
+ read_lenPrefixed_uInt8s_ToOString(rStream);
}
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index a85491e4f30d..424aaa0204ce 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1768,8 +1768,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
void SvNumberformat::LoadString( SvStream& rStream, String& rStr )
{
CharSet eStream = rStream.GetStreamCharSet();
- ByteString aStr;
- rStream.ReadByteString( aStr );
+ ByteString aStr = read_lenPrefixed_uInt8s_ToOString(rStream);
sal_Char cStream = NfCurrencyEntry::GetEuroSymbol( eStream );
if ( aStr.Search( cStream ) == STRING_NOTFOUND )
{ // simple conversion to unicode