summaryrefslogtreecommitdiff
path: root/svx/source/editeng/impedit.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2002-07-02 09:59:44 +0000
committerMalte Timmermann <mt@openoffice.org>2002-07-02 09:59:44 +0000
commit88e5e62a45f6530f10dd17f23072463bbb0a33d3 (patch)
treef194ac660035a0939b60a4c45600af7da2f903a2 /svx/source/editeng/impedit.cxx
parentba8d2e9b6ac28efb8c678ae6ceb7c52c8c672942 (diff)
#89235# try/catch for clipboard operations
Diffstat (limited to 'svx/source/editeng/impedit.cxx')
-rw-r--r--svx/source/editeng/impedit.cxx34
1 files changed, 26 insertions, 8 deletions
diff --git a/svx/source/editeng/impedit.cxx b/svx/source/editeng/impedit.cxx
index ba761ec1eed2..c8a68a6de9eb 100644
--- a/svx/source/editeng/impedit.cxx
+++ b/svx/source/editeng/impedit.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impedit.cxx,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: mt $ $Date: 2002-06-03 13:53:10 $
+ * last change: $Author: mt $ $Date: 2002-07-02 10:59:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1244,13 +1244,21 @@ void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::d
if ( rxClipboard.is() && GetEditSelection().HasRange() )
{
uno::Reference< datatransfer::XTransferable > xData = pEditEngine->pImpEditEngine->CreateTransferable( GetEditSelection() );
+
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
- rxClipboard->setContents( xData, NULL );
- // #87756# FlushClipboard, but it would be better to become a TerminateListener to the Desktop and flush on demand...
- uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
- if( xFlushableClipboard.is() )
- xFlushableClipboard->flushClipboard();
+ try
+ {
+ rxClipboard->setContents( xData, NULL );
+
+ // #87756# FlushClipboard, but it would be better to become a TerminateListener to the Desktop and flush on demand...
+ uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
+ if( xFlushableClipboard.is() )
+ xFlushableClipboard->flushClipboard();
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
Application::AcquireSolarMutex( nRef );
@@ -1268,8 +1276,18 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat
{
if ( rxClipboard.is() )
{
+ uno::Reference< datatransfer::XTransferable > xDataObj;
+
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
- uno::Reference< datatransfer::XTransferable > xDataObj = rxClipboard->getContents();
+
+ try
+ {
+ xDataObj = rxClipboard->getContents();
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
+
Application::AcquireSolarMutex( nRef );
if ( xDataObj.is() && EditEngine::HasValidData( xDataObj ) )