diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-01-24 15:50:19 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-01-24 15:50:19 +0000 |
commit | f12b425e41cdd17b0f24160cf7e4b59d92ecf561 (patch) | |
tree | 12eb81025b7f9988962b4051fce562e915f8b351 /svx/source/editeng/impedit2.cxx | |
parent | INTEGRATION: CWS editengss01 (1.55.168); FILE MERGED (diff) | |
download | core-f12b425e41cdd17b0f24160cf7e4b59d92ecf561.tar.gz core-f12b425e41cdd17b0f24160cf7e4b59d92ecf561.zip |
INTEGRATION: CWS editengss01 (1.104.40); FILE MERGED
2006/01/16 14:39:45 mt 1.104.40.2: RESYNC: (1.104-1.105); FILE MERGED
2005/12/09 12:16:02 mt 1.104.40.1: #127913# Execption for clipboard content, and avoid assertion from OnlineSpelling...
Diffstat (limited to 'svx/source/editeng/impedit2.cxx')
-rw-r--r-- | svx/source/editeng/impedit2.cxx | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx index 38e66bf2ef7e..6842beb682f2 100644 --- a/svx/source/editeng/impedit2.cxx +++ b/svx/source/editeng/impedit2.cxx @@ -4,9 +4,9 @@ * * $RCSfile: impedit2.cxx,v $ * - * $Revision: 1.105 $ + * $Revision: 1.106 $ * - * last change: $Author: rt $ $Date: 2006-01-10 14:47:40 $ + * last change: $Author: hr $ $Date: 2006-01-24 16:50:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -3355,14 +3355,20 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EDITENGINE, aFlavor ); if ( rxDataObj->isDataFlavorSupported( aFlavor ) ) { - uno::Any aData = rxDataObj->getTransferData( aFlavor ); - uno::Sequence< sal_Int8 > aSeq; - aData >>= aSeq; + try + { + uno::Any aData = rxDataObj->getTransferData( aFlavor ); + uno::Sequence< sal_Int8 > aSeq; + aData >>= aSeq; + { + SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); + aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM ); + } + bDone = TRUE; + } + catch( const ::com::sun::star::uno::Exception& ) { - SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); - aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM ); } - bDone = TRUE; } if ( !bDone ) @@ -3389,14 +3395,20 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SotExchange::GetFormatDataFlavor( SOT_FORMAT_RTF, aFlavor ); if ( rxDataObj->isDataFlavorSupported( aFlavor ) ) { - uno::Any aData = rxDataObj->getTransferData( aFlavor ); - uno::Sequence< sal_Int8 > aSeq; - aData >>= aSeq; + try + { + uno::Any aData = rxDataObj->getTransferData( aFlavor ); + uno::Sequence< sal_Int8 > aSeq; + aData >>= aSeq; + { + SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); + aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM ); + } + bDone = TRUE; + } + catch( const ::com::sun::star::uno::Exception& ) { - SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); - aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM ); } - bDone = TRUE; } } if ( !bDone ) @@ -3416,7 +3428,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer ::rtl::OUString aText; aData >>= aText; aNewSelection = ImpInsertText( rPaM, aText ); - bDone = TRUE; + bDone = TRUE; } catch( ... ) { |