summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-20 20:46:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-21 16:02:52 +0100
commite1cff14398e470838fd2e2db77d6a2ad194a17dd (patch)
tree2910deeb6301c580dff19927fc579c910102c9b3 /svx
parentf62e5eaf5fa0bff571331e1adad518489929272d (diff)
weld cellmenu.ui
Change-Id: I479effad8c1c6df9e325cfa0794a69f8d3426a2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/gridctrl.cxx8
1 files changed, 5 insertions, 3 deletions
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