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

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Tue Dec 6 20:02:42 UTC 2016


 svx/source/dialog/SafeModeDialog.cxx |   34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

New commits:
commit 9da0627254ca31f768740a7b6012ca85d925fb30
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Tue Dec 6 16:57:19 2016 +0100

    Simplify code
    
    Change-Id: Ibb154ebdacb6f445371cb55d795420f92bed0a22
    Reviewed-on: https://gerrit.libreoffice.org/31691
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx
index c7db0b4..18256f3 100644
--- a/svx/source/dialog/SafeModeDialog.cxx
+++ b/svx/source/dialog/SafeModeDialog.cxx
@@ -164,35 +164,13 @@ void SafeModeDialog::dispose()
 
 void SafeModeDialog::enableDisableWidgets()
 {
-    if (!maBackupFileHelper.isPopPossible())
-    {
-        mpCBCheckProfilesafeConfig->Disable();
-    }
-
-    if (!maBackupFileHelper.isPopPossibleExtensionInfo())
-    {
-        mpCBCheckProfilesafeExtensions->Disable();
-    }
-
-    if (!comphelper::BackupFileHelper::isTryDisableAllExtensionsPossible())
-    {
-        mpCBDisableAllExtensions->Disable();
-    }
+    mpCBCheckProfilesafeConfig->Enable(maBackupFileHelper.isPopPossible());
+    mpCBCheckProfilesafeExtensions->Enable(maBackupFileHelper.isPopPossibleExtensionInfo());
+    mpCBDisableAllExtensions->Enable(comphelper::BackupFileHelper::isTryDisableAllExtensionsPossible());
+    mpCBDeinstallUserExtensions->Enable(comphelper::BackupFileHelper::isTryDeinstallUserExtensionsPossible());
+    mpCBDeinstallAllExtensions->Enable(comphelper::BackupFileHelper::isTryDeinstallAllExtensionsPossible());
+    mpCBResetCustomizations->Enable(comphelper::BackupFileHelper::isTryResetCustomizationsPossible());
 
-    if (!comphelper::BackupFileHelper::isTryDeinstallUserExtensionsPossible())
-    {
-        mpCBDeinstallUserExtensions->Disable();
-    }
-
-    if (!comphelper::BackupFileHelper::isTryDeinstallAllExtensionsPossible())
-    {
-        mpCBDeinstallAllExtensions->Disable();
-    }
-
-    if (!comphelper::BackupFileHelper::isTryResetCustomizationsPossible())
-    {
-        mpCBResetCustomizations->Disable();
-    }
     // no disable of mpCBResetWholeUserProfile, always possible (as last choice)
 }
 


More information about the Libreoffice-commits mailing list