cui/source/factory/dlgfact.cxx |    4 ++--
 cui/source/factory/dlgfact.hxx |    2 +-
 include/sfx2/sfxdlg.hxx        |    2 +-
 sfx2/source/appl/appserv.cxx   |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c07e83bbd79fb4a49cbb7b7e4f31403865989feb
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Apr 15 00:10:12 2018 +0100

    Resolves: tdf#116996 null is a bad parent
    
    Change-Id: I85f2816f1d28260c46ebe7996a74d870321a26a8
    Reviewed-on: https://gerrit.libreoffice.org/52895
    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/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a1cc05f2603d..590c16867805 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -898,7 +898,7 @@ VclPtr<VclAbstractDialog> 
AbstractDialogFactory_Impl::CreateVclDialog( vcl::Wind
     return nullptr;
 }
 
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog( const 
Reference< frame::XFrame >& rxFrame,
+VclPtr<VclAbstractDialog> 
AbstractDialogFactory_Impl::CreateFrameDialog(vcl::Window* pParent, const 
Reference< frame::XFrame >& rxFrame,
     sal_uInt32 nResId, const OUString& rParameter )
 {
     VclPtr<Dialog> pDlg;
@@ -906,7 +906,7 @@ VclPtr<VclAbstractDialog> 
AbstractDialogFactory_Impl::CreateFrameDialog( const R
     {
         // only activate last page if we don't want to activate a special page
         bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && 
rParameter.isEmpty() );
-        VclPtrInstance<OfaTreeOptionsDialog> pOptDlg( nullptr, rxFrame, 
bActivateLastSelection );
+        VclPtrInstance<OfaTreeOptionsDialog> pOptDlg(pParent, rxFrame, 
bActivateLastSelection);
         if ( nResId == SID_OPTIONS_DATABASES )
             pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
         else if ( !rParameter.isEmpty() )
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index df1eb99129c7..940a0b2ae580 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -578,7 +578,7 @@ public:
                                                              const SfxItemSet& 
rAttr,
                                                              const 
css::uno::Reference< css::frame::XFrame >& _rxFrame
                                                              ) override;
-    virtual VclPtr<VclAbstractDialog>    CreateFrameDialog( const 
css::uno::Reference< css::frame::XFrame >& rxFrame,
+    virtual VclPtr<VclAbstractDialog>    CreateFrameDialog(vcl::Window* 
pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
                                                            sal_uInt32 nResId,
                                                            const OUString& 
rParameter ) override;
     virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(vcl::Window* 
pParent, const SfxItemSet* pAttrSet) override;
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 9d3f23f0e3d2..dd49c8d1c103 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -127,7 +127,7 @@ class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual 
public VclAbstractDialog
 public:
                                         virtual ~SfxAbstractDialogFactory() 
override;    // needed for export of vtable
     static SfxAbstractDialogFactory*    Create();
-    virtual VclPtr<VclAbstractDialog>          CreateFrameDialog( const 
css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const 
rtl::OUString& rParameter ) = 0;
+    virtual VclPtr<VclAbstractDialog>          CreateFrameDialog(vcl::Window* 
pParent, const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 
nResId, const rtl::OUString& rParameter ) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       
CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       CreateCustomizeTabDialog(
                                             const SfxItemSet* pAttrSet,
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e0720ab65b33..b38468b5bfa7 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1358,7 +1358,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
             if ( pFact )
             {
                 VclPtr<VclAbstractDialog> pDlg =
-                    pFact->CreateFrameDialog( xFrame, rReq.GetSlot(), sPageURL 
);
+                    pFact->CreateFrameDialog(rReq.GetFrameWindow(), xFrame, 
rReq.GetSlot(), sPageURL );
                 short nRet = pDlg->Execute();
                 pDlg.disposeAndClear();
                 SfxViewFrame* pView = SfxViewFrame::GetFirst();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to