diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 04648e4342ac..1019a9fbc214 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -109,6 +109,7 @@ private: // layout settings std::unique_ptr m_xPageText; std::unique_ptr m_xLayoutBox; + std::unique_ptr m_xNumberFormatText; std::unique_ptr m_xNumberFormatBox; //Extras Calc std::unique_ptr m_xTblAlignFT; diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 9ba650f5ffea..99d1fcb67bcd 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -164,6 +164,7 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, weld::DialogController* , m_xBottomMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargBot", FieldUnit::CM)) , m_xPageText(m_xBuilder->weld_label("labelPageLayout")) , m_xLayoutBox(m_xBuilder->weld_combo_box("comboPageLayout")) + , m_xNumberFormatText(m_xBuilder->weld_label("labelPageNumbers")) , m_xNumberFormatBox(new SvxPageNumberListBox(m_xBuilder->weld_combo_box("comboLayoutFormat"))) , m_xTblAlignFT(m_xBuilder->weld_label("labelTblAlign")) , m_xHorzBox(m_xBuilder->weld_check_button("checkbuttonHorz")) @@ -1524,6 +1525,7 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet) const SfxUInt16Item* pPaperEndItem = aSet.GetItem(SID_PAPER_END, false); const SfxStringListItem* pCollectListItem = aSet.GetItem(SID_COLLECT_LIST, false); const SfxBoolItem* pSupportDrawingLayerFillStyleItem = aSet.GetItem(SID_DRAWINGLAYER_FILLSTYLES, false); + const SfxBoolItem* pIsImpressDoc = aSet.GetItem(SID_IMPRESS_DOC, false); if (pModeItem) { @@ -1546,6 +1548,9 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet) mbEnableDrawingLayerFillStyles = bNew; } + + if (pIsImpressDoc) + m_xNumberFormatText->set_label(SvxResId(STR_SLIDE_NUMBERS)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/uiconfig/ui/pageformatpage.ui b/cui/uiconfig/ui/pageformatpage.ui index 61ae2fca7fe1..0135d61e7457 100644 --- a/cui/uiconfig/ui/pageformatpage.ui +++ b/cui/uiconfig/ui/pageformatpage.ui @@ -517,11 +517,11 @@ - + True False True - Page numbers: + Page numbers: True comboLayoutFormat 0 @@ -753,7 +753,7 @@ Do you still want to apply these settings? - + diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 2ad744afa29e..d6d8c510ec03 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1388,6 +1388,9 @@ #define STR_COLORTABLE NC_("STR_COLORTABLE", "Color Palette") +// Used in the Slide Setup dialog of Impress +#define STR_SLIDE_NUMBERS NC_("STR_SLIDE_NUMBERS", "Slide numbers:") + // String for saving modified image (instead of original) #define RID_SVXSTR_SAVE_MODIFIED_IMAGE NC_("RID_SVXSTR_SAVE_MODIFIED_IMAGE", "The image has been modified. By default the original image will be saved.\nDo you want to save the modified version instead?") diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 1045ec364044..28d95b7ff6dd 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -987,8 +987,10 @@ class SvxSetItem; #define SID_EDIT_QRCODE ( SID_SVX_START + 1192 ) #define SID_COPY_HYPERLINK_LOCATION ( SID_SVX_START + 1193 ) +#define SID_IMPRESS_DOC TypedWhichId( SID_SVX_START + 1194 ) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1193 + 1 ) +#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1194 + 1 ) // Overflow check for slot IDs #if SID_SVX_FIRSTFREE > SID_SVX_END diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index ce5ed49ee656..eebe5695748d 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -176,7 +176,7 @@ public: virtual VclPtr CreateCopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; virtual VclPtr CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; virtual VclPtr CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; - virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; + virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) = 0; virtual VclPtr CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; virtual VclPtr CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 514275a4de20..cb345f59cd17 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -315,6 +315,7 @@ #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) #define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" ) #define STR_INSERT_PAGE_DRAW NC_("STR_INSERT_PAGE_DRAW", "Insert Page" ) +#define STR_SLIDE_SETUP_TITLE NC_("STR_SLIDE_SETUP_TITLE", "Slide Setup" ) #define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) 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 #include +#include +#include #include #include @@ -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 SdAbstractDialogFactory_Impl::CreateSdTabCharDialo return VclPtr::Create(std::make_unique(pParent, pAttr, pDocShell)); } -VclPtr SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage ) +VclPtr SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc ) { - return VclPtr::Create(std::make_unique(pDocShell, pParent, pAttr, bAreaPage)); + return VclPtr::Create(std::make_unique(pDocShell, pParent, pAttr, bAreaPage, bIsImpressDoc)); } VclPtr 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 CreateCopyDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override; virtual VclPtr CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc) override; virtual VclPtr CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override; - virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) override; + virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) override; virtual VclPtr CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override; virtual VclPtr CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override; virtual VclPtr 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 pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) ); + ScopedVclPtr 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; };