diff options
Diffstat (limited to 'fpicker/source')
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 15 | ||||
-rw-r--r-- | fpicker/source/office/commonpicker.cxx | 14 |
2 files changed, 12 insertions, 17 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index c22ebcbf9b3f..d9145866d6d5 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -719,9 +719,8 @@ void RemoteFilesDialog::SavePassword( const OUString& rURL, const OUString& rUse && m_xMasterPasswd->authorizateWithMasterPassword( Reference< XInteractionHandler>() ) ) ) { - Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( m_xContext, nullptr ), - UNO_QUERY ); + Reference< XInteractionHandler > xInteractionHandler = + InteractionHandler::createWithParent( m_xContext, nullptr ); Sequence<OUString> aPasswd { rPassword }; @@ -866,9 +865,8 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void ) { OUString sUrl( m_aServices[nPos]->GetUrl() ); - Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( m_xContext, nullptr ), - UNO_QUERY ); + Reference< XInteractionHandler > xInteractionHandler = + InteractionHandler::createWithParent( m_xContext, nullptr ); UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler ); @@ -908,9 +906,8 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void ) { OUString sUrl( m_aServices[nPos]->GetUrl() ); - Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( m_xContext, nullptr ), - UNO_QUERY ); + Reference< XInteractionHandler > xInteractionHandler = + InteractionHandler::createWithParent( m_xContext, nullptr ); UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler ); diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index 34fe024ee07a..e87d58fb739d 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -218,22 +218,20 @@ namespace svt m_xWindow = VCLUnoHelper::GetInterface( m_pDlg ); // add as event listener to the window - Reference< XComponent > xWindowComp( m_xWindow, UNO_QUERY ); - OSL_ENSURE( xWindowComp.is(), "OCommonPicker::createFileDialog: invalid window component!" ); - if ( xWindowComp.is() ) + OSL_ENSURE( m_xWindow.is(), "OCommonPicker::createFileDialog: invalid window component!" ); + if ( m_xWindow.is() ) { - m_xWindowListenerAdapter = new OWeakEventListenerAdapter( this, xWindowComp ); + m_xWindowListenerAdapter = new OWeakEventListenerAdapter( this, m_xWindow ); // the adapter will add itself as listener, and forward notifications } // _and_ add as event listener to the parent - in case the parent is destroyed // before we are disposed, our disposal would access dead VCL windows then .... m_xDialogParent = VCLUnoHelper::GetInterface( m_pDlg->GetParent() ); - xWindowComp.set(m_xDialogParent, css::uno::UNO_QUERY); - OSL_ENSURE( xWindowComp.is() || !m_pDlg->GetParent(), "OCommonPicker::createFileDialog: invalid window component (the parent this time)!" ); - if ( xWindowComp.is() ) + OSL_ENSURE( m_xDialogParent.is() || !m_pDlg->GetParent(), "OCommonPicker::createFileDialog: invalid window component (the parent this time)!" ); + if ( m_xDialogParent.is() ) { - m_xParentListenerAdapter = new OWeakEventListenerAdapter( this, xWindowComp ); + m_xParentListenerAdapter = new OWeakEventListenerAdapter( this, m_xDialogParent ); // the adapter will add itself as listener, and forward notifications } } |