diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-10 16:11:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-10 21:38:59 +0100 |
commit | c913406274eb794115e6ce00abf8b01a098d2f37 (patch) | |
tree | c07ff77d0c44d26d740341545e432f012d7f33ac /include | |
parent | 7cef2f69f8553380e77ab0efab4018a010e3d9cd (diff) |
add a way to provide a parent for a popup menu
Change-Id: Ic21726f243248a4b09f9e2f462e53df2e39df7df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107570
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/editview.hxx | 6 | ||||
-rw-r--r-- | include/svx/weldeditview.hxx | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index e89cd356be72..5552e05b1313 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -45,6 +45,7 @@ class OutlinerViewShell; class SvxSearchItem; class SvxFieldItem; namespace vcl { class Window; } +namespace weld { class Widget; } class KeyEvent; class MouseEvent; class CommandEvent; @@ -108,6 +109,11 @@ public: // return the OutputDevice that the EditView will draw to virtual OutputDevice& EditViewOutputDevice() const = 0; + virtual weld::Widget* EditViewPopupParent() const + { + return nullptr; + } + // Triggered to update InputEngine context information virtual void EditViewInputContext(const InputContext& rInputContext) = 0; diff --git a/include/svx/weldeditview.hxx b/include/svx/weldeditview.hxx index 1b96c4954da9..930573f97856 100644 --- a/include/svx/weldeditview.hxx +++ b/include/svx/weldeditview.hxx @@ -89,6 +89,8 @@ protected: SetCursorRect(rRefDevice.LogicToPixel(rRect), rRefDevice.LogicToPixel(Size(nExtTextInputWidth, 0)).Width()); } + + virtual weld::Widget* EditViewPopupParent() const override { return GetDrawingArea(); } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |