summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-14 19:40:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-15 09:48:21 +0100
commit78d1a773fe3ca3c9bf6c8ded913f4db9731d1618 (patch)
treebc0db13de193f12be3792b4987df5d9e2c376821
parent097faa945cfc7150d5c556444991f85458e9cea9 (diff)
get parent for welded menu and location to pop it up
Change-Id: I654f6edc4b8bdb0e38f70757b970893980b09638 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--editeng/source/editeng/impedit.cxx8
-rw-r--r--editeng/source/editeng/impedit.hxx1
2 files changed, 9 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 03615ca3e465..20dce95424a9 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -35,6 +35,7 @@
#include <vcl/inputctx.hxx>
#include <vcl/transfer.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/weldutils.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -822,6 +823,13 @@ OutputDevice& ImpEditView::GetOutputDevice() const
return *pOutWin;
}
+weld::Widget* ImpEditView::GetPopupParent(tools::Rectangle& rRect) const
+{
+ if (EditViewCallbacks* pCallbacks = getEditViewCallbacks())
+ return pCallbacks->EditViewPopupParent();
+ return weld::GetPopupParent(*pOutWin, rRect);
+}
+
void ImpEditView::SetOutputArea( const tools::Rectangle& rRect )
{
const OutputDevice& rOutDev = GetOutputDevice();
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 3adffe49b1eb..45088dc9bedf 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -393,6 +393,7 @@ public:
void ScrollStateChange();
OutputDevice& GetOutputDevice() const;
+ weld::Widget* GetPopupParent(tools::Rectangle& rRect) const;
vcl::Window* GetWindow() const { return pOutWin; }
void SetSelectionMode( EESelectionMode eMode );