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()