Kaydet (Commit) c07e83bb authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#116996 null is a bad parent

Change-Id: I85f2816f1d28260c46ebe7996a74d870321a26a8
Reviewed-on: https://gerrit.libreoffice.org/52895Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 112dbca9
......@@ -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() )
......
......@@ -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;
......
......@@ -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,
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment