diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-26 15:24:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-05-26 17:07:18 +0100 |
commit | 7417311fc0f888223ae05f1cfc750de1735c5c9e (patch) | |
tree | 9ab96564d186f05ace836821b7a4dce2af84b508 /svtools | |
parent | 8cce65007b506da38ca79ee8b5cdd62a1460fddd (diff) |
Resolves: tdf#96279 set correct parents for password dialogs
otherwise on Dialog::Execute before it becomes visible and
a password dialog is needed the new dialog will automatically
look for a parent, but will be parented by the main window
because the dialog it should be a parent of is not visible
yet.
Change-Id: Ia34e43d7ef2b204b348f2eb5aab542ee8ffe840e
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 5 | ||||
-rw-r--r-- | svtools/source/contnr/foldertree.cxx | 5 | ||||
-rw-r--r-- | svtools/source/dialogs/PlaceEditDialog.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 10 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 |
5 files changed, 14 insertions, 10 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 13bf306a4dd6..7ccefa53ef48 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -29,6 +29,7 @@ #include <svtools/svtabbx.hxx> #include <svtools/svtools.hrc> #include <svtools/viewdataentry.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include "fileview.hrc" #include "contentenumeration.hxx" #include <svtools/AccessibleBrowseBoxObjType.hxx> @@ -533,7 +534,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW ); + InteractionHandler::createWithParent(xContext, VCLUnoHelper::GetInterface(GetParentDialog())), UNO_QUERY_THROW ); mxCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); @@ -977,7 +978,7 @@ SvtFileView::SvtFileView( vcl::Window* pParent, WinBits nBits, Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW ); + InteractionHandler::createWithParent(xContext, VCLUnoHelper::GetInterface(GetParentDialog())), UNO_QUERY_THROW ); Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); mpImpl.reset( new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder ) ); diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx index 40ed9d538544..086ba62e48f0 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/svtools/source/contnr/foldertree.cxx @@ -8,7 +8,8 @@ */ #include <svtools/foldertree.hxx> - +#include <toolkit/helper/vclunohelper.hxx> +#include <vcl/dialog.hxx> #include "contentenumeration.hxx" FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits ) @@ -18,7 +19,7 @@ FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( xContext, nullptr ), UNO_QUERY_THROW ); + InteractionHandler::createWithParent(xContext, VCLUnoHelper::GetInterface(GetParentDialog())), UNO_QUERY_THROW ); m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); SetDefaultCollapsedEntryBmp( m_aFolderImage ); diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 137cec3c8448..c0543806d967 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -184,7 +184,7 @@ void PlaceEditDialog::InitDetails( ) nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos ); - std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl)); + std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, this, sUrl)); xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) ); m_aDetailsContainers.push_back(xCmisDetails); diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index be071d5c52f4..2fc608b7b4af 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -19,6 +19,7 @@ #include <rtl/uri.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/commandenvironment.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include <svtools/PlaceEditDialog.hxx> #include <svtools/ServerDetailsControls.hxx> @@ -271,17 +272,18 @@ void SmbDetailsContainer::show( bool bShow ) m_pFTPort->Enable( !bShow ); } -CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUString const & sBinding ) : +CmisDetailsContainer::CmisDetailsContainer(VclBuilderContainer* pBuilder, Dialog* pParentDialog, OUString const & sBinding) : DetailsContainer( pBuilder ), m_sUsername( ), m_xCmdEnv( ), m_aRepoIds( ), m_sRepoId( ), - m_sBinding( sBinding ) + m_sBinding( sBinding ), + m_xParentDialog( VCLUnoHelper::GetInterface(pParentDialog) ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xGlobalInteractionHandler( - InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY ); + InteractionHandler::createWithParent(xContext, m_xParentDialog), UNO_QUERY); m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() ); pBuilder->get( m_pFTRepository, "repositoryLabel" ); @@ -436,7 +438,7 @@ IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, RefreshReposHdl, Button*, void ) if( !sUrl.isEmpty() && !m_sUsername.isEmpty() && !m_sPassword.isEmpty() ) { Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( xContext, nullptr ), + InteractionHandler::createWithParent(xContext, m_xParentDialog), UNO_QUERY ); Sequence<OUString> aPasswd { m_sPassword }; diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index e6118aaafba6..71923ad342f5 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -798,7 +798,7 @@ void AssignmentPersistentData::ImplCommit() try { xHandler.set( - InteractionHandler::createWithParent(m_xORB, nullptr), + InteractionHandler::createWithParent(m_xORB, VCLUnoHelper::GetInterface(this)), UNO_QUERY_THROW ); } catch(const Exception&) { } |