From 44f023d5999ef32c5d83c1834549fa69e4ad1a34 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 1 Sep 2017 17:02:34 +0100 Subject: always use a systemwindow for file dialog parent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cause the native dialogs can only be a parent of a "real" system window Change-Id: I6d06bda25c74b9a25f71e405027d3fb31711e136 Reviewed-on: https://gerrit.libreoffice.org/41812 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sfx2/source/dialog/filedlghelper.cxx | 10 +++++----- sfx2/source/dialog/filedlgimpl.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 07e90a772a3a..18ebb6e1495b 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -845,7 +845,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( sal_Int16 nDialogType, FileDialogFlags nFlags, sal_Int16 nDialog, - vcl::Window* _pPreferredParentWindow, + const vcl::Window* _pPreferredParentWindow, const OUString& sStandardDir, const css::uno::Sequence< OUString >& rBlackList ) @@ -874,7 +874,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( // create the file open dialog // the flags can be SFXWB_INSERT or SFXWB_MULTISELECTION - mpPreferredParentWindow = _pPreferredParentWindow; + mpPreferredParentWindow = _pPreferredParentWindow ? _pPreferredParentWindow->GetSystemWindow() : nullptr; mpAntiImpl = _pAntiImpl; mbHasAutoExt = false; mbHasPassword = false; @@ -2266,7 +2266,7 @@ FileDialogHelper::FileDialogHelper( SfxFilterFlags nDont, const OUString& rStandardDir, const css::uno::Sequence< OUString >& rBlackList, - vcl::Window* _pPreferredParent) + const vcl::Window* _pPreferredParent) : m_nError(0), mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, _pPreferredParent, rStandardDir, rBlackList ) ) { @@ -2278,7 +2278,7 @@ FileDialogHelper::FileDialogHelper( FileDialogHelper::FileDialogHelper( sal_Int16 nDialogType, FileDialogFlags nFlags, - vcl::Window* _pPreferredParent ) + const vcl::Window* _pPreferredParent ) : m_nError(0), mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, _pPreferredParent ) ) { @@ -2291,7 +2291,7 @@ FileDialogHelper::FileDialogHelper( const OUString& aExtName, const OUString& rStandardDir, const css::uno::Sequence< OUString >& rBlackList, - vcl::Window* _pPreferredParent ) + const vcl::Window* _pPreferredParent ) : m_nError(0), mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, _pPreferredParent,rStandardDir, rBlackList ) ) { diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 8568974571f6..a251f8558e09 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -171,7 +171,7 @@ namespace sfx2 const short nDialogType, FileDialogFlags nFlags, sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG, - vcl::Window* _pPreferredParentWindow = nullptr, + const vcl::Window* _pPreferredParentWindow = nullptr, const OUString& sStandardDir = OUString(), const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >() ); -- cgit v1.2.3