[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 15:03:34 UTC 2020
svx/source/fmcomp/gridctrl.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit e1cff14398e470838fd2e2db77d6a2ad194a17dd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Dec 20 20:46:44 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 21 16:02:52 2020 +0100
weld cellmenu.ui
Change-Id: I479effad8c1c6df9e325cfa0794a69f8d3426a2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 41f3255e3585..509aa733a373 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2574,9 +2574,11 @@ void DbGridControl::Command(const CommandEvent& rEvt)
}
else if (canCopyCellText(nRow, nColId))
{
- VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/cellmenu.ui", "");
- VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
- if (aContextMenu->Execute(this, rEvt.GetMousePosPixel()))
+ ::tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
+ weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/cellmenu.ui"));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
copyCellText(nRow, nColId);
}
else
More information about the Libreoffice-commits
mailing list