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>
This commit is contained in:
@@ -1103,7 +1103,7 @@
|
|||||||
</node>
|
</node>
|
||||||
<node oor:name=".uno:DrawingLayout" oor:op="replace">
|
<node oor:name=".uno:DrawingLayout" oor:op="replace">
|
||||||
<prop oor:name="Label" oor:type="xs:string">
|
<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>
|
||||||
<prop oor:name="TargetURL" oor:type="xs:string">
|
<prop oor:name="TargetURL" oor:type="xs:string">
|
||||||
<value>.uno:PresentationLayout</value>
|
<value>.uno:PresentationLayout</value>
|
||||||
|
@@ -159,7 +159,12 @@
|
|||||||
|
|
||||||
// Strings for animation effects
|
// Strings for animation effects
|
||||||
#define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text")
|
#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_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_SMART NC_("STR_GLUE_ESCDIR_SMART", "Smart")
|
||||||
#define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left")
|
#define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left")
|
||||||
#define STR_GLUE_ESCDIR_RIGHT NC_("STR_GLUE_ESCDIR_RIGHT", "Right")
|
#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_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_TOOLTIP_RENAME NC_("STR_TOOLTIP_RENAME", "Duplicate or empty names are not possible")
|
||||||
#define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name")
|
#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_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_OUTLINE NC_("STR_PLACEHOLDER_DESCRIPTION_OUTLINE", "Object Area for AutoLayouts" )
|
||||||
#define STR_PLACEHOLDER_DESCRIPTION_FOOTER NC_("STR_PLACEHOLDER_DESCRIPTION_FOOTER", "Footer Area" )
|
#define STR_PLACEHOLDER_DESCRIPTION_FOOTER NC_("STR_PLACEHOLDER_DESCRIPTION_FOOTER", "Footer Area" )
|
||||||
|
@@ -47,7 +47,18 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
|
|||||||
, m_xBtnLoad(m_xBuilder->weld_button("load"))
|
, m_xBtnLoad(m_xBuilder->weld_button("load"))
|
||||||
, m_xVS(new ValueSet(m_xBuilder->weld_scrolled_window("selectwin", true)))
|
, m_xVS(new ValueSet(m_xBuilder->weld_scrolled_window("selectwin", true)))
|
||||||
, m_xVSWin(new weld::CustomWeld(*m_xBuilder, "select", *m_xVS))
|
, 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_xVSWin->set_size_request(m_xBtnLoad->get_approximate_digit_width() * 60,
|
||||||
m_xBtnLoad->get_text_height() * 20);
|
m_xBtnLoad->get_text_height() * 20);
|
||||||
|
|
||||||
@@ -172,6 +183,9 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLayoutHdl, ValueSet*, void)
|
|||||||
IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, weld::Button&, void)
|
IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
SfxNewFileDialog aDlg(m_xDialog.get(), SfxNewFileDialogMode::Preview);
|
SfxNewFileDialog aDlg(m_xDialog.get(), SfxNewFileDialogMode::Preview);
|
||||||
|
if (mpDocSh->GetDoc()->GetDocumentType() == DocumentType::Draw)
|
||||||
|
aDlg.set_title(SdResId(STR_LOAD_DRAWING_LAYOUT));
|
||||||
|
else
|
||||||
aDlg.set_title(SdResId(STR_LOAD_PRESENTATION_LAYOUT));
|
aDlg.set_title(SdResId(STR_LOAD_PRESENTATION_LAYOUT));
|
||||||
sal_uInt16 nResult = aDlg.run();
|
sal_uInt16 nResult = aDlg.run();
|
||||||
|
|
||||||
|
@@ -62,6 +62,7 @@ private:
|
|||||||
std::unique_ptr<weld::Button> m_xBtnLoad;
|
std::unique_ptr<weld::Button> m_xBtnLoad;
|
||||||
std::unique_ptr<ValueSet> m_xVS;
|
std::unique_ptr<ValueSet> m_xVS;
|
||||||
std::unique_ptr<weld::CustomWeld> m_xVSWin;
|
std::unique_ptr<weld::CustomWeld> m_xVSWin;
|
||||||
|
std::unique_ptr<weld::Label> m_xLabel;
|
||||||
|
|
||||||
void FillValueSet();
|
void FillValueSet();
|
||||||
void Reset();
|
void Reset();
|
||||||
|
@@ -888,11 +888,19 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
|
|||||||
// master slides or normal ones
|
// master slides or normal ones
|
||||||
OUString aTitle;
|
OUString aTitle;
|
||||||
if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
|
if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
|
||||||
aTitle = SdResId( STR_TITLE_RENAMEMASTER );
|
{
|
||||||
else if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
|
if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
|
||||||
|
aTitle = SdResId( STR_TITLE_RENAMEMASTERPAGE );
|
||||||
|
else
|
||||||
|
aTitle = SdResId( STR_TITLE_RENAMEMASTERSLIDE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
|
||||||
aTitle = SdResId( STR_TITLE_RENAMEPAGE );
|
aTitle = SdResId( STR_TITLE_RENAMEPAGE );
|
||||||
else
|
else
|
||||||
aTitle = SdResId( STR_TITLE_RENAMESLIDE );
|
aTitle = SdResId( STR_TITLE_RENAMESLIDE );
|
||||||
|
}
|
||||||
|
|
||||||
OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
|
OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
|
||||||
OUString aPageName = pSelectedPage->GetName();
|
OUString aPageName = pSelectedPage->GetName();
|
||||||
|
@@ -47,6 +47,6 @@
|
|||||||
</menu:menupopup>
|
</menu:menupopup>
|
||||||
</menu:menu>
|
</menu:menu>
|
||||||
<menu:menuitem menu:id=".uno:SaveBackground"/>
|
<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:menuitem menu:id=".uno:PageSetup"/>
|
||||||
</menu:menupopup>
|
</menu:menupopup>
|
||||||
|
@@ -16,5 +16,5 @@
|
|||||||
<menu:menuitem menu:id=".uno:DeleteMasterPage"/>
|
<menu:menuitem menu:id=".uno:DeleteMasterPage"/>
|
||||||
<menu:menuitem menu:id=".uno:RenameMasterPage"/>
|
<menu:menuitem menu:id=".uno:RenameMasterPage"/>
|
||||||
<menu:menuseparator/>
|
<menu:menuseparator/>
|
||||||
<menu:menuitem menu:id=".uno:PresentationLayout"/>
|
<menu:menuitem menu:id=".uno:DrawingLayout"/>
|
||||||
</menu:menupopup>
|
</menu:menupopup>
|
||||||
|
@@ -1351,7 +1351,7 @@
|
|||||||
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="action_name">.uno:PresentationLayout</property>
|
<property name="action_name">.uno:DrawingLayout</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -6197,7 +6197,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkToolButton" id="Page-PresentationLayout">
|
<object class="GtkToolButton" id="Page-PresentationLayout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="action_name">.uno:PresentationLayout</property>
|
<property name="action_name">.uno:DrawingLayout</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@@ -1259,7 +1259,7 @@
|
|||||||
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="action_name">.uno:PresentationLayout</property>
|
<property name="action_name">.uno:DrawingLayout</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -5902,7 +5902,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkToolButton" id="Page-PresentationLayout">
|
<object class="GtkToolButton" id="Page-PresentationLayout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="action_name">.uno:PresentationLayout</property>
|
<property name="action_name">.uno:DrawingLayout</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@@ -2759,7 +2759,7 @@
|
|||||||
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
<object class="GtkMenuItem" id="MenuSlide-PresentationLayout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="action_name">.uno:PresentationLayout</property>
|
<property name="action_name">.uno:DrawingLayout</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
Reference in New Issue
Block a user