summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/dlged/dlged.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index f8ac1f4e6561..8b698c407230 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -822,7 +822,6 @@ void DlgEditor::Paste()
if ( xClipboard.is() )
{
Reference< datatransfer::XTransferable > xTransf;
-
{
SolarMutexReleaser aReleaser;
// get clipboard content
@@ -1051,11 +1050,14 @@ bool DlgEditor::IsPasteAllowed()
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow().GetClipboard();
if ( xClipboard.is() )
{
- // get clipboard content
- SolarMutexReleaser aReleaser;
- Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents();
-
- return xTransf.is() && xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] );
+ Reference< datatransfer::XTransferable > xTransf;
+ {
+ SolarMutexReleaser aReleaser;
+ // get clipboard content
+ xTransf = xClipboard->getContents();
+ }
+ if (xTransf.is())
+ return xTransf->isDataFlavorSupported(m_ClipboardDataFlavors[0]);
}
return false;
}