diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-09 22:36:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-10 09:28:39 +0000 |
commit | 5dbd8286f4623015d6012d20ad24c301e57ca96f (patch) | |
tree | 6db4a82962dd7436aa4dae33c59a5a47559103bf /sot | |
parent | 180dcdecac80e87f4984024c24f4beeef9dbf766 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgole.cxx | 6 | ||||
-rw-r--r-- | sot/source/sdstor/storinfo.cxx | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index 8ae6af18f7b7..091704614574 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -153,14 +153,14 @@ sal_Bool StgCompObjStream::Store() if( GetError() != SVSTREAM_OK ) return sal_False; Seek( 0L ); - ByteString aAsciiUserName( aUserName, RTL_TEXTENCODING_MS_1252 ); + rtl::OString aAsciiUserName(rtl::OUStringToOString(aUserName, RTL_TEXTENCODING_MS_1252)); *this << (sal_Int16) 1 // Version? << (sal_Int16) -2 // 0xFFFE = Byte Order Indicator << (sal_Int32) 0x0A03 // Windows 3.10 << (sal_Int32) -1L << aClsId // Class ID - << (sal_Int32) (aAsciiUserName.Len() + 1) - << (const char *)aAsciiUserName.GetBuffer() + << (sal_Int32) (aAsciiUserName.getLength() + 1) + << (const char *)aAsciiUserName.getStr() << (sal_uInt8) 0; // string terminator WriteClipboardFormat( *this, nCbFormat ); *this << (sal_Int32) 0; // terminator diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index 5f1768b8e7ef..4d609cb6eeea 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -82,9 +82,10 @@ void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ) aCbFmt = SotExchange::GetFormatName( nFormat ); if( aCbFmt.Len() ) { - ByteString aAsciiCbFmt( aCbFmt, RTL_TEXTENCODING_ASCII_US ); - rStm << (sal_Int32) (aAsciiCbFmt.Len() + 1); - rStm << (const char *)aAsciiCbFmt.GetBuffer(); + rtl::OString aAsciiCbFmt(rtl::OUStringToOString(aCbFmt, + RTL_TEXTENCODING_ASCII_US)); + rStm << (sal_Int32) (aAsciiCbFmt.getLength() + 1); + rStm << (const char *)aAsciiCbFmt.getStr(); rStm << (sal_uInt8) 0; } else if( nFormat ) |