summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Horn <hornmichaels@gmail.com>2015-03-20 19:21:51 -0700
committerCaolán McNamara <caolanm@redhat.com>2015-03-23 09:48:33 +0000
commit093846124b06961daa400735eaf0d50115cf8690 (patch)
tree63bebb6d32e01863a00d6fe912685007782386e7 /sfx2
parent1da0c806d50b4701abe09902832f6bb41a6a75a7 (diff)
tdf#90095 Fixed wrong behavior of template delete dialog
The template delete dialog was coded in such a way that the default behavior was to delete the template/folder unless the user pressed no. This caused the template to be deleted if the dialog was closed using the "x" button. I changed the logic so that the dialog will only delete the template if the user presses yes. Any other button press will do nothing but close the dialog. Change-Id: I7977fd48b3e0cc440cc1e15056b448e7ae23476f Reviewed-on: https://gerrit.libreoffice.org/14937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2c3bd55979d5..a584a7d8f296 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1160,7 +1160,7 @@ void SfxTemplateManagerDlg::OnTemplateDelete ()
{
MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
- if ( aQueryDlg.Execute() == RET_NO )
+ if ( aQueryDlg.Execute() != RET_YES )
return;
OUString aTemplateList;
@@ -1245,7 +1245,7 @@ void SfxTemplateManagerDlg::OnFolderDelete()
{
MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
- if ( aQueryDlg.Execute() == RET_NO )
+ if ( aQueryDlg.Execute() != RET_YES )
return;
OUString aFolderList;