tdf#139493 EditViewCallbacks might not implement EditViewPopupParent

in which case fallback to the vcl::Window

Change-Id: Idc72f04ce72b1bcd42d80869e0ee86b653343a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2021-01-13 15:29:41 +00:00
parent 8453bc55a4
commit efb6e29359

View File

@@ -826,7 +826,11 @@ OutputDevice& ImpEditView::GetOutputDevice() const
weld::Widget* ImpEditView::GetPopupParent(tools::Rectangle& rRect) const
{
if (EditViewCallbacks* pCallbacks = getEditViewCallbacks())
return pCallbacks->EditViewPopupParent();
{
weld::Widget* pParent = pCallbacks->EditViewPopupParent();
if (pParent)
return pParent;
}
return weld::GetPopupParent(*pOutWin, rRect);
}