From a7a96078ff5d7b0d5655db64e49ec4d48c6bb3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 11 May 2016 20:54:17 +0100 Subject: [PATCH] Resolves: tdf#99464 set what parent the dialogs are dialogs for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With nullptr a parent is searched for and assigned (unless NoParent is set which means no parent) since... commit dd46727b99d4bb5135451aa7e5e1bdb197373843 Author: Caolán McNamara Date: Tue Apr 5 15:27:38 2016 +0100 Resolves; tdf#87120 no keyboard navigation inside floating windows lets try and treat these the same as we do normal toplevels like dialogs if they popup with GrabFocus. This way focus can be set on widgets inside the floating windows, and so keyboard traversal of widgets etc all works. I believe an active menu is allowed as a parent (which I'll investigate and see if we can fix or revert that if necessary), but its good practice to explicitly set the right parent rather than depending on what happens to be on top anyway. Change-Id: I744f6d9bc133058a4a9db94d6c27d2e36e22179e --- sd/inc/sdabstdlg.hxx | 28 ++++++------ sd/source/ui/dlg/sddlgfact.cxx | 74 +++++++++++++++---------------- sd/source/ui/dlg/sddlgfact.hxx | 34 +++++++------- sd/source/ui/func/fuchar.cxx | 3 +- sd/source/ui/func/fucopy.cxx | 3 +- sd/source/ui/func/fucushow.cxx | 3 +- sd/source/ui/func/fuinsfil.cxx | 4 +- sd/source/ui/func/fuoaprms.cxx | 3 +- sd/source/ui/func/fuolbull.cxx | 2 +- sd/source/ui/func/fupage.cxx | 2 +- sd/source/ui/func/fuparagr.cxx | 3 +- sd/source/ui/func/fuprobjs.cxx | 2 +- sd/source/ui/func/fusnapln.cxx | 2 +- sd/source/ui/func/futempl.cxx | 4 +- sd/source/ui/view/drviews2.cxx | 4 +- sw/inc/swabstdlg.hxx | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 5 ++- sw/source/ui/dialog/swdlgfact.hxx | 1 + sw/source/uibase/app/docst.cxx | 2 +- 19 files changed, 94 insertions(+), 87 deletions(-) diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 1c6195dec9ea..f673c286a846 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -167,25 +167,25 @@ public: static SdAbstractDialogFactory* Create(); virtual VclAbstractDialog* CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; - virtual AbstractCopyDlg* CreateCopyDlg( const SfxItemSet& rInAttrs, const rtl::Reference &pColTab, ::sd::View* pView ) = 0; - virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( SdDrawDocument& rDrawDoc ) = 0; - virtual SfxAbstractTabDialog* CreateSdTabCharDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) = 0; - virtual SfxAbstractTabDialog* CreateSdTabPageDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage = true ) = 0; - virtual AbstractAssistentDlg* CreateAssistentDlg( bool bAutoPilot) = 0; - virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) = 0; - virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; - virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) = 0; - virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) = 0; - virtual AbstractMorphDlg* CreateMorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; - virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( const SfxItemSet* pAttr, ::sd::View* pView = nullptr ) = 0; - virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( const SfxItemSet* pAttr ) = 0; + virtual AbstractCopyDlg* CreateCopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, const rtl::Reference &pColTab, ::sd::View* pView ) = 0; + virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg(vcl::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; + virtual SfxAbstractTabDialog* CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; + virtual SfxAbstractTabDialog* CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage = true) = 0; + virtual AbstractAssistentDlg* CreateAssistentDlg(bool bAutoPilot) = 0; + virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg(vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; + virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; + virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) = 0; + virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; + virtual AbstractMorphDlg* CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; + virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = nullptr) = 0; + virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg(vcl::Window* pWindow, const SfxItemSet* pAttr) = 0; virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclAbstractDialog* CreateRemoteDialog( vcl::Window* pWindow ) = 0; virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, vcl::Window* pWindow, const SfxItemSet& rInAttrs) = 0; - virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0; - virtual SfxAbstractDialog* CreatSdActionDialog( const SfxItemSet* pAttr, ::sd::View* pView ) = 0; + virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; + virtual SfxAbstractDialog* CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg( vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) = 0; virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0; diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 08e9969b40a3..43b0e6a3841d 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -352,61 +352,61 @@ void AbstractSdPublishingDlg_Impl::GetParameterSequence( css::uno::Sequence< css //-------------- SdAbstractDialogFactory implementation-------------- VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateBreakDlg( - vcl::Window* pWindow, + vcl::Window* pParent, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) { - return new SdVclAbstractDialog_Impl( VclPtr< ::sd::BreakDlg>::Create( pWindow, pDrView, pShell, nSumActionCount, nObjCount ) ); + return new SdVclAbstractDialog_Impl( VclPtr< ::sd::BreakDlg>::Create( pParent, pDrView, pShell, nSumActionCount, nObjCount ) ); } -AbstractCopyDlg * SdAbstractDialogFactory_Impl::CreateCopyDlg( +AbstractCopyDlg * SdAbstractDialogFactory_Impl::CreateCopyDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, const rtl::Reference &pColTab, ::sd::View* pView ) { - return new AbstractCopyDlg_Impl( VclPtr< ::sd::CopyDlg>::Create( nullptr, rInAttrs, pColTab, pView ) ); + return new AbstractCopyDlg_Impl( VclPtr< ::sd::CopyDlg>::Create( pParent, rInAttrs, pColTab, pView ) ); } -AbstractSdCustomShowDlg * SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg( SdDrawDocument& rDrawDoc ) +AbstractSdCustomShowDlg * SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg(vcl::Window* pParent, SdDrawDocument& rDrawDoc ) { - return new AbstractSdCustomShowDlg_Impl( VclPtr::Create( nullptr, rDrawDoc ) ); + return new AbstractSdCustomShowDlg_Impl( VclPtr::Create(pParent, rDrawDoc) ); } -SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabCharDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) +SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabCharDialog(vcl::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) { - return new SdAbstractTabDialog_Impl( VclPtr::Create( nullptr, pAttr, pDocShell ) ); + return new SdAbstractTabDialog_Impl( VclPtr::Create(pParent, pAttr, pDocShell) ); } -SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabPageDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage ) +SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(vcl::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage ) { - return new SdAbstractTabDialog_Impl( VclPtr::Create( pDocShell, nullptr, pAttr, bAreaPage ) ); + return new SdAbstractTabDialog_Impl( VclPtr::Create( pDocShell, pParent, pAttr, bAreaPage ) ); } -AbstractAssistentDlg * SdAbstractDialogFactory_Impl::CreateAssistentDlg( bool bAutoPilot) +AbstractAssistentDlg * SdAbstractDialogFactory_Impl::CreateAssistentDlg(bool bAutoPilot) { return new AbstractAssistentDlg_Impl( VclPtr::Create( nullptr, bAutoPilot ) ); } -AbstractSdModifyFieldDlg * SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) +AbstractSdModifyFieldDlg * SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg( vcl::Window* pParent, const SvxFieldData* pInField, const SfxItemSet& rSet ) { - return new AbstractSdModifyFieldDlg_Impl( VclPtr::Create( pWindow, pInField, rSet ) ); + return new AbstractSdModifyFieldDlg_Impl( VclPtr::Create( pParent, pInField, rSet ) ); } -AbstractSdSnapLineDlg * SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg( const SfxItemSet& rInAttrs, ::sd::View* pView) +AbstractSdSnapLineDlg * SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg( vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) { - return new AbstractSdSnapLineDlg_Impl( VclPtr::Create( nullptr, rInAttrs, pView ) ); + return new AbstractSdSnapLineDlg_Impl( VclPtr::Create( pParent, rInAttrs, pView ) ); } -AbstractSdInsertLayerDlg * SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg( const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) +AbstractSdInsertLayerDlg * SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg( vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) { - return new AbstractSdInsertLayerDlg_Impl( VclPtr::Create( nullptr, rInAttrs, bDeletable, aStr ) ); + return new AbstractSdInsertLayerDlg_Impl( VclPtr::Create( pParent, rInAttrs, bDeletable, aStr ) ); } -AbstractSdInsertPagesObjsDlg * SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg( const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) +AbstractSdInsertPagesObjsDlg * SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg( vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) { - return new AbstractSdInsertPagesObjsDlg_Impl( VclPtr::Create( nullptr, pDoc, pSfxMedium, rFileName ) ); + return new AbstractSdInsertPagesObjsDlg_Impl( VclPtr::Create( pParent, pDoc, pSfxMedium, rFileName ) ); } AbstractMorphDlg * SdAbstractDialogFactory_Impl::CreateMorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) @@ -414,25 +414,25 @@ AbstractMorphDlg * SdAbstractDialogFactory_Impl::CreateMorphDlg( vcl::Window* pP return new AbstractMorphDlg_Impl( VclPtr< ::sd::MorphDlg>::Create( pParent, pObj1, pObj2 ) ); } -SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg( const SfxItemSet* pAttr, ::sd::View* pView ) +SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) { - return new AbstractBulletDialog_Impl( VclPtr< ::sd::OutlineBulletDlg>::Create( nullptr, pAttr, pView ) ); + return new AbstractBulletDialog_Impl( VclPtr< ::sd::OutlineBulletDlg>::Create( pParent, pAttr, pView ) ); } -SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg( const SfxItemSet* pAttr ) +SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr ) { - return new SdAbstractTabDialog_Impl( VclPtr::Create( nullptr, pAttr ) ); + return new SdAbstractTabDialog_Impl( VclPtr::Create( pParent, pAttr ) ); } -AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, +AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( vcl::Window* pParent, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) { - return new AbstractSdStartPresDlg_Impl( VclPtr::Create( pWindow, rInAttrs, rPageNames, pCSList ) ); + return new AbstractSdStartPresDlg_Impl( VclPtr::Create( pParent, rInAttrs, rPageNames, pCSList ) ); } -VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl::Window* pWindow ) +VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl::Window* pParent ) { - return new SdVclAbstractDialog_Impl( VclPtr< ::sd::RemoteDialog>::Create( pWindow ) ); + return new SdVclAbstractDialog_Impl( VclPtr< ::sd::RemoteDialog>::Create( pParent ) ); } SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) @@ -440,19 +440,19 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplate return new SdPresLayoutTemplateDlg_Impl( VclPtr::Create( pDocSh, pParent, DlgId, rStyleBase, ePO, pSSPool ) ); } -AbstractSdPresLayoutDlg * SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, vcl::Window* pWindow, const SfxItemSet& rInAttrs) +AbstractSdPresLayoutDlg * SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, vcl::Window* pParent, const SfxItemSet& rInAttrs) { - return new AbstractSdPresLayoutDlg_Impl( VclPtr::Create( pDocShell, pWindow, rInAttrs ) ); + return new AbstractSdPresLayoutDlg_Impl( VclPtr::Create( pDocShell, pParent, rInAttrs ) ); } -SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg( const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) +SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) { - return new SdAbstractTabDialog_Impl( VclPtr::Create( nullptr, pDocShell, rStyleBase, pModel, pView ) ); + return new SdAbstractTabDialog_Impl( VclPtr::Create( pParent, pDocShell, rStyleBase, pModel, pView ) ); } -SfxAbstractDialog* SdAbstractDialogFactory_Impl::CreatSdActionDialog( const SfxItemSet* pAttr, ::sd::View* pView ) +SfxAbstractDialog* SdAbstractDialogFactory_Impl::CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) { - return new SdAbstractSfxDialog_Impl( VclPtr::Create( nullptr, pAttr, pView ) ); + return new SdAbstractSfxDialog_Impl( VclPtr::Create( pParent, pAttr, pView ) ); } AbstractSdVectorizeDlg * SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg( vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) @@ -460,9 +460,9 @@ AbstractSdVectorizeDlg * SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg( vc return new AbstractSdVectorizeDlg_Impl( VclPtr::Create( pParent, rBmp, pDocShell ) ); } -AbstractSdPublishingDlg * SdAbstractDialogFactory_Impl::CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) +AbstractSdPublishingDlg * SdAbstractDialogFactory_Impl::CreateSdPublishingDlg( vcl::Window* pParent, DocumentType eDocType) { - return new AbstractSdPublishingDlg_Impl( VclPtr::Create( pWindow, eDocType ) ); + return new AbstractSdPublishingDlg_Impl( VclPtr::Create( pParent, eDocType ) ); } // Factories for TabPages @@ -498,9 +498,9 @@ AbstractHeaderFooterDialog* SdAbstractDialogFactory_Impl::CreateHeaderFooterDial return new AbstractHeaderFooterDialog_Impl( VclPtr< ::sd::HeaderFooterDialog>::Create( pViewShell, pParent, pDoc, pCurrentPage )); } -VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateSdPhotoAlbumDialog( vcl::Window* pWindow, SdDrawDocument* pDoc ) +VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateSdPhotoAlbumDialog( vcl::Window* pParent, SdDrawDocument* pDoc ) { - return new SdVclAbstractDialog_Impl( VclPtr< ::sd::SdPhotoAlbumDialog>::Create( pWindow, pDoc ) ); + return new SdVclAbstractDialog_Impl( VclPtr< ::sd::SdPhotoAlbumDialog>::Create( pParent, pDoc ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 2638f316099d..baa6a33908da 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -227,30 +227,30 @@ class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory public: virtual ~SdAbstractDialogFactory_Impl() {} - virtual VclAbstractDialog* CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) override; - virtual AbstractCopyDlg* CreateCopyDlg( const SfxItemSet& rInAttrs, const rtl::Reference &pColTab, ::sd::View* pView ) override; - virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( SdDrawDocument& rDrawDoc ) override; - virtual SfxAbstractTabDialog* CreateSdTabCharDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) override; - virtual SfxAbstractTabDialog* CreateSdTabPageDialog( const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage = true ) override; - virtual AbstractAssistentDlg* CreateAssistentDlg( bool bAutoPilot) override; + virtual VclAbstractDialog* CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override; + virtual AbstractCopyDlg* CreateCopyDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, const rtl::Reference &pColTab, ::sd::View* pView) override; + virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg(vcl::Window* pParent, SdDrawDocument& rDrawDoc) override; + virtual SfxAbstractTabDialog* CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override; + virtual SfxAbstractTabDialog* CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage = true) override; + virtual AbstractAssistentDlg* CreateAssistentDlg(bool bAutoPilot) override; virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) override; - virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( const SfxItemSet& rInAttrs, ::sd::View* pView) override; - virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) override; - virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override; - virtual AbstractMorphDlg* CreateMorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override; - virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( const SfxItemSet* pAttr, ::sd::View* pView = nullptr ) override; - virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( const SfxItemSet* pAttr ) override; + virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override; + virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override; + virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override; + virtual AbstractMorphDlg* CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override; + virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = nullptr) override; + virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr) override; virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) override; virtual VclAbstractDialog* CreateRemoteDialog( vcl::Window* pWindow ) override; // ad for RemoteDialog virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, vcl::Window* pWindow, const SfxItemSet& rInAttrs) override; - virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; - virtual SfxAbstractDialog* CreatSdActionDialog( const SfxItemSet* pAttr, ::sd::View* pView ) override; - virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg( vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) override; - virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) override; + virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; + virtual SfxAbstractDialog* CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override; + virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override; + virtual AbstractSdPublishingDlg* CreateSdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) override; - virtual VclAbstractDialog* CreateSdPhotoAlbumDialog( vcl::Window* pWindow, SdDrawDocument* pDoc) override; + virtual VclAbstractDialog* CreateSdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pDoc) override; virtual VclAbstractDialog* CreateMasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pDoc, diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 87c896c49576..0fbd9dd683d1 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -30,6 +30,7 @@ #include #include #include "View.hxx" +#include "Window.hxx" #include "drawview.hxx" #include "drawdoc.hxx" #include "DrawViewShell.hxx" @@ -95,7 +96,7 @@ void FuChar::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdTabCharDialog( &aNewAttr, mpDoc->GetDocSh() ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr); sal_uInt16 nResult = RET_CANCEL; if( pDlg ) { diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 1d38fdebea61..d6bab1ad174c 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -26,6 +26,7 @@ #include "strings.hrc" #include "ViewShell.hxx" #include "View.hxx" +#include "Window.hxx" #include "drawdoc.hxx" #include "DrawDocShell.hxx" #include @@ -101,7 +102,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); if( pFact ) { - std::unique_ptr pDlg(pFact->CreateCopyDlg(aSet, mpDoc->GetColorList(), mpView )); + std::unique_ptr pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpDoc->GetColorList(), mpView )); if (!pDlg) return; diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx index 8bb5439c4d0f..35a3f61dce28 100644 --- a/sd/source/ui/func/fucushow.cxx +++ b/sd/source/ui/func/fucushow.cxx @@ -24,6 +24,7 @@ #include "app.hrc" #include "sdresid.hxx" #include "ViewShell.hxx" +#include "Window.hxx" #include "drawdoc.hxx" #include "sdpage.hxx" #include @@ -56,7 +57,7 @@ rtl::Reference FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window void FuCustomShowDlg::DoExecute( SfxRequest& ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdCustomShowDlg( *mpDoc ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdCustomShowDlg(mpViewShell->GetActiveWindow(), *mpDoc) : nullptr); if( pDlg ) { sal_uInt16 nRet = pDlg->Execute(); diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d54100635ec5..706b95723b68 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -327,7 +327,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( mpDoc, pMedium, aFile ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, pMedium, aFile) : nullptr); if( !pDlg ) return false; @@ -419,7 +419,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( mpDoc, nullptr, aFile ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, nullptr, aFile) : nullptr); if( !pDlg ) return; diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 866f838856a5..621e7919419d 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -40,6 +40,7 @@ #include "unoaprms.hxx" #include "sdundogr.hxx" #include "View.hxx" +#include "Window.hxx" #include "sdabstdlg.hxx" #include "sdresid.hxx" #include @@ -445,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreatSdActionDialog( &aSet, mpView ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) : nullptr); short nResult = pDlg ? pDlg->Execute() : static_cast(RET_CANCEL); diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 1a3a8a672550..a67537f6053c 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -81,7 +81,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) // create and execute dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( &aNewAttr, mpView ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr, mpView) : nullptr); if( pDlg ) { if ( pPageItem ) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 2ac7754b8585..11f371e54013 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -336,7 +336,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) { // create the dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg( pFact ? pFact->CreateSdTabPageDialog(&aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : nullptr ); + std::unique_ptr pDlg( pFact ? pFact->CreateSdTabPageDialog(mpViewShell->GetActiveWindow(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) : nullptr ); if( pDlg.get() && pDlg->Execute() == RET_OK ) pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) ); } diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index bc70d74405d2..69e5050fd643 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -31,6 +31,7 @@ #include "app.hrc" #include "View.hxx" #include "ViewShell.hxx" +#include "Window.hxx" #include "drawdoc.hxx" #include "sdabstdlg.hxx" #include "sdattr.hrc" @@ -90,7 +91,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdParagraphTabDlg( &aNewAttr ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdParagraphTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr) : nullptr); if (!pDlg) return; diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 3ea851cca0e8..b19b68fa98a6 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -139,7 +139,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) SfxStyleSheetBase& rStyleSheet = *pStyleSheet; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, nullptr, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : nullptr); if( pDlg && (pDlg->Execute() == RET_OK) ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 63b28edf45d4..0a89b57c95a9 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -110,7 +110,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y())); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdSnapLineDlg( aNewAttr, mpView ) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdSnapLineDlg(mpViewShell->GetActiveWindow(), aNewAttr, mpView) : nullptr); OSL_ASSERT(pDlg); if (!pDlg) return; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index ddeb24c01aa1..29b23f1d5694 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -305,7 +305,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if (eFamily == SD_STYLE_FAMILY_GRAPHICS) { - pStdDlg.reset(pFact ? pFact->CreateSdTabTemplateDlg( mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView ) : nullptr); + pStdDlg.reset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetActiveWindow(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr); } else if (eFamily == SD_STYLE_FAMILY_PSEUDO) { @@ -369,7 +369,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( !bOldDocInOtherLanguage ) { - pPresDlg.reset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, nullptr, SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr); + pPresDlg.reset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr); } } else if (eFamily == SD_STYLE_FAMILY_CELL) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 2d7faede8e14..0be3b6a7c8bb 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1416,7 +1416,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( SdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertLayerDlg(aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : nullptr); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() ); @@ -1584,7 +1584,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( SdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertLayerDlg(aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : nullptr); + std::unique_ptr pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : nullptr); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() ); diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index a46e2acec5b0..87b375207f28 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -396,7 +396,7 @@ public: /// @param nSlot /// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered. /// Currently used, if nRegion == SfxStyleFamily::Page in order to activate certain dialog pane - virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( + virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(vcl::Window* pParent, SfxStyleSheetBase& rBase, SfxStyleFamily nRegion, const OString& sPage = OString(), diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 2c57b97a0425..760333cc657e 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -935,14 +935,15 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const O } SfxAbstractApplyTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( + vcl::Window *pParent, SfxStyleSheetBase& rBase, SfxStyleFamily nRegion, const OString& sPage, SwWrtShell* pActShell, bool bNew ) { - VclPtr pDlg = VclPtr::Create( nullptr, rBase, nRegion, sPage, pActShell, bNew ); - return new AbstractApplyTabDialog_Impl( pDlg ); + VclPtr pDlg = VclPtr::Create(pParent, rBase, nRegion, sPage, pActShell, bNew); + return new AbstractApplyTabDialog_Impl(pDlg); } AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 98116f90e890..b74968e715c6 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -434,6 +434,7 @@ public: const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr) override; virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( + vcl::Window *pParent, SfxStyleSheetBase& rBase, SfxStyleFamily nRegion, const OString& sPage = OString(), diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 49feaa8da271..635a0daca4bc 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -793,7 +793,7 @@ sal_uInt16 SwDocShell::Edit( SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert( pFact ); - std::unique_ptr pDlg(pFact->CreateTemplateDialog( + std::unique_ptr pDlg(pFact->CreateTemplateDialog(&GetView()->GetViewFrame()->GetWindow(), *(xTmp.get()), nFamily, sPage, pActShell ? pActShell : m_pWrtShell, bNew)); assert( pDlg );