include/sfx2/filedlghelper.hxx       |    6 +++---
 sfx2/source/dialog/filedlghelper.cxx |   10 +++++-----
 sfx2/source/dialog/filedlgimpl.hxx   |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 44f023d5999ef32c5d83c1834549fa69e4ad1a34
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri Sep 1 17:02:34 2017 +0100

    always use a systemwindow for file dialog parent
    
    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 <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 052285cbd614..9c4534cf036b 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -103,7 +103,7 @@ private:
 public:
                             FileDialogHelper( sal_Int16 nDialogType,
                                               FileDialogFlags nFlags = 
FileDialogFlags::NONE,
-                                              vcl::Window* _pPreferredParent = 
nullptr );
+                                              const vcl::Window* 
_pPreferredParent = nullptr );
 
                             FileDialogHelper( sal_Int16 nDialogType,
                                               FileDialogFlags nFlags,
@@ -119,7 +119,7 @@ public:
                                               SfxFilterFlags nDont,
                                               const OUString& rStandardDir,
                                               const css::uno::Sequence< 
OUString >& rBlackList,
-                                              vcl::Window* _pPreferredParent = 
nullptr);
+                                              const vcl::Window* 
_pPreferredParent = nullptr);
 
                             FileDialogHelper( sal_Int16 nDialogType,
                                               FileDialogFlags nFlags,
@@ -127,7 +127,7 @@ public:
                                               const OUString& aExtName,
                                               const OUString& rStandardDir,
                                               const css::uno::Sequence< 
OUString >& rBlackList,
-                                              vcl::Window* _pPreferredParent = 
nullptr );
+                                              const vcl::Window* 
_pPreferredParent = nullptr );
 
     virtual                 ~FileDialogHelper();
 
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 >()
                                 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to