reportdesign/source/ui/report/ReportSection.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit c9dda083b401516500afff024ce3f663292db341 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Feb 23 10:22:56 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Feb 23 12:32:50 2021 +0100 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 <caol...@redhat.com> 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits