[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 15:03:59 UTC 2020
dbaccess/source/ui/querydesign/JoinTableView.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit e94c5f4dddad4ee1ddac18c9ffcb2353c505ce2e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 21 08:49:18 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 21 16:03:15 2020 +0100
weld joinviewmenu
Change-Id: I7c4bf69edb2a8b29ebf69ebdaa30f89123a0749b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108079
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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")
More information about the Libreoffice-commits
mailing list