diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-08-22 08:14:10 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-08-26 23:19:57 +0200 |
commit | f4ed90bcad83ea24644c1cbf077b369ae05f004e (patch) | |
tree | 07e19e2c2dccf4d73197fcabf9334d9915770f0b /sd/source | |
parent | a535bacb2adeb491e919992a38e891945ca248f0 (diff) |
sd: remove theme tab page
Change-Id: Iffb3d0f6d6933891333da68fa4569a3638ba18f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156123
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/dlgpage.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/dlg/sddlgfact.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/sddlgfact.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fupage.cxx | 29 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgpage.hxx | 2 |
5 files changed, 6 insertions, 40 deletions
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index 5e41ec6cec20..833328659be3 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -36,7 +36,7 @@ * Constructor of tab dialog: appends pages to the dialog */ SdPageDlg::SdPageDlg(SfxObjectShell const* pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, - bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster) + bool bAreaPage, bool bIsImpressDoc) : SfxTabDialogController(pParent, "modules/sdraw/ui/drawpagedialog.ui", "DrawPageDialog", pAttr) , mbIsImpressDoc(bIsImpressDoc) { @@ -58,7 +58,6 @@ SdPageDlg::SdPageDlg(SfxObjectShell const* pDocSh, weld::Window* pParent, const AddTabPage("RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_AREA), nullptr); AddTabPage("RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TRANSPARENCE), nullptr); - AddTabPage("RID_SVXPAGE_THEME", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_THEME), nullptr); if (!bAreaPage) // I have to add the page before I remove it ! { @@ -66,12 +65,6 @@ SdPageDlg::SdPageDlg(SfxObjectShell const* pDocSh, weld::Window* pParent, const RemoveTabPage("RID_SVXPAGE_TRANSPARENCE"); } - if (!bIsImpressMaster) - { - // Only slide masters can have a theme. - RemoveTabPage("RID_SVXPAGE_THEME"); - } - if (mbIsImpressDoc) { set_title(SdResId(STR_SLIDE_SETUP_TITLE)); diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index b07c75cb71c7..614e95929139 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -618,9 +618,9 @@ VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabCharDialo return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdCharDlg>(pParent, pAttr, pDocShell)); } -VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster ) +VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) { - return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage, bIsImpressDoc, bIsImpressMaster)); + return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage, bIsImpressDoc)); } VclPtr<AbstractSdModifyFieldDlg> SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg(weld::Window* pParent, const SvxFieldData* pInField, const SfxItemSet& rSet) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index b9dd75226841..23cac7e857db 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -410,7 +410,7 @@ public: virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override; virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override; - virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster) override; + virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) override; virtual VclPtr<AbstractSdModifyFieldDlg> CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override; virtual VclPtr<AbstractSdSnapLineDlg> CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override; virtual VclPtr<AbstractSdInsertLayerDlg> CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override; diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 27a794124b0c..4660c1d02d12 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -263,18 +263,6 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& SfxGrabBagItem grabBag(SID_ATTR_CHAR_GRABBAG); grabBag.GetGrabBag()["BackgroundFullSize"] <<= bFullSize; - if (mpDoc->GetDocumentType() == DocumentType::Impress && mpPage->IsMasterPage()) - { - // A master slide may have a theme. - auto const& pTheme = mpPage->getSdrPageProperties().GetTheme(); - if (pTheme) - { - uno::Any aTheme; - pTheme->ToAny(aTheme); - grabBag.GetGrabBag()["Theme"] = aTheme; - } - } - aNewAttr.Put(grabBag); // Merge ItemSet for dialog @@ -364,7 +352,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& // create the dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage, bIsImpressDoc, mbMasterPage) ); + ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage, bIsImpressDoc) ); if( pDlg->Execute() == RET_OK ) pTempSet.emplace( *pDlg->GetOutputItemSet() ); } @@ -567,21 +555,6 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bSetPageSizeAndBorder = true; } } - - if (mpDoc->GetDocumentType() == DocumentType::Impress && mpPage->IsMasterPage()) - { - // The item set may have a theme. - auto it = pGrabBag->GetGrabBag().find("Theme"); - if (it != pGrabBag->GetGrabBag().end()) - { - std::shared_ptr<model::Theme> pTheme = model::Theme::FromAny(it->second); - pMasterPage->getSdrPageProperties().SetTheme(pTheme); - } - else - { - SAL_WARN("sd.ui", "FuPage::ApplyItemSet: got no theme"); - } - } } // Paper Bin diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx index abe75ff1092e..aadb5f28e104 100644 --- a/sd/source/ui/inc/dlgpage.hxx +++ b/sd/source/ui/inc/dlgpage.hxx @@ -40,7 +40,7 @@ private: XPatternListRef mpPatternList; public: - SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster); + SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc); virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; }; |