From 3701a8a8197f94551a0080ca7db102c0317b2133 Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Wed, 30 Oct 2019 11:47:36 +0300 Subject: tdf#114175: Proper naming for 'Insert Page' undo action in Draw Change-Id: Ia22b4ee8cde95dac936715ef89ca5ef9811ede12 Reviewed-on: https://gerrit.libreoffice.org/81735 Tested-by: Jenkins Reviewed-by: Muhammet Kara --- sd/inc/strings.hrc | 1 + sd/source/ui/view/viewshe3.cxx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 10717e37f12c..2a08bee0da7f 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -313,6 +313,7 @@ #define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" ) #define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) #define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" ) +#define STR_INSERT_PAGE_DRAW NC_("STR_INSERT_PAGE_DRAW", "Insert Page" ) #define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) #define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 4ffa985b0ed5..cad902ed86db 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -278,9 +278,13 @@ SdPage* ViewShell::CreateOrDuplicatePage ( // 2. Create a new page or duplicate an existing one. View* pDrView = GetView(); const bool bUndo = pDrView && pDrView->IsUndoEnabled(); - if( bUndo ) + if( bUndo && GetDoc()->GetDocumentType() == DocumentType::Draw) + pDrView->BegUndo(SdResId(STR_INSERT_PAGE_DRAW)); + else if (bUndo) pDrView->BegUndo(SdResId(STR_INSERTPAGE)); + + sal_uInt16 nNewPageIndex = 0xffff; switch (nSId) { -- cgit