summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-23 20:23:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-24 10:08:38 +0100
commit7a6c6712698efc4cdf4b941db565634aae73279c (patch)
tree0abf46da8566ec24851a2d518e04f7c7dad09240 /sfx2
parentc5fd81769e7c683a8e4c73caaf85954f0df48de4 (diff)
use XPopupMenu::execute to run the menu
instead of cheating and pulling the vcl::Menu out of it Change-Id: I498f4577c1e677e860ccb3bf394adbca298f074a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111435 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/notebookbar/NotebookbarTabControl.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
index dd2e1fba5129..485b7f8da3a6 100644
--- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx
+++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
@@ -19,7 +19,6 @@
#include <vcl/builderfactory.hxx>
#include <vcl/layout.hxx>
-#include <vcl/menu.hxx>
#include <vcl/notebookbar/notebookbar.hxx>
#include <vcl/tabpage.hxx>
#include <sfx2/viewfrm.hxx>
@@ -30,7 +29,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/uno/Reference.h>
-#include <toolkit/awt/vclxmenu.hxx>
+#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
@@ -348,10 +347,10 @@ IMPL_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebo
return;
xPopupController->setPopupMenu(xPopupMenu);
- VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>(xPopupMenu);
- PopupMenu* pVCLMenu = static_cast<PopupMenu*>(pAwtMenu->GetMenu());
Point aPos(pNotebookbar->GetSizePixel().getWidth(), NotebookbarTabControl::GetHeaderHeight() - ICON_SIZE + 10);
- pVCLMenu->Execute(pNotebookbar, tools::Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose);
+ xPopupMenu->execute(pNotebookbar->GetComponentInterface(),
+ css::awt::Rectangle(aPos.X(), aPos.Y(), 1, 1),
+ css::awt::PopupMenuDirection::EXECUTE_DOWN);
Reference<css::lang::XComponent> xComponent(xPopupController, UNO_QUERY);
if (xComponent.is())