From 5bc12e114fec50274580005647345a5392741ded Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Wed, 30 Oct 2019 16:46:47 +0300 Subject: [PATCH] tdf#114175: No slides in Draw In the past in Draw and Impress the same term 'slide' was used. Although it was decided to use 'page' in Draw and 'slide' in Impress; in several locations of the user interface this has been changed but not everywhere. Change-Id: I8f0911a6ae1775335950c0212dac52962a2af46a Reviewed-on: https://gerrit.libreoffice.org/81779 Tested-by: Jenkins Reviewed-by: Muhammet Kara --- sd/inc/strings.hrc | 2 ++ .../ui/slidesorter/controller/SlsSelectionManager.cxx | 7 ++++++- sd/source/ui/view/unmodpg.cxx | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index cb345f59cd17..1eeb0c178976 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -84,6 +84,7 @@ #define STR_IMPRESS NC_("STR_IMPRESS", "StarImpress 4.0") #define STR_LAYER NC_("STR_LAYER", "Layer") #define STR_UNDO_DELETEPAGES NC_("STR_UNDO_DELETEPAGES", "Delete slides") +#define STR_UNDO_DELETEPAGES_DRAW NC_("STR_UNDO_DELETEPAGES_DRAW", "Delete pages") #define STR_UNDO_INSERTPAGES NC_("STR_UNDO_INSERTPAGES", "Insert slides") #define STR_ASK_DELETE_LAYER NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the level \"$\"?\nNote: All objects on this level will be deleted!") #define STR_ASK_DELETE_ALL_PICTURES NC_("STR_ASK_DELETE_ALL_PICTURES", "Do you really want to delete all images?") @@ -122,6 +123,7 @@ #define STR_ASK_FOR_CONVERT_TO_BEZIER NC_("STR_ASK_FOR_CONVERT_TO_BEZIER", "Convert selected object to curve?") #define STR_UNDO_CHANGE_PRES_OBJECT NC_("STR_UNDO_CHANGE_PRES_OBJECT", "Modify presentation object '$'") #define STR_UNDO_MODIFY_PAGE NC_("STR_UNDO_MODIFY_PAGE", "Slide layout") +#define STR_UNDO_MODIFY_PAGE_DRAW NC_("STR_UNDO_MODIFY_PAGE_DRAW", "Page layout") #define STR_UNDO_INSERT_FILE NC_("STR_UNDO_INSERT_FILE", "Insert file") #define STR_UNDO_INSERT_SPECCHAR NC_("STR_UNDO_INSERT_SPECCHAR", "Insert special character") #define STR_UNDO_SET_PRESLAYOUT NC_("STR_UNDO_SET_PRESLAYOUT", "Apply presentation layout") diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 04c5d8270250..ca0cbad1bf51 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -107,10 +107,15 @@ void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage) if (pDrawView) pDrawView->BlockPageOrderChangedHint(true); + // Proper naming for the undo action + OUString sUndoComment(SdResId(STR_UNDO_DELETEPAGES)); + if (mrSlideSorter.GetView().GetDoc().GetDocumentType() == DocumentType::Draw) + sUndoComment = SdResId(STR_UNDO_DELETEPAGES_DRAW); + // The actual deletion of the selected pages is done in one of two // helper functions. They are specialized for normal respectively for // master pages. - mrSlideSorter.GetView().BegUndo (SdResId(STR_UNDO_DELETEPAGES)); + mrSlideSorter.GetView().BegUndo (sUndoComment); if (mrSlideSorter.GetModel().GetEditMode() == EditMode::Page) DeleteSelectedNormalPages(aSelectedPages); else diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx index 06272b0b8d9b..5885e346db48 100644 --- a/sd/source/ui/view/unmodpg.cxx +++ b/sd/source/ui/view/unmodpg.cxx @@ -72,7 +72,10 @@ ModifyPageUndoAction::ModifyPageUndoAction( mbOldBckgrndObjsVisible = false; } - SetComment( SdResId(STR_UNDO_MODIFY_PAGE) ); + if (pTheDoc && pTheDoc->GetDocumentType() == DocumentType::Draw) + SetComment( SdResId(STR_UNDO_MODIFY_PAGE_DRAW) ); + else + SetComment( SdResId(STR_UNDO_MODIFY_PAGE) ); } void ModifyPageUndoAction::Undo()