[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx sd/inc sd/source
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 31 00:03:27 UTC 2019
cui/source/inc/page.hxx | 1 +
cui/source/tabpages/page.cxx | 5 +++++
cui/uiconfig/ui/pageformatpage.ui | 6 +++---
include/svx/strings.hrc | 3 +++
include/svx/svxids.hrc | 4 +++-
sd/inc/sdabstdlg.hxx | 2 +-
sd/inc/strings.hrc | 1 +
sd/source/ui/dlg/dlgpage.cxx | 16 +++++++++++++++-
sd/source/ui/dlg/sddlgfact.cxx | 4 ++--
sd/source/ui/dlg/sddlgfact.hxx | 2 +-
sd/source/ui/func/fupage.cxx | 4 +++-
sd/source/ui/inc/dlgpage.hxx | 3 ++-
12 files changed, 40 insertions(+), 11 deletions(-)
New commits:
commit 57ba3d1d16df86d2393a8110620738e57265e19c
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Oct 30 19:49:57 2019 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Thu Oct 31 01:02:02 2019 +0100
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 at collabora.com>
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<weld::Label> m_xPageText;
std::unique_ptr<weld::ComboBox> m_xLayoutBox;
+ std::unique_ptr<weld::Label> m_xNumberFormatText;
std::unique_ptr<SvxPageNumberListBox> m_xNumberFormatBox;
//Extras Calc
std::unique_ptr<weld::Label> 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<SfxStringListItem>(SID_COLLECT_LIST, false);
const SfxBoolItem* pSupportDrawingLayerFillStyleItem = aSet.GetItem<SfxBoolItem>(SID_DRAWINGLAYER_FILLSTYLES, false);
+ const SfxBoolItem* pIsImpressDoc = aSet.GetItem<SfxBoolItem>(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 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="labelPageNumbers">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes" context="pageformatpage|label4">Page numbers:</property>
+ <property name="label" translatable="yes" context="pageformatpage|labelPageNumbers">Page numbers:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboLayoutFormat</property>
<property name="xalign">0</property>
@@ -753,7 +753,7 @@ Do you still want to apply these settings?</property>
<widgets>
<widget name="labelPaperTray"/>
<widget name="labelPageLayout"/>
- <widget name="label4"/>
+ <widget name="labelPageNumbers"/>
<widget name="labelTblAlign"/>
</widgets>
</object>
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<SfxBoolItem>( 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<AbstractCopyDlg> CreateCopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0;
virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0;
- virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) = 0;
virtual VclPtr<AbstractSdModifyFieldDlg> CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0;
virtual VclPtr<AbstractSdSnapLineDlg> CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0;
virtual VclPtr<AbstractSdInsertLayerDlg> 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 <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;
};
More information about the Libreoffice-commits
mailing list