summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Horn <hornmichaels@gmail.com>2015-03-20 19:21:51 -0700
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-03-24 04:29:36 +0000
commit662b8c0741f6e864b5b4af07c1a74737ef223c4e (patch)
tree49915a15a67653d3499441f3fd70f641dd93434d /sfx2
parent8d0cdb86dd89660b56522e0cab8e83bd59e3cf85 (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> (cherry picked from commit 093846124b06961daa400735eaf0d50115cf8690) Reviewed-on: https://gerrit.libreoffice.org/14963 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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 ca1d508ce570..04202c7304dd 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;