svx/source/dialog/SafeModeDialog.cxx | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-)
New commits: commit 9da0627254ca31f768740a7b6012ca85d925fb30 Author: Samuel Mehrbrodt <samuel.mehrbr...@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.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@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) } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits