summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2017-08-18 21:57:35 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-08-19 05:13:39 +0200
commit793246e1ae1266e8bd4261aa45dad40f5da16785 (patch)
treec91a53ebd77b2351ddbdf765fd4ffc7ed94cb9c9 /sd
parent81d40428bbcfe332b78e154b4cd3fd7feff5ff73 (diff)
tdf#107183 Set different dialog title for renaming master slide
Change-Id: I351e6db782cce8ece78083e5a79e4c2baaa414ee Reviewed-on: https://gerrit.libreoffice.org/41310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/strings.hrc1
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx13
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx2
3 files changed, 12 insertions, 4 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 76ff0a0e060d..7d049670373f 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -233,6 +233,7 @@
#define STR_STATUSBAR_MASTERPAGE NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and double-click for dialog.")
#define STR_TITLE_RENAMESLIDE NC_("STR_TITLE_RENAMESLIDE", "Rename Slide")
#define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name")
+#define STR_TITLE_RENAMEMASTER NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide")
#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/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index ce146a969ddc..9cf3a557e4a0 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -241,7 +241,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_RENAMEPAGE:
case SID_RENAME_MASTER_PAGE:
- RenameSlide ();
+ RenameSlide (rRequest);
rRequest.Done ();
break;
@@ -851,7 +851,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
}
}
-void SlotManager::RenameSlide()
+void SlotManager::RenameSlide(SfxRequest& rRequest)
{
View* pDrView = &mrSlideSorter.GetView();
@@ -868,7 +868,14 @@ void SlotManager::RenameSlide()
pSelectedPage = aSelectedPages.GetNextElement()->GetPage();
if (pSelectedPage != nullptr)
{
- OUString aTitle( SdResId( STR_TITLE_RENAMESLIDE ) );
+ // tdf#107183 Set different dialog titles when renaming
+ // master slides or normal ones
+ OUString aTitle;
+ if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
+ aTitle = SdResId( STR_TITLE_RENAMEMASTER );
+ else
+ aTitle = SdResId( STR_TITLE_RENAMESLIDE );
+
OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
OUString aPageName = pSelectedPage->GetName();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index 41bb97e56c2f..1ca42fcd6cb6 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -81,7 +81,7 @@ private:
/** The implementation is a copy of the code for SID_RENAMEPAGE in
drviews2.cxx.
*/
- void RenameSlide();
+ void RenameSlide( SfxRequest& rRequest );
DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog&, bool);
bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUString& rName);