diff options
Diffstat (limited to 'basctl/source/dlged/dlged.cxx')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 2847f58cdc5d..62109c3cc310 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -811,9 +811,8 @@ void DlgEditor::Copy() aSeqData[0] = aDialogModelBytesAny; pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavors , aSeqData ); } - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; xClipboard->setContents( pTrans , pTrans ); - Application::AcquireSolarMutex( nRef ); } } @@ -830,10 +829,13 @@ void DlgEditor::Paste() Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow().GetClipboard(); if ( xClipboard.is() ) { - // get clipboard content - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); - Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents(); - Application::AcquireSolarMutex( nRef ); + Reference< datatransfer::XTransferable > xTransf; + + { + SolarMutexReleaser aReleaser; + // get clipboard content + xTransf = xClipboard->getContents(); + } if ( xTransf.is() ) { // Is target dialog (library) localized? @@ -1061,9 +1063,9 @@ bool DlgEditor::IsPasteAllowed() if ( xClipboard.is() ) { // get clipboard content - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents(); - Application::AcquireSolarMutex( nRef ); + return xTransf.is() && xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ); } return false; |