summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-07 11:26:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-07 12:04:35 +0000
commit05e78bde26d8b8b257ed22a0ce20c5b386a629d1 (patch)
treebbcbccae5942edaf4557018cdb82b1b147f1d9cf /basic
parent7edbe6529825f562e2eab0b7c19c8c0883ea4fea (diff)
create ErrorHandlerFlags scoped enum for error handling flags
Change-Id: I30c80979c87bad7bc98f36a158c31c88d80d1caf Reviewed-on: https://gerrit.libreoffice.org/33991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx18
2 files changed, 10 insertions, 10 deletions
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 286a9c4f5d25..2a75286779d6 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 is 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->GetErrorCode(), 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->GetErrorCode(), 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->GetErrorCode(), 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->GetErrorCode(), BasicErrorReason::OPENLIBSTORAGE));
}
else
@@ -916,7 +916,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
tools::SvRef<SotStorageStream> 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->GetErrorCode(), 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->GetErrorCode(), 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->GetErrorCode(), 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->GetErrorCode(), 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->GetErrorCode(), BasicErrorReason::LIBNOTFOUND));
}
return bDone;