diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-08 14:13:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-09 16:57:56 +0100 |
commit | 55b305e21f103b74669a31b6dbed8596ecc3ca09 (patch) | |
tree | 884a5b657425a1161edf93e4ca04d98dfc9d52f8 /editeng/source | |
parent | 3edfc84c7a1df53ccea921e2dc4e42088bafcb0c (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 'editeng/source')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 11 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 1 |
2 files changed, 2 insertions, 10 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index f42ae0071a3c..a42223732294 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1608,13 +1608,6 @@ Reference<css::datatransfer::clipboard::XClipboard> ImpEditView::GetClipboard() return GetSystemClipboard(); } -Reference<css::datatransfer::clipboard::XClipboard> ImpEditView::GetSelection() const -{ - if (vcl::Window* pWindow = GetWindow()) - return pWindow->GetPrimarySelection(); - return GetSystemPrimarySelection(); -} - bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, vcl::Window const * pFrameWin ) { bool bDone = false; @@ -1674,12 +1667,12 @@ bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent ) if ( rMouseEvent.IsMiddle() && !bReadOnly && Application::GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection ) { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetSelection()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetSystemPrimarySelection()); Paste( aClipBoard ); } else if ( rMouseEvent.IsLeft() && GetEditSelection().HasRange() ) { - Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetSelection()); + Reference<css::datatransfer::clipboard::XClipboard> aClipBoard(GetSystemPrimarySelection()); CutCopy( aClipBoard, false ); } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 8f124dd4ed84..eee427f55c6f 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -315,7 +315,6 @@ private: void InvalidateAtWindow(const tools::Rectangle& rRect); css::uno::Reference<css::datatransfer::clipboard::XClipboard> GetClipboard() const; - css::uno::Reference<css::datatransfer::clipboard::XClipboard> GetSelection() const; void SetBroadcastLOKViewCursor(bool bSet) { |