summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx42
1 files changed, 20 insertions, 22 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index f0af59472a0a..3553707d3470 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1313,22 +1313,23 @@ void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::d
{
uno::Reference<datatransfer::XTransferable> xData = pEditEngine->CreateTransferable( GetEditSelection() );
- const sal_uInt32 nRef = Application::ReleaseSolarMutex();
-
- try
{
- rxClipboard->setContents( xData, NULL );
+ SolarMutexReleaser aReleaser;
- // #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& )
- {
- }
+ 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 );
+ }
if ( bCut )
{
@@ -1346,17 +1347,14 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat
{
uno::Reference< datatransfer::XTransferable > xDataObj;
- const sal_uInt32 nRef = Application::ReleaseSolarMutex();
-
try
- {
- xDataObj = rxClipboard->getContents();
- }
+ {
+ SolarMutexReleaser aReleaser;
+ xDataObj = rxClipboard->getContents();
+ }
catch( const ::com::sun::star::uno::Exception& )
- {
- }
-
- Application::AcquireSolarMutex( nRef );
+ {
+ }
if ( xDataObj.is() && EditEngine::HasValidData( xDataObj ) )
{