summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-21 10:13:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-21 22:00:18 +0100
commitdfcdf910b7dd155b562c568ccb87e43bbd102b8e (patch)
treeb07e3e382bd168929ddd5e6ab0c969c8e1f2f1b5 /dbaccess
parentfc4d0639ee47776f1014d26ecfdcfb571cd73700 (diff)
weld jointablemenu
Change-Id: Ie7beb73c6b685b131e7353c2e96b68e564c39351 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108089 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 91518656621b..5334bfd76e2d 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -26,11 +26,12 @@
#include <JoinDesignView.hxx>
#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
-#include <vcl/wall.hxx>
#include <vcl/settings.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <vcl/ptrstyle.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/weldutils.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/container/XContainer.hpp>
@@ -560,9 +561,11 @@ void OTableWindow::Command(const CommandEvent& rEvt)
ptWhere = m_xTitle->GetPosPixel();
}
- VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/jointablemenu.ui", "");
- VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
- if (aContextMenu->Execute(this, ptWhere))
+ ::tools::Rectangle aRect(ptWhere, Size(1, 1));
+ weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/jointablemenu.ui"));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
Remove();
}
break;