summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-08 14:13:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-09 16:57:56 +0100
commit55b305e21f103b74669a31b6dbed8596ecc3ca09 (patch)
tree884a5b657425a1161edf93e4ca04d98dfc9d52f8 /sd/source/ui/view
parent3edfc84c7a1df53ccea921e2dc4e42088bafcb0c (diff)
fetch/set/clear primary selection without intermediate vcl::Window
the intermediate layer doesn't do anything useful Change-Id: I00564f43db8914445ea4013c6f387c7d7c783427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/sdview2.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 5b7ba59e8e60..69790987b299 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -188,7 +188,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateDragDataObje
return pTransferable;
}
-css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDataObject( View* pWorkView, vcl::Window& rWindow )
+css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDataObject( View* pWorkView )
{
rtl::Reference<SdTransferable> pTransferable = new SdTransferable( &mrDoc, pWorkView, true );
std::unique_ptr<TransferableObjectDescriptor> pObjDesc(new TransferableObjectDescriptor);
@@ -206,7 +206,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDat
pTransferable->SetStartPos( aMarkRect.TopLeft() );
pTransferable->SetObjectDescriptor( std::move(pObjDesc) );
- pTransferable->CopyToSelection( &rWindow );
+ pTransferable->CopyToPrimarySelection();
return pTransferable;
}
@@ -216,10 +216,10 @@ void View::UpdateSelectionClipboard( bool bForceDeselect )
if( mpViewSh && mpViewSh->GetActiveWindow() )
{
if( !bForceDeselect && GetMarkedObjectList().GetMarkCount() )
- CreateSelectionDataObject( this, *mpViewSh->GetActiveWindow() );
+ CreateSelectionDataObject( this );
else if( SD_MOD()->pTransferSelection && ( SD_MOD()->pTransferSelection->GetView() == this ) )
{
- TransferableHelper::ClearSelection( mpViewSh->GetActiveWindow() );
+ TransferableHelper::ClearPrimarySelection();
SD_MOD()->pTransferSelection = nullptr;
}
}