From bcad173faaffd3a3c1e6737d94d2108cf590338d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 Feb 2017 11:12:00 +0200 Subject: Reapply "create ErrorHandlerFlags scoped enum for error handling flags"" This effectively reverts commit 32cae6a2eaa41568888df9c8fc5605debd8d704a. Change-Id: I15bb0a5c4acaeee6d47dd93a71601d9687d701bc Reviewed-on: https://gerrit.libreoffice.org/34028 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/basmgr/basicmanagerrepository.cxx | 2 +- basic/source/basmgr/basmgr.cxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'basic') diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index f7bff18bfc2f..500f31489e7b 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -441,7 +441,7 @@ namespace basic for(const auto& rError : aErrors) { // show message to user - if ( ERRCODE_BUTTON_CANCEL == ErrorHandler::HandleError( rError.GetErrorId() ) ) + if ( ErrorHandlerFlags::ButtonsCancel == ErrorHandler::HandleError( rError.GetErrorId() ) ) { // user wants to break loading of BASIC-manager delete _out_rpBasicManager; diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 9b0c92a850fc..c6225a615523 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -636,7 +636,7 @@ void BasicManager::ImpMgrNotLoaded( const OUString& rStorageName ) { // pErrInf is only destroyed if the error os processed by an // ErrorHandler - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, rStorageName, ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, rStorageName, ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENMGRSTREAM)); // Create a stdlib otherwise we crash! @@ -776,7 +776,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) xManagerStream->Seek( nBasicStartOff ); if (!ImplLoadBasic( *xManagerStream, mpImpl->aLibs.front()->GetLibRef() )) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, aStorName, ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, aStorName, ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENMGRSTREAM)); // and it proceeds ... } @@ -824,7 +824,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) } else { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, aStorName, ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, aStorName, ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::STORAGENOTFOUND)); } } @@ -907,7 +907,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora if ( !xBasicStorage.is() || xBasicStorage->GetError() ) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, xStorage->GetName(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, xStorage->GetName(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENLIBSTORAGE)); } else @@ -916,7 +916,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora tools::SvRef xBasicStream = xBasicStorage->OpenSotStream( pLibInfo->GetLibName(), eStreamReadMode ); if ( !xBasicStream.is() || xBasicStream->GetError() ) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD , pLibInfo->GetLibName(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD , pLibInfo->GetLibName(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENLIBSTREAM)); } else @@ -939,7 +939,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora } if ( !bLoaded ) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, pLibInfo->GetLibName(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, pLibInfo->GetLibName(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::BASICLOADERROR)); } else @@ -1123,7 +1123,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) if( !nLib || nLib < mpImpl->aLibs.size() ) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::STDLIB)); return false; } @@ -1159,7 +1159,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) if ( !xBasicStorage.is() || xBasicStorage->GetError() ) { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENLIBSTORAGE)); } else if (xBasicStorage->IsStream((*itLibInfo)->GetLibName())) @@ -1294,7 +1294,7 @@ bool BasicManager::LoadLib( sal_uInt16 nLib ) } else { - StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, OUString(), ERRCODE_BUTTON_OK ); + StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, OUString(), ErrorHandlerFlags::ButtonsOk ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::LIBNOTFOUND)); } return bDone; -- cgit