summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-23 10:22:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-23 12:32:50 +0100
commitc9dda083b401516500afff024ce3f663292db341 (patch)
tree2d09488e8f22ee389c8a61d4067e6b7cbfc36804 /reportdesign/source
parent8e7e9e4f176ea35786cac96935d8692997a3d701 (diff)
use XPopupMenu::execute to run the menu
instead of cheating and pulling the vcl::Menu out of it Change-Id: I09292eaf8b3f5e32fc1e27e0020b84606cdf67cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111381 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 690e40e93892..45b04485c51e 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -39,6 +39,7 @@
#include <svx/dbaexchange.hxx>
#include <svx/sdtagitm.hxx>
+#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <comphelper/propertyvalue.hxx>
#include <toolkit/awt/vclxmenu.hxx>
@@ -50,7 +51,6 @@
#include <rptui_slotid.hrc>
#include <vcl/commandevent.hxx>
-#include <vcl/menu.hxx>
#include <svl/itempool.hxx>
#include <svtools/extcolorcfg.hxx>
@@ -437,7 +437,10 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
Point aPos = _rCEvt.GetMousePosPixel();
m_pView->EndAction();
- static_cast<PopupMenu*>(xPopupMenu->GetMenu())->Execute(this, aPos);
+
+ xPopupMenu->execute(GetComponentInterface(),
+ css::awt::Rectangle(aPos.X(), aPos.Y(), 1, 1),
+ css::awt::PopupMenuDirection::EXECUTE_DOWN);
css::uno::Reference<css::lang::XComponent> xComponent(xMenuController, css::uno::UNO_QUERY);
xComponent->dispose();