summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2013-03-10 22:50:16 -0430
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-03-11 14:59:49 +0100
commit1847de945a2b4ca66c02d19621404c567ee3b5be (patch)
tree25423bc578792497ab8b745413bf67e49740b44c
parent7398b71487516380b7eff54f42eff88ae69fd22a (diff)
Ask for confirmation when deleting a template, fdo#61466
Change-Id: Iaa499bfa5536d8df1d4e6d2aed3c350c588a0c46 (cherry picked from commit aac44d9c424861814e81d18b75b6ef315762ccce)
-rw-r--r--sfx2/source/doc/templatedlg.cxx5
-rw-r--r--sfx2/source/doc/templatedlg.hrc1
-rw-r--r--sfx2/source/doc/templatedlg.src5
3 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 7041966afb96..2ff1b05db7ce 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 672575c38b05..abddcd9d73f2 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 a3514316e76f..28b6963db3c5 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;