[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 21:01:12 UTC 2020
dbaccess/source/ui/querydesign/TableWindow.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit dfcdf910b7dd155b562c568ccb87e43bbd102b8e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 21 10:13:21 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 21 22:00:18 2020 +0100
weld jointablemenu
Change-Id: Ie7beb73c6b685b131e7353c2e96b68e564c39351
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108089
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list