extract to a GetDialogParent method
Change-Id: Ibf7141fa916797d661f12bd60657df47903014f5 Reviewed-on: https://gerrit.libreoffice.org/84167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
ea2aeb6917
commit
16758bd653
2 changed files with 21 additions and 12 deletions
|
@ -1669,6 +1669,23 @@ namespace frm
|
|||
}
|
||||
}
|
||||
|
||||
css::uno::Reference<css::awt::XWindow> FormOperations::GetDialogParent() const
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindow> xDialogParent;
|
||||
|
||||
//tdf#122152 extract parent for dialog
|
||||
if (m_xController.is())
|
||||
{
|
||||
css::uno::Reference<css::awt::XControl> xContainerControl(m_xController->getContainer(), css::uno::UNO_QUERY);
|
||||
if (xContainerControl.is())
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindowPeer> xContainerPeer = xContainerControl->getPeer();
|
||||
xDialogParent = css::uno::Reference<css::awt::XWindow>(xContainerPeer, css::uno::UNO_QUERY);
|
||||
}
|
||||
}
|
||||
|
||||
return xDialogParent;
|
||||
}
|
||||
|
||||
void FormOperations::impl_executeFilterOrSort_throw( bool _bFilter ) const
|
||||
{
|
||||
|
@ -1682,18 +1699,7 @@ namespace frm
|
|||
return;
|
||||
try
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindow> xDialogParent;
|
||||
|
||||
//tdf#122152 extract parent for dialog
|
||||
if (m_xController.is())
|
||||
{
|
||||
css::uno::Reference<css::awt::XControl> xContainerControl(m_xController->getContainer(), css::uno::UNO_QUERY);
|
||||
if (xContainerControl.is())
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindowPeer> xContainerPeer = xContainerControl->getPeer();
|
||||
xDialogParent = css::uno::Reference<css::awt::XWindow>(xContainerPeer, css::uno::UNO_QUERY);
|
||||
}
|
||||
}
|
||||
css::uno::Reference<css::awt::XWindow> xDialogParent(GetDialogParent());
|
||||
|
||||
Reference< XExecutableDialog> xDialog;
|
||||
if ( _bFilter )
|
||||
|
|
|
@ -346,6 +346,9 @@ namespace frm
|
|||
FormOperations& operator=( const FormOperations& ) = delete;
|
||||
|
||||
public:
|
||||
|
||||
css::uno::Reference<css::awt::XWindow> GetDialogParent() const;
|
||||
|
||||
class MethodGuard
|
||||
{
|
||||
FormOperations& m_rOwner;
|
||||
|
|
Loading…
Reference in a new issue