From f943dd99ce7dfab222edaafbc7e5d3711781f89c Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Wed, 30 Oct 2019 12:01:11 +0300 Subject: tdf#114175: Set proper title for page rename dialog in Draw Change-Id: I014a4a654b9f6f4f330e61d1436d2a7aceead0c1 Reviewed-on: https://gerrit.libreoffice.org/81738 Tested-by: Jenkins Reviewed-by: Muhammet Kara --- sd/inc/strings.hrc | 1 + sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 2a08bee0da7f..514275a4de20 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -232,6 +232,7 @@ #define STR_HTMLEXP_ERROR_COPY_FILE NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to $(URL2)") #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_TITLE_RENAMEPAGE NC_("STR_TITLE_RENAMEPAGE", "Rename Page") #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" ) diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index cd43dd1b467f..ba1152da21b6 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -886,6 +886,8 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) OUString aTitle; if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE ) aTitle = SdResId( STR_TITLE_RENAMEMASTER ); + else if (pDrView && pDrView->GetDoc().GetDocumentType() == DocumentType::Draw) + aTitle = SdResId( STR_TITLE_RENAMEPAGE ); else aTitle = SdResId( STR_TITLE_RENAMESLIDE ); @@ -897,7 +899,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) OUString aName = rRequest.GetArgs()->GetItem(SID_RENAMEPAGE)->GetValue(); bool bResult = RenameSlideFromDrawViewShell(pSelectedPage->GetPageNum()/2, aName ); - DBG_ASSERT( bResult, "Couldn't rename slide" ); + DBG_ASSERT( bResult, "Couldn't rename slide or page" ); } else { @@ -921,7 +923,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) bool bResult = RenameSlideFromDrawViewShell( pSelectedPage->GetPageNum()/2, aNewName ); - DBG_ASSERT( bResult, "Couldn't rename slide" ); + DBG_ASSERT( bResult, "Couldn't rename slide or page" ); } } OUString aNewName; -- cgit