summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/romenu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/docvw/romenu.cxx')
-rw-r--r--sw/source/uibase/docvw/romenu.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index 301c083220d4..a06abe1b5a1f 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -282,7 +282,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
return;
}
- TransferDataContainer* pClipCntnr = nullptr;
+ rtl::Reference<TransferDataContainer> pClipCntnr;
sal_uInt16 nExecId = USHRT_MAX;
bool bFilterSet = false;
@@ -351,10 +351,8 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
if( bFilterSet )
::LoadURL(rSh, sURL, nFilter, sTargetFrameName);
- if( pClipCntnr )
+ if( pClipCntnr && pClipCntnr->HasAnyData() )
{
- css::uno::Reference< css::datatransfer::XTransferable > xRef( pClipCntnr );
- if( pClipCntnr->HasAnyData() )
pClipCntnr->CopyToClipboard( pWin );
}
}