summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaole Fang <baole.fang@gmail.com>2023-05-07 22:35:34 -0400
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-05-24 09:22:48 +0200
commit0a90b90048313fb43f8c5d7461f58dafec276600 (patch)
tree149ad0f1da4921c4f9ec196c948c64a5df71a70a
parenta92965d51887b552d912304fbf9efd6d5015a82a (diff)
tdf#148088: Fix master related UI in Draw
Page/Master Page... -> Page/Change Master Page... (corresponds to Impress) In the above dialog: Available Master Slides -> Available Master Pages Select a Slide Design -> Select a Page Design After clickling load: Load Master Slide -> Load Master Page In Master mode, right click/Rename Master: Rename Master Slide -> Rename Master Page Change-Id: I6a8e987d6f3eaf91289ec061ec87cd76b3f90ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151489 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu2
-rw-r--r--sd/inc/strings.hrc8
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx16
-rw-r--r--sd/source/ui/inc/sdpreslt.hxx1
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx16
-rw-r--r--sd/uiconfig/sdraw/popupmenu/page.xml2
-rw-r--r--sd/uiconfig/sdraw/popupmenu/pagepanemaster.xml2
-rw-r--r--sd/uiconfig/sdraw/ui/notebookbar.ui4
-rw-r--r--sd/uiconfig/sdraw/ui/notebookbar_compact.ui4
-rw-r--r--sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui2
10 files changed, 43 insertions, 14 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 716d496161e6..cca1b2ec38ae 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1103,7 +1103,7 @@
</node>
<node oor:name=".uno:DrawingLayout" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Master Page...</value>
+ <value xml:lang="en-US">Change Master Page...</value>
</prop>
<prop oor:name="TargetURL" oor:type="xs:string">
<value>.uno:PresentationLayout</value>
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index bf5372b2ad33..3e1ddd1542e7 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -159,7 +159,12 @@
// Strings for animation effects
#define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text")
+#define STR_AVAILABLE_MASTERSLIDE NC_("STR_AVAILABLE_MASTERSLIDE", "Available Master Slides")
+#define STR_AVAILABLE_MASTERPAGE NC_("STR_AVAILABLE_MASTERPAGE", "Available Master Pages")
+#define STR_SELECT_SLIDE NC_("STR_SELECT_SLIDE", "Select a Slide Design")
+#define STR_SELECT_PAGE NC_("STR_SELECT_PAGE", "Select a Page Design")
#define STR_LOAD_PRESENTATION_LAYOUT NC_("STR_LOAD_PRESENTATION_LAYOUT", "Load Master Slide")
+#define STR_LOAD_DRAWING_LAYOUT NC_("STR_LOAD_DRAWING_LAYOUT", "Load Master Page")
#define STR_GLUE_ESCDIR_SMART NC_("STR_GLUE_ESCDIR_SMART", "Smart")
#define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left")
#define STR_GLUE_ESCDIR_RIGHT NC_("STR_GLUE_ESCDIR_RIGHT", "Right")
@@ -238,7 +243,8 @@
#define STR_TITLE_RENAMEPAGE NC_("STR_TITLE_RENAMEPAGE", "Rename Page")
#define STR_TOOLTIP_RENAME NC_("STR_TOOLTIP_RENAME", "Duplicate or empty names are not possible")
#define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name")
-#define STR_TITLE_RENAMEMASTER NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide")
+#define STR_TITLE_RENAMEMASTERSLIDE NC_("STR_TITLE_RENAMEMASTERSLIDE", "Rename Master Slide")
+#define STR_TITLE_RENAMEMASTERPAGE NC_("STR_TITLE_RENAMEMASTERPAGE", "Rename Master Page")
#define STR_PLACEHOLDER_DESCRIPTION_TITLE NC_("STR_PLACEHOLDER_DESCRIPTION_TITLE", "Title Area for AutoLayouts" )
#define STR_PLACEHOLDER_DESCRIPTION_OUTLINE NC_("STR_PLACEHOLDER_DESCRIPTION_OUTLINE", "Object Area for AutoLayouts" )
#define STR_PLACEHOLDER_DESCRIPTION_FOOTER NC_("STR_PLACEHOLDER_DESCRIPTION_FOOTER", "Footer Area" )
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index dd54611e28d9..d0d0839bbb41 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -47,7 +47,18 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
, m_xBtnLoad(m_xBuilder->weld_button("load"))
, m_xVS(new ValueSet(m_xBuilder->weld_scrolled_window("selectwin", true)))
, m_xVSWin(new weld::CustomWeld(*m_xBuilder, "select", *m_xVS))
+ , m_xLabel(m_xBuilder->weld_label("label1"))
{
+ if (mpDocSh->GetDoc()->GetDocumentType() == DocumentType::Draw)
+ {
+ m_xDialog->set_title(SdResId(STR_AVAILABLE_MASTERPAGE));
+ m_xLabel->set_label(SdResId(STR_SELECT_PAGE));
+ }
+ else
+ {
+ m_xDialog->set_title(SdResId(STR_AVAILABLE_MASTERSLIDE));
+ m_xLabel->set_label(SdResId(STR_SELECT_SLIDE));
+ }
m_xVSWin->set_size_request(m_xBtnLoad->get_approximate_digit_width() * 60,
m_xBtnLoad->get_text_height() * 20);
@@ -172,7 +183,10 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLayoutHdl, ValueSet*, void)
IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, weld::Button&, void)
{
SfxNewFileDialog aDlg(m_xDialog.get(), SfxNewFileDialogMode::Preview);
- aDlg.set_title(SdResId(STR_LOAD_PRESENTATION_LAYOUT));
+ if (mpDocSh->GetDoc()->GetDocumentType() == DocumentType::Draw)
+ aDlg.set_title(SdResId(STR_LOAD_DRAWING_LAYOUT));
+ else
+ aDlg.set_title(SdResId(STR_LOAD_PRESENTATION_LAYOUT));
sal_uInt16 nResult = aDlg.run();
bool bCancel = false;
diff --git a/sd/source/ui/inc/sdpreslt.hxx b/sd/source/ui/inc/sdpreslt.hxx
index 77187a0b3780..2e87b6684057 100644
--- a/sd/source/ui/inc/sdpreslt.hxx
+++ b/sd/source/ui/inc/sdpreslt.hxx
@@ -62,6 +62,7 @@ private:
std::unique_ptr<weld::Button> m_xBtnLoad;
std::unique_ptr<ValueSet> m_xVS;
std::unique_ptr<weld::CustomWeld> m_xVSWin;
+ std::unique_ptr<weld::Label> m_xLabel;
void FillValueSet();
void Reset();
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index d1c130ae3a8f..41a6b64708e0 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -888,11 +888,19 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
// master slides or normal ones
OUString aTitle;
if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
- aTitle = SdResId( STR_TITLE_RENAMEMASTER );
- else if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
- aTitle = SdResId( STR_TITLE_RENAMEPAGE );
+ {
+ if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
+ aTitle = SdResId( STR_TITLE_RENAMEMASTERPAGE );
+ else
+ aTitle = SdResId( STR_TITLE_RENAMEMASTERSLIDE );
+ }
else
- aTitle = SdResId( STR_TITLE_RENAMESLIDE );
+ {
+ if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
+ aTitle = SdResId( STR_TITLE_RENAMEPAGE );
+ else
+ aTitle = SdResId( STR_TITLE_RENAMESLIDE );
+ }
OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
OUString aPageName = pSelectedPage->GetName();
diff --git a/sd/uiconfig/sdraw/popupmenu/page.xml b/sd/uiconfig/sdraw/popupmenu/page.xml
index 1da86394fb93..6fcedee47db1 100644
--- a/sd/uiconfig/sdraw/popupmenu/page.xml
+++ b/sd/uiconfig/sdraw/popupmenu/page.xml
@@ -47,6 +47,6 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:SaveBackground"/>
- <menu:menuitem menu:id=".uno:PresentationLayout"/>
+ <menu:menuitem menu:id=".uno:DrawingLayout"/>
<menu:menuitem menu:id=".uno:PageSetup"/>
</menu:menupopup>
diff --git a/sd/uiconfig/sdraw/popupmenu/pagepanemaster.xml b/sd/uiconfig/sdraw/popupmenu/pagepanemaster.xml
index bf160dfff1f7..a003a78e6372 100644
--- a/sd/uiconfig/sdraw/popupmenu/pagepanemaster.xml
+++ b/sd/uiconfig/sdraw/popupmenu/pagepanemaster.xml
@@ -16,5 +16,5 @@
<menu:menuitem menu:id=".uno:DeleteMasterPage"/>
<menu:menuitem menu:id=".uno:RenameMasterPage"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PresentationLayout"/>
+ <menu:menuitem menu:id=".uno:DrawingLayout"/>
</menu:menupopup>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui b/sd/uiconfig/sdraw/ui/notebookbar.ui
index f0bf8734ad9b..bea7d9e6730e 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -1351,7 +1351,7 @@
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PresentationLayout</property>
+ <property name="action_name">.uno:DrawingLayout</property>
</object>
</child>
<child>
@@ -6197,7 +6197,7 @@
<child>
<object class="GtkToolButton" id="Page-PresentationLayout">
<property name="visible">True</property>
- <property name="action_name">.uno:PresentationLayout</property>
+ <property name="action_name">.uno:DrawingLayout</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
index 34d593d380ba..b9582b74f4db 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
@@ -1259,7 +1259,7 @@
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PresentationLayout</property>
+ <property name="action_name">.uno:DrawingLayout</property>
</object>
</child>
<child>
@@ -5902,7 +5902,7 @@
<child>
<object class="GtkToolButton" id="Page-PresentationLayout">
<property name="visible">True</property>
- <property name="action_name">.uno:PresentationLayout</property>
+ <property name="action_name">.uno:DrawingLayout</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
index 614e195d054b..cbb04e7b0d72 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
@@ -2759,7 +2759,7 @@
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PresentationLayout</property>
+ <property name="action_name">.uno:DrawingLayout</property>
</object>
</child>
<child>