[Libreoffice-commits] core.git: sfx2/source

Michael Horn hornmichaels at gmail.com
Mon Mar 23 02:50:08 PDT 2015


 sfx2/source/doc/templatedlg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 093846124b06961daa400735eaf0d50115cf8690
Author: Michael Horn <hornmichaels at gmail.com>
Date:   Fri Mar 20 19:21:51 2015 -0700

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2c3bd55..a584a7d 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;


More information about the Libreoffice-commits mailing list