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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 13 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 08223368ea20..512a3bf54915 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -630,10 +630,15 @@ ErrCode EditView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterat void EditView::Cut() { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(pImpEditView->GetClipboard()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetClipboard()); pImpEditView->CutCopy( aClipBoard, true ); } +Reference<css::datatransfer::clipboard::XClipboard> EditView::GetClipboard() const +{ + return pImpEditView->GetClipboard(); +} + css::uno::Reference< css::datatransfer::XTransferable > EditView::GetTransferable() const { uno::Reference< datatransfer::XTransferable > xData = @@ -643,19 +648,19 @@ css::uno::Reference< css::datatransfer::XTransferable > EditView::GetTransferabl void EditView::Copy() { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(pImpEditView->GetClipboard()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetClipboard()); pImpEditView->CutCopy( aClipBoard, false ); } void EditView::Paste() { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(pImpEditView->GetClipboard()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetClipboard()); pImpEditView->Paste( aClipBoard ); } void EditView::PasteSpecial() { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(pImpEditView->GetClipboard()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetClipboard()); pImpEditView->Paste(aClipBoard, true ); } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index ef5277bbc049..1d852ecec784 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1605,8 +1605,11 @@ Pair ImpEditView::Scroll( tools::Long ndX, tools::Long ndY, ScrollRangeCheck nRa Reference<css::datatransfer::clipboard::XClipboard> ImpEditView::GetClipboard() const { + if (EditViewCallbacks* pCallbacks = getEditViewCallbacks()) + return pCallbacks->GetClipboard(); if (vcl::Window* pWindow = GetWindow()) return pWindow->GetClipboard(); + SAL_WARN("editeng", "falling back to using GetSystemClipboard"); return GetSystemClipboard(); } |