From c75bc340346cd75c03cd87da66c46bf0c8482df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 19 Dec 2020 21:02:39 +0000 Subject: [PATCH] weld xmlsecstatmenu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic3e2df5b11b5f7ff8938913472ac60aecc0e2c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108034 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/stbctrls/xmlsecctrl.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index bd351e4be3c4..20c6e7d50ed4 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -18,12 +18,12 @@ */ -#include -#include -#include -#include #include +#include #include +#include +#include +#include #include #include @@ -101,9 +101,11 @@ void XmlSecStatusBarControl::Command( const CommandEvent& rCEvt ) { if( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { - VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/xmlsecstatmenu.ui", ""); - VclPtr aPopupMenu(aBuilder.get_menu("menu")); - if (aPopupMenu->Execute(&GetStatusBar(), rCEvt.GetMousePosPixel())) + tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1)); + weld::Window* pPopupParent = weld::GetPopupParent(GetStatusBar(), aRect); + std::unique_ptr xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/xmlsecstatmenu.ui")); + std::unique_ptr xPopMenu(xBuilder->weld_menu("menu")); + if (!xPopMenu->popup_at_rect(pPopupParent, aRect).isEmpty()) { css::uno::Any a; SfxUInt16Item aState( GetSlotId(), 0 );