diff options
-rw-r--r-- | sd/inc/sdabstdlg.hxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/dialogs-test.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/dlg/prltempl.cxx | 69 | ||||
-rw-r--r-- | sd/source/ui/dlg/sddlgfact.cxx | 25 | ||||
-rw-r--r-- | sd/source/ui/dlg/sddlgfact.hxx | 14 | ||||
-rw-r--r-- | sd/source/ui/func/fuprobjs.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/prltempl.hxx | 18 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/drawprtldialog.ui | 418 | ||||
-rw-r--r-- | vcl/source/window/tabpage.cxx | 2 |
10 files changed, 473 insertions, 86 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 152ceb9dc556..da3c93f71203 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -182,7 +182,7 @@ public: virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) = 0; - virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index fd863c973eb0..738b84dd0f7f 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -463,16 +463,17 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 15: { - // CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override; + // CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override; // use STR_PSEUDOSHEET_TITLE configuration, see futempl.cxx for more possible configurations // may be nicer on the long run to take a configuration which represents a selected SdrObject SfxStyleSheetBasePool* pStyleSheetPool = getDocShell()->GetStyleSheetPool(); CPPUNIT_ASSERT(pStyleSheetPool); SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->First(); CPPUNIT_ASSERT(pStyleSheet); + vcl::Window* pWin = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateSdPresLayoutTemplateDlg( getDocShell(), - Application::GetDefDialogParent(), + pWin ? pWin->GetFrameWeld() : nullptr, false, *pStyleSheet, PO_TITLE, diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 030439b41341..4c01aaeb9f57 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -49,19 +49,17 @@ /** * Constructor of Tab dialog: appends pages to the dialog */ -SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, - vcl::Window* pParent, +SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, + weld::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects _ePO, - SfxStyleSheetBasePool* pSSPool ) : - SfxTabDialog ( pParent - , "DrawPRTLDialog" - , "modules/sdraw/ui/drawprtldialog.ui"), - mpDocShell ( pDocSh ), - ePO ( _ePO ), - aInputSet ( *rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{} ), - pOrgSet ( &rStyleBase.GetItemSet() ) + SfxStyleSheetBasePool* pSSPool) + : SfxTabDialogController(pParent, "modules/sdraw/ui/drawprtldialog.ui", "DrawPRTLDialog") + , mpDocShell(pDocSh) + , ePO(_ePO) + , aInputSet(*rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{}) + , pOrgSet(&rStyleBase.GetItemSet()) { if( IS_OUTLINE(ePO)) { @@ -133,14 +131,14 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - mnLine = AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr ); - mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); - mnShadow = AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), nullptr ); - mnTransparency = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr ); - mnFont = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr ); - mnEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr ); + AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr ); + AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); + AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), nullptr ); + AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr ); + AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr ); + AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr ); AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr ); - mnTextAtt = AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr ); + AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr ); @@ -148,7 +146,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr ); AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr ); AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr ); - mnBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr); + AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr); SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsAsianTypographyEnabled() ) @@ -212,25 +210,18 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, aTitle = SdResId(STR_PSEUDOSHEET_NOTES); break; } - SetText( aTitle ); + m_xDialog->set_title(aTitle); } SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg() { - disposeOnce(); } -void SdPresLayoutTemplateDlg::dispose() -{ - pOutSet.reset(); - SfxTabDialog::dispose(); -} - -void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) +void SdPresLayoutTemplateDlg::PageCreated(const OString& rId, SfxTabPage &rPage) { SfxAllItemSet aSet(*(aInputSet.GetPool())); - if (nId == mnLine) + if (rId == "RID_SVXPAGE_LINE") { aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST)); @@ -238,7 +229,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); rPage.PageCreated(aSet); } - else if (nId == mnArea) + else if (rId == "RID_SVXPAGE_AREA") { aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST)); @@ -250,35 +241,35 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0)); rPage.PageCreated(aSet); } - else if (nId == mnShadow) + else if (rId == "RID_SVXPAGE_SHADOW") { aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); rPage.PageCreated(aSet); } - else if (nId == mnTransparency) + else if (rId == "RID_SVXPAGE_TRANSPARENCE") { aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); rPage.PageCreated(aSet); } - else if (nId == mnFont) + else if (rId == "RID_SVXPAGE_CHAR_NAME") { SvxFontListItem aItem(*static_cast<const SvxFontListItem*>(mpDocShell->GetItem( SID_ATTR_CHAR_FONTLIST) ) ); aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); rPage.PageCreated(aSet); } - else if (nId == mnEffects) + else if (rId == "RID_SVXPAGE_CHAR_EFFECTS") { rPage.PageCreated(aSet); } - else if (nId == mnTextAtt) + else if (rId == "RID_SVXPAGE_TEXTATTR") { aSet.Put(CntUInt16Item(SID_SVXTEXTATTRPAGE_OBJKIND, OBJ_TEXT)); rPage.PageCreated(aSet); } - else if (nId == mnBackground) + else if (rId == "RID_SVXPAGE_BACKGROUND") { aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))); rPage.PageCreated(aSet); @@ -287,17 +278,17 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const { - if( pOutSet ) + if (pOutSet) { - pOutSet->Put( *SfxTabDialog::GetOutputItemSet() ); + pOutSet->Put(*SfxTabDialogController::GetOutputItemSet()); const SvxNumBulletItem *pSvxNumBulletItem = nullptr; - if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) )) + if (SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem))) SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet ); return pOutSet.get(); } else - return SfxTabDialog::GetOutputItemSet(); + return SfxTabDialogController::GetOutputItemSet(); } sal_uInt16 SdPresLayoutTemplateDlg::GetOutlineLevel() const diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 1bf725bdce25..7159bdd27d58 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -65,7 +65,16 @@ short AbstractSdCustomShowDlg_Impl::Execute() } IMPL_ABSTDLG_BASE(SdAbstractTabDialog_Impl); -IMPL_ABSTDLG_BASE(SdPresLayoutTemplateDlg_Impl); + +short SdPresLayoutTemplateDlg_Impl::Execute() +{ + return m_xDlg->execute(); +} + +bool SdPresLayoutTemplateDlg_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} short AbstractSdModifyFieldDlg_Impl::Execute() { @@ -243,27 +252,27 @@ void AbstractBulletDialog_Impl::SetText( const OUString& rStr ) void SdPresLayoutTemplateDlg_Impl::SetCurPageId( const OString& rName ) { - pDlg->SetCurPageId( rName ); + m_xDlg->SetCurPageId( rName ); } const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const { - return pDlg->GetOutputItemSet(); + return m_xDlg->GetOutputItemSet(); } const sal_uInt16* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) { - return pDlg->GetInputRanges( pItem ); + return m_xDlg->GetInputRanges( pItem ); } void SdPresLayoutTemplateDlg_Impl::SetInputSet( const SfxItemSet* pInSet ) { - pDlg->SetInputSet( pInSet ); + m_xDlg->SetInputSet( pInSet ); } void SdPresLayoutTemplateDlg_Impl::SetText( const OUString& rStr ) { - pDlg->SetText( rStr ); + m_xDlg->set_title(rStr); } SvxFieldData* AbstractSdModifyFieldDlg_Impl::GetField() @@ -456,9 +465,9 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl: return VclPtr<SdVclAbstractDialog_Impl>::Create( VclPtr<::sd::RemoteDialog>::Create( pParent ) ); } -VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) +VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) { - return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create( VclPtr<SdPresLayoutTemplateDlg>::Create( pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool ) ); + return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(o3tl::make_unique<SdPresLayoutTemplateDlg>(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool)); } VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 99ad415871e5..959718c4effb 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -176,7 +176,15 @@ public: class SdPresLayoutTemplateDlg; class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog { - DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg ) +protected: + std::shared_ptr<SdPresLayoutTemplateDlg> m_xDlg; +public: + explicit SdPresLayoutTemplateDlg_Impl(std::unique_ptr<SdPresLayoutTemplateDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; virtual void SetCurPageId( const OString& rName ) override; virtual const SfxItemSet* GetOutputItemSet() const override; virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override; @@ -342,8 +350,8 @@ public: virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override; virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override; - virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // ad for RemoteDialog - virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; + virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // add for RemoteDialog + virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override; diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 018d0e0bb559..0b7c4c94a338 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -136,8 +136,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) SfxStyleSheetBase& rStyleSheet = *pStyleSheet; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), - false, rStyleSheet, ePO, pStyleSheetPool )); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdPresLayoutTemplateDlg(mpDocSh, mpViewShell->GetFrameWeld(), + false, rStyleSheet, ePO, pStyleSheetPool)); if( pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 534939dbb30a..dd41a3a3a1be 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -363,7 +363,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( !bOldDocInOtherLanguage ) { - pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr); + pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg(mpDocSh, mpViewShell->GetFrameWeld(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr); } } diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx index e144f655a249..e6d17fdf0f1c 100644 --- a/sd/source/ui/inc/prltempl.hxx +++ b/sd/source/ui/inc/prltempl.hxx @@ -32,7 +32,7 @@ class SfxStyleSheetBasePool; /** * Template-Tab-Dialog */ -class SdPresLayoutTemplateDlg : public SfxTabDialog +class SdPresLayoutTemplateDlg : public SfxTabDialogController { private: const SfxObjectShell* mpDocShell; @@ -45,18 +45,9 @@ private: XDashListRef pDashList; XLineEndListRef pLineEndList; - sal_uInt16 mnLine; - sal_uInt16 mnArea; - sal_uInt16 mnShadow; - sal_uInt16 mnTransparency; - sal_uInt16 mnFont; - sal_uInt16 mnEffects; - sal_uInt16 mnTextAtt; - sal_uInt16 mnBackground; - PresentationObjects const ePO; - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; + virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; // for mapping with the new SvxNumBulletItem SfxItemSet aInputSet; @@ -65,12 +56,9 @@ private: sal_uInt16 GetOutlineLevel() const; - using SfxTabDialog::GetOutputItemSet; - public: - SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, vcl::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); + SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool); virtual ~SdPresLayoutTemplateDlg() override; - virtual void dispose() override; const SfxItemSet* GetOutputItemSet() const; }; diff --git a/sd/uiconfig/sdraw/ui/drawprtldialog.ui b/sd/uiconfig/sdraw/ui/drawprtldialog.ui index 64b109be5a9e..84907d49bdc4 100644 --- a/sd/uiconfig/sdraw/ui/drawprtldialog.ui +++ b/sd/uiconfig/sdraw/ui/drawprtldialog.ui @@ -1,12 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sd"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="DrawPRTLDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="drawprtldialog|DrawPRTLDialog">Presentation Layout</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -17,12 +23,10 @@ <property name="can_focus">False</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="ok"> - <property name="label">gtk-ok</property> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> </object> @@ -33,10 +37,12 @@ </packing> </child> <child> - <object class="GtkButton" id="cancel"> - <property name="label">gtk-cancel</property> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> </object> @@ -47,8 +53,8 @@ </packing> </child> <child> - <object class="GtkButton" id="help"> - <property name="label">gtk-help</property> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -58,12 +64,11 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">2</property> - <property name="secondary">True</property> </packing> </child> <child> - <object class="GtkButton" id="reset"> - <property name="label">gtk-revert-to-saved</property> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -73,6 +78,7 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">3</property> + <property name="secondary">True</property> </packing> </child> </object> @@ -98,6 +104,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> <child type="tab"> @@ -117,6 +147,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">1</property> @@ -140,6 +194,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">2</property> @@ -163,6 +241,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">3</property> @@ -186,6 +288,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">4</property> @@ -209,6 +335,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">5</property> @@ -232,6 +382,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">6</property> @@ -255,6 +429,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">7</property> @@ -278,6 +476,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">8</property> @@ -301,6 +523,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">9</property> @@ -324,6 +570,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">10</property> @@ -347,6 +617,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">11</property> @@ -355,7 +649,7 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_NUM_OPTIONS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> <property name="label" translatable="yes" context="drawprtldialog|RID_SVXPAGE_NUM_OPTIONS">Customize</property> </object> <packing> @@ -370,6 +664,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">12</property> @@ -393,6 +711,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">13</property> @@ -416,6 +758,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">14</property> @@ -439,6 +805,30 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="position">15</property> @@ -465,10 +855,10 @@ </object> </child> <action-widgets> + <action-widget response="101">reset</action-widget> <action-widget response="-5">ok</action-widget> <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> - <action-widget response="0">reset</action-widget> </action-widgets> </object> </interface> diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index a9d44ffa20e1..8cfd6243f9fe 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -47,7 +47,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle ) void TabPage::ImplInitSettings() { vcl::Window* pParent = GetParent(); - if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) + if (pParent && pParent->IsChildTransparentModeEnabled() && !IsControlBackground()) { EnableChildTransparentMode(); SetParentClipMode( ParentClipMode::NoClip ); |