summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-15 00:10:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-15 21:00:54 +0200
commitc07e83bbd79fb4a49cbb7b7e4f31403865989feb (patch)
tree24155a6cb4c57d216b9b26d3ac85ebaf89259bb6
parent112dbca9882ef98a4ff294445939d1c358486691 (diff)
Resolves: tdf#116996 null is a bad parent
Change-Id: I85f2816f1d28260c46ebe7996a74d870321a26a8 Reviewed-on: https://gerrit.libreoffice.org/52895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--include/sfx2/sfxdlg.hxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
4 files changed, 5 insertions, 5 deletions
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();