diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-17 09:37:31 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-25 23:27:56 +0200 |
commit | 41f5c11c3b5f5b57f480dd809b850fe563b53691 (patch) | |
tree | df139718c1c5249de728e697b6aea74152874fe0 /uui | |
parent | c67a0d0f7ddd8ababa3197d86998979c1ce725d0 (diff) |
vcl: change ErrorHandlerFlags to DialogMask
Change-Id: I1959ac97f679d8d719f851f9869962b39a20ded9
Reviewed-on: https://gerrit.libreoffice.org/36841
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl-authentication.cxx | 26 | ||||
-rw-r--r-- | uui/source/iahndl-errorhandler.cxx | 26 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 20 | ||||
-rw-r--r-- | uui/source/loginerr.hxx | 8 |
4 files changed, 40 insertions, 40 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 11b1062dbc08..d4ee48a759c2 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -114,8 +114,8 @@ executeLoginDialog( if ( bCanUseSysCreds ) xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() ); - rInfo.SetResult(xDialog->Execute() == RET_OK ? ErrorHandlerFlags::ButtonsOk : - ErrorHandlerFlags::ButtonsCancel); + rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : + DialogMask::ButtonsCancel); rInfo.SetUserName(xDialog->GetName()); rInfo.SetPassword(xDialog->GetPassword()); rInfo.SetAccount(xDialog->GetAccount()); @@ -277,7 +277,7 @@ handleAuthenticationRequest_( rRequest.HasRealm ? rRequest.Realm : OUString()); switch (aInfo.GetResult()) { - case ErrorHandlerFlags::ButtonsOk: + case DialogMask::ButtonsOk: if (xSupplyAuthentication.is()) { if (xSupplyAuthentication->canSetUserName()) @@ -391,7 +391,7 @@ handleAuthenticationRequest_( } break; - case ErrorHandlerFlags::ButtonsRetry: + case DialogMask::ButtonsRetry: if (xRetry.is()) xRetry->select(); break; @@ -420,7 +420,7 @@ executeMasterPasswordDialog( ScopedVclPtrInstance< MasterPasswordCreateDialog > xDialog( pParent, xManager.get()); rInfo.SetResult(xDialog->Execute() - == RET_OK ? ErrorHandlerFlags::ButtonsOk : ErrorHandlerFlags::ButtonsCancel); + == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); aMaster = OUStringToOString( xDialog->GetMasterPassword(), RTL_TEXTENCODING_UTF8); } @@ -429,7 +429,7 @@ executeMasterPasswordDialog( ScopedVclPtrInstance< MasterPasswordDialog > xDialog( pParent, nMode, xManager.get()); rInfo.SetResult(xDialog->Execute() - == RET_OK ? ErrorHandlerFlags::ButtonsOk : ErrorHandlerFlags::ButtonsCancel); + == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); aMaster = OUStringToOString( xDialog->GetMasterPassword(), RTL_TEXTENCODING_UTF8); } @@ -477,7 +477,7 @@ handleMasterPasswordRequest_( switch (aInfo.GetResult()) { - case ErrorHandlerFlags::ButtonsOk: + case DialogMask::ButtonsOk: if (xSupplyAuthentication.is()) { if (xSupplyAuthentication->canSetPassword()) @@ -486,7 +486,7 @@ handleMasterPasswordRequest_( } break; - case ErrorHandlerFlags::ButtonsRetry: + case DialogMask::ButtonsRetry: if (xRetry.is()) xRetry->select(); break; @@ -521,7 +521,7 @@ executePasswordDialog( bIsPasswordToModify, bIsSimplePasswordRequest); xDialog->SetMinLen(0); - rInfo.SetResult(xDialog->Execute() == RET_OK ? ErrorHandlerFlags::ButtonsOk : ErrorHandlerFlags::ButtonsCancel); + rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); rInfo.SetPassword(xDialog->GetPassword()); } else @@ -532,7 +532,7 @@ executePasswordDialog( ScopedVclPtr<AbstractPasswordToOpenModifyDialog> const pDialog( pFact->CreatePasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify)); - rInfo.SetResult( pDialog->Execute() == RET_OK ? ErrorHandlerFlags::ButtonsOk : ErrorHandlerFlags::ButtonsCancel ); + rInfo.SetResult( pDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel ); rInfo.SetPassword( pDialog->GetPasswordToOpen() ); rInfo.SetPasswordToModify( pDialog->GetPasswordToModify() ); rInfo.SetRecommendToOpenReadonly( pDialog->IsRecommendToOpenReadonly() ); @@ -544,7 +544,7 @@ executePasswordDialog( bIsPasswordToModify, bIsSimplePasswordRequest); xDialog->SetMinLen(0); - rInfo.SetResult(xDialog->Execute() == RET_OK ? ErrorHandlerFlags::ButtonsOk : ErrorHandlerFlags::ButtonsCancel); + rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel); rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword()); rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString()); } @@ -583,7 +583,7 @@ handlePasswordRequest_( switch (aInfo.GetResult()) { - case ErrorHandlerFlags::ButtonsOk: + case DialogMask::ButtonsOk: OSL_ENSURE( !bIsPasswordToModify || xPassword2.is(), "PasswordToModify is requested, but there is no Interaction!" ); if (xPassword.is()) { @@ -598,7 +598,7 @@ handlePasswordRequest_( } break; - case ErrorHandlerFlags::ButtonsRetry: + case DialogMask::ButtonsRetry: if (xRetry.is()) xRetry->select(); break; diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index d9a3d2ab8c6c..3e90c6ebdb36 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -40,7 +40,7 @@ using namespace com::sun::star; namespace { -ErrorHandlerFlags +DialogMask executeErrorDialog( vcl::Window * pParent, task::InteractionClassification eClassification, @@ -105,23 +105,23 @@ executeErrorDialog( xBox.disposeAndClear(); - ErrorHandlerFlags aResult = ErrorHandlerFlags::NONE; + DialogMask aResult = DialogMask::NONE; switch( aMessResult ) { case RET_OK: - aResult = ErrorHandlerFlags::ButtonsOk; + aResult = DialogMask::ButtonsOk; break; case RET_CANCEL: - aResult = ErrorHandlerFlags::ButtonsCancel; + aResult = DialogMask::ButtonsCancel; break; case RET_YES: - aResult = ErrorHandlerFlags::ButtonsYes; + aResult = DialogMask::ButtonsYes; break; case RET_NO: - aResult = ErrorHandlerFlags::ButtonsNo; + aResult = DialogMask::ButtonsNo; break; case RET_RETRY: - aResult = ErrorHandlerFlags::ButtonsRetry; + aResult = DialogMask::ButtonsRetry; break; default: assert(false); } @@ -259,12 +259,12 @@ UUIInteractionHelper::handleErrorHandlerRequest( } } - ErrorHandlerFlags nResult = executeErrorDialog( + DialogMask nResult = executeErrorDialog( getParentProperty(), eClassification, aContext, aMessage, nButtonMask ); switch (nResult) { - case ErrorHandlerFlags::ButtonsOk: + case DialogMask::ButtonsOk: OSL_ENSURE(xApprove.is() || xAbort.is(), "unexpected situation"); if (xApprove.is()) xApprove->select(); @@ -272,25 +272,25 @@ UUIInteractionHelper::handleErrorHandlerRequest( xAbort->select(); break; - case ErrorHandlerFlags::ButtonsCancel: + case DialogMask::ButtonsCancel: OSL_ENSURE(xAbort.is(), "unexpected situation"); if (xAbort.is()) xAbort->select(); break; - case ErrorHandlerFlags::ButtonsRetry: + case DialogMask::ButtonsRetry: OSL_ENSURE(xRetry.is(), "unexpected situation"); if (xRetry.is()) xRetry->select(); break; - case ErrorHandlerFlags::ButtonsNo: + case DialogMask::ButtonsNo: OSL_ENSURE(xDisapprove.is(), "unexpected situation"); if (xDisapprove.is()) xDisapprove->select(); break; - case ErrorHandlerFlags::ButtonsYes: + case DialogMask::ButtonsYes: OSL_ENSURE(xApprove.is(), "unexpected situation"); if (xApprove.is()) xApprove->select(); diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index c1049894d200..b42e5625ba70 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -973,7 +973,7 @@ UUIInteractionHelper::getInteractionHandler() namespace { -ErrorHandlerFlags +DialogMask executeMessageBox( vcl::Window * pParent, OUString const & rTitle, @@ -985,23 +985,23 @@ executeMessageBox( ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, rTitle, rMessage); sal_uInt16 aMessResult = xBox->Execute(); - ErrorHandlerFlags aResult = ErrorHandlerFlags::NONE; + DialogMask aResult = DialogMask::NONE; switch( aMessResult ) { case RET_OK: - aResult = ErrorHandlerFlags::ButtonsOk; + aResult = DialogMask::ButtonsOk; break; case RET_CANCEL: - aResult = ErrorHandlerFlags::ButtonsCancel; + aResult = DialogMask::ButtonsCancel; break; case RET_YES: - aResult = ErrorHandlerFlags::ButtonsYes; + aResult = DialogMask::ButtonsYes; break; case RET_NO: - aResult = ErrorHandlerFlags::ButtonsNo; + aResult = DialogMask::ButtonsNo; break; case RET_RETRY: - aResult = ErrorHandlerFlags::ButtonsRetry; + aResult = DialogMask::ButtonsRetry; break; default: assert(false); } @@ -1258,19 +1258,19 @@ UUIInteractionHelper::handleBrokenPackageRequest( switch ( executeMessageBox( getParentProperty(), title, aMessage, nButtonMask ) ) { - case ErrorHandlerFlags::ButtonsOk: + case DialogMask::ButtonsOk: OSL_ENSURE( xAbort.is(), "unexpected situation" ); if (xAbort.is()) xAbort->select(); break; - case ErrorHandlerFlags::ButtonsNo: + case DialogMask::ButtonsNo: OSL_ENSURE(xDisapprove.is(), "unexpected situation"); if (xDisapprove.is()) xDisapprove->select(); break; - case ErrorHandlerFlags::ButtonsYes: + case DialogMask::ButtonsYes: OSL_ENSURE(xApprove.is(), "unexpected situation"); if (xApprove.is()) xApprove->select(); diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx index ae0775a3f154..5fe7dbb8cbd4 100644 --- a/uui/source/loginerr.hxx +++ b/uui/source/loginerr.hxx @@ -43,13 +43,13 @@ private: OUString m_aPath; OUString m_aErrorText; sal_uInt8 m_nFlags; - ErrorHandlerFlags m_nRet; + DialogMask m_nRet; bool m_bRecommendToOpenReadonly; public: LoginErrorInfo() : m_nFlags(LOGINERROR_FLAG_MODIFY_USER_NAME) - , m_nRet(ErrorHandlerFlags::ButtonsCancel) + , m_nRet(DialogMask::ButtonsCancel) , m_bRecommendToOpenReadonly(false) { } @@ -72,7 +72,7 @@ public: { return ( m_nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == LOGINERROR_FLAG_IS_USE_SYSCREDS; } sal_uInt8 GetFlags() const { return m_nFlags; } - ErrorHandlerFlags GetResult() const { return m_nRet; } + DialogMask GetResult() const { return m_nRet; } void SetTitle( const OUString& aTitle ) { m_aTitle = aTitle; } @@ -100,7 +100,7 @@ public: inline void SetModifyAccount( bool bSet ); inline void SetModifyUserName( bool bSet ); - void SetResult( ErrorHandlerFlags nRet ) + void SetResult( DialogMask nRet ) { m_nRet = nRet; } }; |