diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-17 15:53:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-21 10:10:58 +0000 |
commit | 92f396733ebc518bcb7a9eae2dd3169d333b82b9 (patch) | |
tree | 55cf13dea05f06d4eea95c8382f771090a3bac4b /sc/source/ui/unoobj/scdetect.cxx | |
parent | b57eceb231b61abc7121686d70df8d7c0dfacb75 (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 'sc/source/ui/unoobj/scdetect.cxx')
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 9d33f09eca2f..fd3b0d264ebd 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -734,7 +734,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) // get file header rStr.Seek( 0 ); const sal_Size nTrySize = 80; - ByteString aHeader = read_uInt8s_AsOString(rStr, nTrySize); + ByteString aHeader = read_uInt8s_ToOString(rStr, nTrySize); if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) ) { |