summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-04 15:18:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-04 17:48:20 +0100
commitd97a819abe84fe667f8b136b1c2adaec5ca7196e (patch)
tree385c14608eb25c8a817f3aba02991ed1e159fd56 /toolkit
parentd087459826212867e72a0031d3b2e91941140f60 (diff)
add a way to get an awt::XPopupMenu from a PopupMenu
Change-Id: Ia1cde3b60b71ed9e4d0b7dc8d9ad0b2899d60b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107229 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/helper/unowrapper.hxx3
-rw-r--r--toolkit/source/helper/unowrapper.cxx6
2 files changed, 9 insertions, 0 deletions
diff --git a/toolkit/inc/helper/unowrapper.hxx b/toolkit/inc/helper/unowrapper.hxx
index cfb890584c61..6e10e870506d 100644
--- a/toolkit/inc/helper/unowrapper.hxx
+++ b/toolkit/inc/helper/unowrapper.hxx
@@ -55,6 +55,9 @@ public:
virtual void SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer> xIFace ) override;
virtual VclPtr<vcl::Window> GetWindow(const css::uno::Reference<css::awt::XWindow>& rxWindow) override;
+ // Menu
+ virtual css::uno::Reference<css::awt::XPopupMenu> CreateMenuInterface( PopupMenu* pPopupMenu ) override;
+
void WindowDestroyed( vcl::Window* pWindow ) override;
// Accessibility
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index eb37d4137419..edac7fe62b34 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -21,6 +21,7 @@
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxwindows.hxx>
#include <toolkit/awt/vclxcontainer.hxx>
+#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/awt/vclxtopwindow.hxx>
#include <awt/vclxgraphics.hxx>
@@ -179,6 +180,11 @@ void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, css::uno::Reference<
pWindow->SetWindowPeer( xIFace, pVCLXWindow );
}
+css::uno::Reference<css::awt::XPopupMenu> UnoWrapper::CreateMenuInterface( PopupMenu* pPopupMenu )
+{
+ return new VCLXPopupMenu(pPopupMenu);
+}
+
css::uno::Reference< css::awt::XGraphics> UnoWrapper::CreateGraphics( OutputDevice* pOutDev )
{
css::uno::Reference< css::awt::XGraphics> xGrf;