diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-06 11:32:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-06 17:06:50 +0200 |
commit | 130486015f03087aa4c2c43709ce95fb494df44b (patch) | |
tree | fdfc094a8ebc20e4a2e511928c7b53e4bc733475 /svx/source/form | |
parent | ed7271d9d44fe1a0195ae669644f23c01b6960d8 (diff) |
use Widget::get_clipboard
there's no different from GetSystemClipboard except potentially for
the libreofficekit case where per-frame clipboards are possible
Change-Id: I3173e39f81a03a7cbe114ebca6020d5ed36a659a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115179
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmexch.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/navigatortree.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index 002b3b6175fc..720c3720fe72 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -34,7 +34,7 @@ namespace svxform { } - void OLocalExchange::copyToClipboard(const GrantAccess&) + void OLocalExchange::copyToClipboard(const weld::Widget& rWidget, const GrantAccess&) { if ( m_bClipboardOwner ) { // simulate a lostOwnership to notify parties interested in @@ -42,7 +42,7 @@ namespace svxform } m_bClipboardOwner = true; - CopyToClipboard(GetSystemClipboard()); + CopyToClipboard(rWidget.get_clipboard()); } void OLocalExchange::clear() @@ -320,10 +320,10 @@ namespace svxform implReset(); } - void OLocalExchangeHelper::copyToClipboard( ) const + void OLocalExchangeHelper::copyToClipboard(const weld::Widget& rWidget) const { DBG_ASSERT( m_xTransferable.is(), "OLocalExchangeHelper::copyToClipboard: not prepared!" ); - m_xTransferable->copyToClipboard(OLocalExchange::GrantAccess()); + m_xTransferable->copyToClipboard(rWidget, OLocalExchange::GrantAccess()); } void OLocalExchangeHelper::implReset() diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index bade46460186..42947238be2d 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -700,7 +700,7 @@ namespace svxform return false; // get the clipboard - TransferableDataHelper aClipboardContent(TransferableDataHelper::CreateFromClipboard(GetSystemClipboard())); + TransferableDataHelper aClipboardContent(TransferableDataHelper::CreateFromClipboard(m_xTreeView->get_clipboard())); sal_Int8 nAction = m_aControlExchange.isClipboardOwner() && doingKeyboardCut( ) ? DND_ACTION_MOVE : DND_ACTION_COPY; std::unique_ptr<weld::TreeIter> xSelected(m_xTreeView->make_iterator()); @@ -1157,7 +1157,7 @@ namespace svxform else { // the clipboard content - Reference< XClipboard > xClipboard( GetSystemClipboard() ); + Reference< XClipboard > xClipboard(m_xTreeView->get_clipboard()); Reference< XTransferable > xTransferable; if ( xClipboard.is() ) xTransferable = xClipboard->getContents(); @@ -1177,7 +1177,7 @@ namespace svxform if ( implPrepareExchange( DND_ACTION_COPY ) ) { m_aControlExchange.setClipboardListener( LINK( this, NavigatorTree, OnClipboardAction ) ); - m_aControlExchange.copyToClipboard( ); + m_aControlExchange.copyToClipboard(*m_xTreeView); } } @@ -1210,7 +1210,7 @@ namespace svxform return; m_aControlExchange.setClipboardListener( LINK( this, NavigatorTree, OnClipboardAction ) ); - m_aControlExchange.copyToClipboard( ); + m_aControlExchange.copyToClipboard(*m_xTreeView); m_bKeyboardCut = true; // mark all the entries we just "cut" into the clipboard as "nearly moved" |