[Libreoffice-commits] core.git: sd/inc sd/source

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 30 13:26:32 UTC 2019


 sd/inc/strings.hrc             |    1 +
 sd/source/ui/view/viewshe3.cxx |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 3701a8a8197f94551a0080ca7db102c0317b2133
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Oct 30 11:47:36 2019 +0300
Commit:     Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Wed Oct 30 14:25:10 2019 +0100

    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 <muhammet.kara at collabora.com>

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


More information about the Libreoffice-commits mailing list