[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sfx2/source

Rafael Dominguez venccsralph at gmail.com
Mon Mar 11 07:03:07 PDT 2013


 sfx2/source/doc/templatedlg.cxx |    5 +++++
 sfx2/source/doc/templatedlg.hrc |    1 +
 sfx2/source/doc/templatedlg.src |    5 +++++
 3 files changed, 11 insertions(+)

New commits:
commit 1847de945a2b4ca66c02d19621404c567ee3b5be
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Sun Mar 10 22:50:16 2013 -0430

    Ask for confirmation when deleting a template, fdo#61466
    
    Change-Id: Iaa499bfa5536d8df1d4e6d2aed3c350c588a0c46
    (cherry picked from commit aac44d9c424861814e81d18b75b6ef315762ccce)

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 7041966..2ff1b05 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1019,6 +1019,11 @@ void SfxTemplateManagerDlg::OnTemplateProperties ()
 
 void SfxTemplateManagerDlg::OnTemplateDelete ()
 {
+    QueryBox aQueryDlg(this, WB_YES_NO | WB_DEF_YES, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE).toString());
+
+    if ( aQueryDlg.Execute() == RET_NO )
+        return;
+
     OUString aTemplateList;
 
     if (mpSearchView->IsVisible())
diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc
index 672575c..abddcd9 100644
--- a/sfx2/source/doc/templatedlg.hrc
+++ b/sfx2/source/doc/templatedlg.hrc
@@ -71,6 +71,7 @@
 
 #define STR_QMSG_SEL_FOLDER_DELETE          289
 #define STR_QMSG_TEMPLATE_OVERWRITE         290
+#define STR_QMSG_SEL_TEMPLATE_DELETE        291
 
 #define IMG_ACTION_SORT             304
 #define IMG_ACTION_REFRESH          305
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index a351431..28b6963 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -101,6 +101,11 @@ String STR_QMSG_TEMPLATE_OVERWRITE
     Text [ en-US ] = "A template named $1 already exist in $2. Do you want to overwrite it?";
 };
 
+String STR_QMSG_SEL_TEMPLATE_DELETE
+{
+    Text [ en-US ] = "Do you want to delete the selected templates?";
+};
+
 ModelessDialog DLG_TEMPLATE_MANAGER
 {
     OutputSize = TRUE;


More information about the Libreoffice-commits mailing list