diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-23 10:28:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-23 14:53:48 +0100 |
commit | acb442a5ffce156e6af4781643df76d4bebe5df5 (patch) | |
tree | d3db4dbffd022f0ab3d62fbddd4614347a4f5a10 /reportdesign | |
parent | e7f82300b9a6317ecca2a338234cc27c12b5cb2b (diff) |
construct XPopupMenu without directly creating a VCLXPopupMenu
Change-Id: If890828855a61cb315939424499949300549a968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111382
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 45b04485c51e..2e1f294b24d8 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -42,8 +42,8 @@ #include <com/sun/star/awt/PopupMenuDirection.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> #include <comphelper/propertyvalue.hxx> -#include <toolkit/awt/vclxmenu.hxx> #include <toolkit/helper/convert.hxx> +#include <tools/diagnose_ex.h> #include <RptDef.hxx> #include <SectionWindow.hxx> #include <helpids.h> @@ -432,7 +432,13 @@ void OReportSection::Command( const CommandEvent& _rCEvt ) if (!xMenuController.is()) return; - rtl::Reference<VCLXPopupMenu> xPopupMenu(new VCLXPopupMenu); + css::uno::Reference<css::awt::XPopupMenu> xPopupMenu( + xContext->getServiceManager()->createInstanceWithContext( + "com.sun.star.awt.PopupMenu", xContext), css::uno::UNO_QUERY); + + if (!xPopupMenu.is()) + return; + xMenuController->setPopupMenu(xPopupMenu); Point aPos = _rCEvt.GetMousePosPixel(); |