diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-21 08:49:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-21 16:03:15 +0100 |
commit | e94c5f4dddad4ee1ddac18c9ffcb2353c505ce2e (patch) | |
tree | f721e719978e74123c59859ed9244963679675ed /dbaccess | |
parent | e1cff14398e470838fd2e2db77d6a2ad194a17dd (diff) |
weld joinviewmenu
Change-Id: I7c4bf69edb2a8b29ebf69ebdaa30f89123a0749b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108079
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index a51c375eaf2d..0190b36c7c77 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -33,13 +33,12 @@ #include "QueryMoveTabWinUndoAct.hxx" #include "QuerySizeTabWinUndoAct.hxx" #include <toolkit/helper/vclunohelper.hxx> -#include <vcl/menu.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> #include <vcl/ptrstyle.hxx> -#include <vcl/builder.hxx> +#include <vcl/weldutils.hxx> #include <TableWindowData.hxx> #include <JAccess.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -1118,12 +1117,13 @@ bool OJoinTableView::IsAddAllowed() return true; } -void OJoinTableView::executePopup(const Point& _aPos, VclPtr<OTableConnection>& rSelConnection) +void OJoinTableView::executePopup(const Point& rPos, VclPtr<OTableConnection>& rSelConnection) { - VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/joinviewmenu.ui", ""); - VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); - aContextMenu->Execute(this, _aPos); - OString sIdent = aContextMenu->GetCurItemIdent(); + ::tools::Rectangle aRect(rPos, Size(1, 1)); + weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/joinviewmenu.ui")); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); + OString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect); if (sIdent == "delete") RemoveConnection(rSelConnection, true); else if (sIdent == "edit") |