diff options
-rw-r--r-- | sc/source/filter/excel/excrecds.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 7 | ||||
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp2.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/excrecds.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/htmlexp.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xeescher.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/inc/xistream.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/lotus/expop.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 40 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/docshell/servobj.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/impex.hxx | 2 |
17 files changed, 80 insertions, 68 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 9e39fad69319..71a193946ee7 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -410,9 +410,9 @@ sal_uInt16 ExcBundlesheetBase::GetNum( void ) const ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) : ExcBundlesheetBase( rRootData, _nTab ) { - String sTabName = rRootData.pER->GetTabInfo().GetScTabName( _nTab ); - OSL_ENSURE( sTabName.Len() < 256, "ExcBundlesheet::ExcBundlesheet - table name too long" ); - aName = ByteString( sTabName, rRootData.pER->GetTextEncoding() ); + rtl::OUString sTabName = rRootData.pER->GetTabInfo().GetScTabName( _nTab ); + OSL_ENSURE( sTabName.getLength() < 256, "ExcBundlesheet::ExcBundlesheet - table name too long" ); + aName = rtl::OUStringToOString(sTabName, rRootData.pER->GetTextEncoding()); } @@ -421,13 +421,13 @@ void ExcBundlesheet::SaveCont( XclExpStream& rStrm ) nOwnPos = rStrm.GetSvStreamPos(); rStrm << (sal_uInt32) 0x00000000 // dummy (stream position of the sheet) << nGrbit; - rStrm.WriteByteString( aName ); // 8 bit length, max 255 chars + rStrm.WriteByteString(aName); // 8 bit length, max 255 chars } sal_Size ExcBundlesheet::GetLen() const { - return 7 + Min( aName.Len(), (xub_StrLen) 255 ); + return 7 + Min( aName.getLength(), (sal_Int32) 255 ); } diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index bcfd95aaf200..1d879450a8c0 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -384,12 +384,13 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU mnFlags |= EXC_HLINK_ABS; mnFlags |= EXC_HLINK_BODY; - ByteString aAsciiLink( aFileName, rRoot.GetTextEncoding() ); + rtl::OString aAsciiLink(rtl::OUStringToOString(aFileName, + rRoot.GetTextEncoding())); XclExpString aLink( aFileName, EXC_STR_FORCEUNICODE, 255 ); aXclStrm << XclTools::maGuidFileMoniker << nLevel - << sal_uInt32( aAsciiLink.Len() + 1 ); // string length + 1 trailing zero byte - aXclStrm.Write( aAsciiLink.GetBuffer(), aAsciiLink.Len() ); + << sal_uInt32( aAsciiLink.getLength() + 1 ); // string length + 1 trailing zero byte + aXclStrm.Write( aAsciiLink.getStr(), aAsciiLink.getLength() ); aXclStrm << sal_uInt8( 0 ) << sal_uInt32( 0xDEADFFFF ); aXclStrm.WriteZeroBytes( 20 ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 2a290c3c1535..3d1e3d748e6c 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1234,7 +1234,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos, switch( rRoot.GetBiff() ) { case EXC_BIFF5: - maNoteText = ByteString( aNoteText, rRoot.GetTextEncoding() ); + maNoteText = rtl::OUStringToOString(aNoteText, rRoot.GetTextEncoding()); break; case EXC_BIFF8: @@ -1276,15 +1276,15 @@ void XclExpNote::Save( XclExpStream& rStrm ) case EXC_BIFF5: { // write the NOTE record directly, there may be the need to create more than one - const sal_Char* pcBuffer = maNoteText.GetBuffer(); - sal_uInt16 nCharsLeft = static_cast< sal_uInt16 >( maNoteText.Len() ); + const sal_Char* pcBuffer = maNoteText.getStr(); + sal_uInt16 nCharsLeft = static_cast< sal_uInt16 >( maNoteText.getLength() ); while( nCharsLeft ) { sal_uInt16 nWriteChars = ::std::min( nCharsLeft, EXC_NOTE5_MAXLEN ); rStrm.StartRecord( EXC_ID_NOTE, 6 + nWriteChars ); - if( pcBuffer == maNoteText.GetBuffer() ) + if( pcBuffer == maNoteText.getStr() ) { // first record: row, col, length of complete text rStrm << static_cast< sal_uInt16 >( maScPos.Row() ) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 8d7119028576..3cd38c794dd0 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -348,10 +348,10 @@ void XclExpStream::WriteUnicodeBuffer( const ScfUInt16Vec& rBuffer, sal_uInt8 nF // Xcl has an obscure sense of whether starting a new record or not, // and crashes if it encounters the string header at the very end of a record. // Thus we add 1 to give some room, seems like they do it that way but with another count (10?) -void XclExpStream::WriteByteString( const ByteString& rString, sal_uInt16 nMaxLen, bool b16BitCount ) +void XclExpStream::WriteByteString( const rtl::OString& rString, sal_uInt16 nMaxLen, bool b16BitCount ) { SetSliceSize( 0 ); - sal_Size nLen = ::std::min< sal_Size >( rString.Len(), nMaxLen ); + sal_Size nLen = ::std::min< sal_Size >( rString.getLength(), nMaxLen ); if( !b16BitCount ) nLen = ::std::min< sal_Size >( nLen, 0xFF ); @@ -364,7 +364,7 @@ void XclExpStream::WriteByteString( const ByteString& rString, sal_uInt16 nMaxLe operator<<( static_cast< sal_uInt16 >( nLen ) ); else operator<<( static_cast< sal_uInt8 >( nLen ) ); - Write( rString.GetBuffer(), nLen ); + Write( rString.getStr(), nLen ); } void XclExpStream::WriteCharBuffer( const ScfUInt8Vec& rBuffer ) diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index 607caeddaf52..bfeeb1bb939b 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -198,7 +198,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf, - const ByteString& rImgOptions, sal_uLong nXOutFlags ) + const rtl::OString& rImgOptions, sal_uLong nXOutFlags ) { // embeddete Grafik -> via WriteGraphic schreiben if( !rLinkName.Len() ) @@ -241,8 +241,8 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf, HTMLOutFuncs::Out_String( rStrm, URIHelper::simpleNormalizedMakeRelative( aBaseURL, rLinkName ), eDestEnc ) << '\"'; - if ( rImgOptions.Len() ) - rStrm << rImgOptions.GetBuffer(); + if ( rImgOptions.getLength() ) + rStrm << rImgOptions.getStr(); rStrm << '>' << sNewLine << GetIndentStr(); } } diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index 747ca082e551..2d15ba485876 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -295,7 +295,7 @@ public: class ExcBundlesheet : public ExcBundlesheetBase { private: - ByteString aName; + rtl::OString aName; virtual void SaveCont( XclExpStream& rStrm ); diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx index ecf90b425e45..3fd3ad651cac 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -132,7 +132,7 @@ class ScHTMLExport : public ScExportBase void WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ); void WriteGraphEntry( ScHTMLGraphEntry* ); void WriteImage( String& rLinkName, - const Graphic&, const ByteString& rImgOptions, + const Graphic&, const rtl::OString& rImgOptions, sal_uLong nXOutFlags = 0 ); // nXOutFlags fuer XOutBitmap::WriteGraphic diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index 34c80c4021ea..7f2cc1fdd8b3 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -376,7 +376,7 @@ private: private: XclExpString maAuthor; /// Name of the author. String maOrigNoteText; /// Original main text of the note. - ByteString maNoteText; /// Main text of the note (<=BIFF7). + rtl::OString maNoteText; /// Main text of the note (<=BIFF7). XclExpStringRef mpNoteContents; /// Text and formatting data (OOXML) ScAddress maScPos; /// Calc cell address of the note. sal_uInt16 mnObjId; /// Escher object ID (BIFF8). diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 1af271b42570..7d4abbeeb7ce 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -50,7 +50,6 @@ /* ============================================================================ Output stream class for Excel export - CONTINUE record handling -- ByteString and UniString support ============================================================================ */ class XclExpRoot; @@ -143,9 +142,9 @@ public: // *** write 8-bit-strings *** // (slice length setting has no effect here -> disabled automatically) - /** Writes string length field and ByteString buffer. */ + /** Writes string length field and rtl::OString buffer. */ void WriteByteString( - const ByteString& rString, + const rtl::OString& rString, sal_uInt16 nMaxLen = 0x00FF, bool b16BitCount = false ); diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx index 238997e7a000..ac5a84a610dd 100644 --- a/sc/source/filter/inc/xistream.hxx +++ b/sc/source/filter/inc/xistream.hxx @@ -40,7 +40,6 @@ class XclImpRoot; /* ============================================================================ Input stream class for Excel import - CONTINUE record handling -- ByteString and UniString support - Decryption ============================================================================ */ diff --git a/sc/source/filter/lotus/expop.cxx b/sc/source/filter/lotus/expop.cxx index c1b0ae23a4e2..3c80c0ba1078 100644 --- a/sc/source/filter/lotus/expop.cxx +++ b/sc/source/filter/lotus/expop.cxx @@ -164,11 +164,11 @@ void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const Strin OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Label(): Row > WK1MAXROW" ); - ByteString aStr( rStr, eZielChar ); + rtl::OString aStr(rtl::OUStringToOString(rStr, eZielChar)); sal_uInt16 nLaenge = 7; // Anzahl Bytes vor String+Nullbyte am Ende + Alignment-Char - xub_StrLen nAnz = aStr.Len(); + sal_Int32 nAnz = aStr.getLength(); if( nAnz > 240 ) // max. 240 Zeichen im String @@ -179,7 +179,7 @@ void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const Strin aOut << ( sal_uInt16 ) 0x0F << nLaenge << GenFormByte( aAttr ) << nCol << nRow << ( sal_Char ) '\''; // ACHTUNG: ZUNAECHST NUR LEFT ALIGNMENT - aOut.Write( aStr.GetBuffer(), nAnz ); + aOut.Write( aStr.getStr(), nAnz ); aOut << ( sal_uInt8 ) 0x00; // ...und Nullterminator anhaengen } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index ba9d4fc60480..a86d9edf0d62 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -66,6 +66,7 @@ #include <svx/xmleohlp.hxx> #include <rtl/logfile.hxx> +#include <rtl/strbuf.hxx> #include <unotools/saveopt.hxx> #include "document.hxx" @@ -220,9 +221,10 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe { #if OSL_DEBUG_LEVEL > 0 - ByteString aError( "SAX parse exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "SAX parse exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, RTL_TEXTENCODING_ASCII_US)); + OSL_FAIL(aError.getStr()); #endif String sErr( String::CreateFromInt32( r.LineNumber )); @@ -256,9 +258,11 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe { #if OSL_DEBUG_LEVEL > 0 - ByteString aError( "SAX exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "SAX exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + OSL_FAIL(aError.getStr()); #endif (void)r; // avoid warning in product version @@ -268,9 +272,11 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe catch( const packages::zip::ZipIOException& r ) { #if OSL_DEBUG_LEVEL > 0 - ByteString aError( "Zip exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "Zip exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + OSL_FAIL( aError.getStr() ); #endif (void)r; // avoid warning in product version @@ -279,9 +285,11 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe catch( const io::IOException& r ) { #if OSL_DEBUG_LEVEL > 0 - ByteString aError( "IO exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "IO exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + OSL_FAIL(aError.getStr()); #endif (void)r; // avoid warning in product version @@ -290,9 +298,11 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe catch( const uno::Exception& r ) { #if OSL_DEBUG_LEVEL > 0 - ByteString aError( "uno exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "uno exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + OSL_FAIL(aError.getStr()); #endif (void)r; // avoid warning in product version diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 23355664b27b..b392c2dc170e 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -39,20 +39,21 @@ #include "scitems.hxx" #include "rangelst.hxx" #include <editeng/flstitem.hxx> -#include <svx/pageitem.hxx> #include <editeng/paperinf.hxx> -#include <svx/postattr.hxx> #include <editeng/sizeitem.hxx> -#include <unotools/misccfg.hxx> +#include <rtl/strbuf.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> #include <sfx2/docfile.hxx> #include <sfx2/printer.hxx> #include <svtools/ctrltool.hxx> +#include <svx/pageitem.hxx> +#include <svx/postattr.hxx> +#include <unotools/localedatawrapper.hxx> +#include <unotools/misccfg.hxx> #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> -#include <unotools/localedatawrapper.hxx> #include "docsh.hxx" #include "docshimp.hxx" @@ -963,9 +964,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck String aValue; if ( eSourceType == SC_CAT_CONTENT ) ((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue ); - ByteString aError( aValue, gsl_getSystemTextEncoding() ); - aError += " weggelassen"; - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(rtl::OUStringToOString(aValue, + osl_getThreadTextEncoding())); + aError.append(RTL_CONSTASCII_STRINGPARAM(" weggelassen")); + OSL_FAIL( aError.getStr() ); #endif } else diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 858809bcda24..cb30e00b5a29 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2018,10 +2018,11 @@ long ScDocShell::DdeGetData( const String& rItem, { if( rItem.EqualsIgnoreCaseAscii( "Format" ) ) { - ByteString aFmtByte( aDdeTextFmt, gsl_getSystemTextEncoding() ); + rtl::OString aFmtByte(rtl::OUStringToOString(aDdeTextFmt, + osl_getThreadTextEncoding())); rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( - (sal_Int8*)aFmtByte.GetBuffer(), - aFmtByte.Len() + 1 ); + (const sal_Int8*)aFmtByte.getStr(), + aFmtByte.getLength() + 1 ); return 1; } ScImportExport aObj( &aDocument, rItem ); @@ -2033,13 +2034,13 @@ long ScDocShell::DdeGetData( const String& rItem, if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { - ByteString aData; + rtl::OString aData; if( aObj.ExportByteString( aData, gsl_getSystemTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) { rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( - (sal_Int8*)aData.GetBuffer(), - aData.Len() + 1 ); + (const sal_Int8*)aData.getStr(), + aData.getLength() + 1 ); return 1; } else diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index f8b0a9cf51b7..146ff58dff78 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -342,9 +342,9 @@ sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt ) if ( nFmt != FORMAT_STRING ) { rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); - ByteString aTmp; + rtl::OString aTmp; sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt ); - rText = UniString( aTmp, eEnc ); + rText = rtl::OStringToOUString( aTmp, eEnc ); return bOk; } // nSizeLimit not needed for OUString @@ -368,7 +368,7 @@ sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt ) } -sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt ) +sal_Bool ScImportExport::ExportByteString( rtl::OString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt ) { OSL_ENSURE( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" ); if ( eEnc == RTL_TEXTENCODING_UNICODE ) @@ -392,7 +392,7 @@ sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding e return sal_True; } } - rText.Erase(); + rText = rtl::OString(); return false; } @@ -534,8 +534,8 @@ void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rS } else { - ByteString aByteStr( rString, eEnc ); - rStrm << aByteStr.GetBuffer(); + rtl::OString aByteStr(rtl::OUStringToOString(rString, eEnc)); + rStrm << aByteStr.getStr(); if ( bZero ) rStrm << sal_Char(0); } @@ -1560,7 +1560,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) { String aLine; String aText; - ByteString aByteLine; + rtl::OString aByteLine; SCCOL nCol = nStartCol; SCROW nRow = nStartRow; SCCOL nRefCol = 1; @@ -1570,7 +1570,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) { //! allow unicode rStrm.ReadLine( aByteLine ); - aLine = String( aByteLine, rStrm.GetStreamCharSet() ); + aLine = rtl::OStringToOUString(aByteLine, rStrm.GetStreamCharSet()); if( rStrm.IsEof() ) break; const sal_Unicode* p = aLine.GetBuffer(); diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index 6bd9f6d629bf..d5422549fd32 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -188,12 +188,12 @@ sal_Bool ScServerObject::GetData( if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { - ByteString aByteData; + rtl::OString aByteData; if( aObj.ExportByteString( aByteData, gsl_getSystemTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) { rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >( - (sal_Int8*)aByteData.GetBuffer(), - aByteData.Len() + 1 ); + (const sal_Int8*)aByteData.getStr(), + aByteData.getLength() + 1 ); return 1; } return 0; diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index a4c28b1150e7..302cf4e5c627 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -136,7 +136,7 @@ public: sal_Bool ImportString( const ::rtl::OUString&, sal_uLong=FORMAT_STRING ); sal_Bool ExportString( ::rtl::OUString&, sal_uLong=FORMAT_STRING ); - sal_Bool ExportByteString( ByteString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING ); + sal_Bool ExportByteString( ::rtl::OString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING ); sal_Bool ImportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING ); sal_Bool ExportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING ); |