diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-10-30 19:49:57 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-10-31 01:02:02 +0100 |
commit | 57ba3d1d16df86d2393a8110620738e57265e19c (patch) | |
tree | 3dc2e62399bf153a890cb1694d3ee40eb9061475 /sd/source | |
parent | 369eac81d4a5aa629762d04f1a9b9696ffec8f1f (diff) |
tdf#84257: Consistent 'slide' naming in Impress UI
Change-Id: I6af0f6d79e145a4a0497cd72f960ee21d595b311
Reviewed-on: https://gerrit.libreoffice.org/81796
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/dlgpage.cxx | 16 | ||||
-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 | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgpage.hxx | 3 |
5 files changed, 23 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index 77dbd01af706..e69d17906016 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -26,6 +26,8 @@ #include <sfx2/sfxdlg.hxx> #include <dlgpage.hxx> +#include <sdresid.hxx> +#include <strings.hrc> #include <svl/aeitem.hxx> #include <svx/flagsdef.hxx> @@ -33,10 +35,12 @@ /** * Constructor of tab dialog: appends pages to the dialog */ -SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage) +SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc) : SfxTabDialogController(pParent, "modules/sdraw/ui/drawpagedialog.ui", "DrawPageDialog", pAttr) , mpDocShell(pDocSh) + , mbIsImpressDoc(bIsImpressDoc) { + SvxColorListItem const * pColorListItem = mpDocShell->GetItem( SID_COLOR_TABLE ); SvxGradientListItem const * pGradientListItem = mpDocShell->GetItem( SID_GRADIENT_LIST ); SvxBitmapListItem const * pBitmapListItem = mpDocShell->GetItem( SID_BITMAP_LIST ); @@ -60,6 +64,12 @@ SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const RemoveTabPage("RID_SVXPAGE_AREA"); RemoveTabPage("RID_SVXPAGE_TRANSPARENCE"); } + + if (mbIsImpressDoc) + { + set_title(SdResId(STR_SLIDE_SETUP_TITLE)); + m_xTabCtrl->set_tab_label_text("RID_SVXPAGE_PAGE", SdResId(STR_SLIDE_NAME)); + } } void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& rPage) @@ -70,6 +80,10 @@ void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& rPage) aSet.Put (SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION)); aSet.Put (SfxUInt16Item(SID_PAPER_START, PAPER_A0)); aSet.Put (SfxUInt16Item(SID_PAPER_END, PAPER_E)); + + if (mbIsImpressDoc) + aSet.Put(SfxBoolItem(SID_IMPRESS_DOC, true)); + rPage.PageCreated(aSet); } else if (rId == "RID_SVXPAGE_AREA") diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 1a1182a0e026..117064161ec5 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -641,9 +641,9 @@ VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabCharDialo return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdCharDlg>(pParent, pAttr, pDocShell)); } -VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage ) +VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc ) { - return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage)); + return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<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 2c58cf05b53b..257a1614dc6d 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -412,7 +412,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) 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 d4fc56c5fdda..bad262357f47 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -341,9 +341,11 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& else { + bool bIsImpressDoc = mpDrawViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress; + // create the dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) ); + ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage, bIsImpressDoc) ); if( pDlg->Execute() == RET_OK ) pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) ); } diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx index 5bf0c0ff6fda..512cd0c5be18 100644 --- a/sd/source/ui/inc/dlgpage.hxx +++ b/sd/source/ui/inc/dlgpage.hxx @@ -33,6 +33,7 @@ class SdPageDlg : public SfxTabDialogController { private: const SfxObjectShell* mpDocShell; + bool mbIsImpressDoc; XColorListRef mpColorList; XGradientListRef mpGradientList; @@ -41,7 +42,7 @@ private: XPatternListRef mpPatternList; public: - SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage); + SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc); virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; }; |