From 5234dba199bcb1de2f9f92f51208c1a30c71aa14 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 7 Sep 2001 18:37:38 +0000 Subject: #90962# paste OUString instead of String from clipboard (not limited to 64k) --- sc/source/ui/docshell/impex.cxx | 12 ++++++------ sc/source/ui/inc/impex.hxx | 6 +++--- sc/source/ui/view/viewfun4.cxx | 6 +++--- sc/source/ui/view/viewfun5.cxx | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 3a92abdb4c72..70c1eab74609 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: impex.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: er $ $Date: 2001-08-06 10:21:02 $ + * last change: $Author: er $ $Date: 2001-09-07 19:36:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -380,14 +380,14 @@ inline void ScImportExport::SetNoEndianSwap( SvStream& rStrm ) } -BOOL ScImportExport::ImportString( const String& rText, ULONG nFmt ) +BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt ) { switch ( nFmt ) { // formats supporting unicode case FORMAT_STRING : { - SvMemoryStream aStrm( (void*)rText.GetBuffer(), rText.Len() * sizeof(sal_Unicode), STREAM_READ ); + SvMemoryStream aStrm( (void*)rText.getStr(), rText.getLength() * sizeof(sal_Unicode), STREAM_READ ); aStrm.SetStreamCharSet( RTL_TEXTENCODING_UNICODE ); SetNoEndianSwap( aStrm ); //! no swapping in memory return ImportStream( aStrm, nFmt ); @@ -397,8 +397,8 @@ BOOL ScImportExport::ImportString( const String& rText, ULONG nFmt ) default: { rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); - ByteString aTmp( rText, eEnc ); - SvMemoryStream aStrm( (void*)aTmp.GetBuffer(), aTmp.Len() * sizeof(sal_Char), STREAM_READ ); + ::rtl::OString aTmp( rText.getStr(), rText.getLength(), eEnc ); + SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), STREAM_READ ); aStrm.SetStreamCharSet( eEnc ); SetNoEndianSwap( aStrm ); //! no swapping in memory return ImportStream( aStrm, nFmt ); diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index dcb0f92a72db..d0928f3f4d0a 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -2,9 +2,9 @@ * * $RCSfile: impex.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: er $ $Date: 2001-07-20 18:36:24 $ + * last change: $Author: er $ $Date: 2001-09-07 19:36:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -150,7 +150,7 @@ public: void SetStreamPath( const String& rPath ) { aStreamPath = rPath; } const String& GetStreamPath() const { return aStreamPath; } - BOOL ImportString( const String&, ULONG=FORMAT_STRING ); + BOOL ImportString( const ::rtl::OUString&, ULONG=FORMAT_STRING ); BOOL ExportString( String&, ULONG=FORMAT_STRING ); BOOL ExportByteString( ByteString&, rtl_TextEncoding, ULONG=FORMAT_STRING ); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index ec1bbb07e5a4..04cbc3f5b184 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfun4.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: nn $ $Date: 2001-08-20 17:02:17 $ + * last change: $Author: er $ $Date: 2001-09-07 19:37:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -212,7 +212,7 @@ void ScViewFunc::PasteRTF( USHORT nStartCol, USHORT nStartRow, ScImportExport aImpEx( pDocSh->GetDocument(), ScAddress( nStartCol, nStartRow, GetViewData()->GetTabNo() ) ); - String aStr; + ::rtl::OUString aStr; SotStorageStreamRef xStream; if ( aDataHelper.GetSotStorageStream( SOT_FORMAT_RTF, xStream ) && xStream.Is() ) aImpEx.ImportStream( *xStream, SOT_FORMAT_RTF ); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 49da8903616e..11c3503a8435 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfun5.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: jl $ $Date: 2001-08-16 08:44:22 $ + * last change: $Author: er $ $Date: 2001-09-07 19:37:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -257,7 +257,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, ScAddress aPos( nPosX, nPosY, GetViewData()->GetTabNo() ); ScImportExport aObj( GetViewData()->GetDocument(), aPos ); - String aStr; + ::rtl::OUString aStr; SotStorageStreamRef xStream; if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.Is() ) bRet = aObj.ImportStream( *xStream, nFormatId ); -- cgit