summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-25 08:04:03 +0200
committerNoel Grandin <noel@peralex.com>2016-02-25 13:50:25 +0200
commit761e55d3683845606fcb94cfdf32450051b67a9d (patch)
treed38edef369f5e16311720258fc764f3450aacdda /dbaccess
parent4dd65f861d3179538b58512a10c6c9482d85d0ee (diff)
convert SQLExceptionInfo::TYPE to scoped enum
Change-Id: I2f21a742bc649fc42f89aebac2691c6054cd20d8
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx26
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
5 files changed, 17 insertions, 17 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index ae66546c4521..e4a51b828558 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1658,7 +1658,7 @@ void ORowSet::impl_ensureStatement_throw()
try
{
OUString sInfo(DBA_RES_PARAM( RID_STR_COMMAND_LEADING_TO_ERROR, "$command$", sCommandToExecute ) );
- aError.append( SQLExceptionInfo::SQL_CONTEXT, sInfo );
+ aError.append( SQLExceptionInfo::TYPE::SQLContext, sInfo );
}
catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index bae6b8dfe07e..db8ba6a7894d 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -114,12 +114,12 @@ namespace
switch ( _eType )
{
- case SQLExceptionInfo::SQL_WARNING:
+ case SQLExceptionInfo::TYPE::SQLWarning:
ppProvider = &m_pWarningsImage;
nNormalImageID = BMP_EXCEPTION_WARNING;
break;
- case SQLExceptionInfo::SQL_CONTEXT:
+ case SQLExceptionInfo::TYPE::SQLContext:
ppProvider = &m_pInfoImage;
nNormalImageID = BMP_EXCEPTION_INFO;
break;
@@ -140,12 +140,12 @@ namespace
switch ( _eType )
{
- case SQLExceptionInfo::SQL_WARNING:
+ case SQLExceptionInfo::TYPE::SQLWarning:
ppProvider = &m_pWarningsLabel;
nLabelID = STR_EXCEPTION_WARNING;
break;
- case SQLExceptionInfo::SQL_CONTEXT:
+ case SQLExceptionInfo::TYPE::SQLContext:
ppProvider = &m_pInfoLabel;
nLabelID = _bSubLabel ? STR_EXCEPTION_DETAILS : STR_EXCEPTION_INFO;
break;
@@ -174,7 +174,7 @@ namespace
OUString sSQLState;
OUString sErrorCode;
- ExceptionDisplayInfo() : eType( SQLExceptionInfo::UNDEFINED ), bSubEntry( false ) { }
+ ExceptionDisplayInfo() : eType( SQLExceptionInfo::TYPE::Undefined ), bSubEntry( false ) { }
explicit ExceptionDisplayInfo( SQLExceptionInfo::TYPE _eType ) : eType( _eType ), bSubEntry( false ) { }
};
@@ -247,7 +247,7 @@ namespace
_out_rChain.push_back( aDisplayInfo );
- if ( aCurrentElement.getType() == SQLExceptionInfo::SQL_CONTEXT )
+ if ( aCurrentElement.getType() == SQLExceptionInfo::TYPE::SQLContext )
{
const SQLContext* pContext = static_cast<const SQLContext*>(aCurrentElement);
if ( !pContext->Details.isEmpty() )
@@ -342,8 +342,8 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
ExceptionDisplayInfo aInfo22018;
aInfo22018.sMessage = ModuleRes( STR_EXPLAN_STRINGCONVERSION_ERROR );
- aInfo22018.pLabelProvider = aProviderFactory.getLabelProvider( SQLExceptionInfo::SQL_CONTEXT, false );
- aInfo22018.pImageProvider = aProviderFactory.getImageProvider( SQLExceptionInfo::SQL_CONTEXT );
+ aInfo22018.pLabelProvider = aProviderFactory.getLabelProvider( SQLExceptionInfo::TYPE::SQLContext, false );
+ aInfo22018.pImageProvider = aProviderFactory.getImageProvider( SQLExceptionInfo::TYPE::SQLContext );
m_aExceptions.push_back( aInfo22018 );
lcl_insertExceptionEntry( *m_pExceptionList, m_aExceptions.size() - 1, aInfo22018 );
@@ -449,8 +449,8 @@ void OSQLMessageBox::impl_positionControls()
// element denotes its sub entry
// - the first and the second element are both independent (i.e. the second
// is no sub entry), and none of them is a context.
- bool bFirstElementIsContext = ( rFirstInfo.eType == SQLExceptionInfo::SQL_CONTEXT );
- bool bSecondElementIsContext = ( pSecondInfo->eType == SQLExceptionInfo::SQL_CONTEXT );
+ bool bFirstElementIsContext = ( rFirstInfo.eType == SQLExceptionInfo::TYPE::SQLContext );
+ bool bSecondElementIsContext = ( pSecondInfo->eType == SQLExceptionInfo::TYPE::SQLContext );
if ( bFirstElementIsContext && pSecondInfo->bSubEntry )
sSecondary = pSecondInfo->sMessage;
@@ -638,9 +638,9 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
{
switch ( m_pImpl->aDisplayInfo[0].eType )
{
- case SQLExceptionInfo::SQL_EXCEPTION: eType = Error; break;
- case SQLExceptionInfo::SQL_WARNING: eType = Warning; break;
- case SQLExceptionInfo::SQL_CONTEXT: eType = Info; break;
+ case SQLExceptionInfo::TYPE::SQLException: eType = Error; break;
+ case SQLExceptionInfo::TYPE::SQLWarning: eType = Warning; break;
+ case SQLExceptionInfo::TYPE::SQLContext: eType = Info; break;
default: OSL_FAIL( "OSQLMessageBox::Construct: invalid type!" );
}
}
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 1c4b3c596f43..b9780c6dbb68 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -262,7 +262,7 @@ void ODatabaseImportExport::initialize()
SQLExceptionInfo aInfo = ::dbaui::createConnection( m_sDataSourceName, xDatabaseContext, m_xContext, xEvt, xConnection );
m_xConnection.reset( xConnection );
- if(aInfo.isValid() && aInfo.getType() == SQLExceptionInfo::SQL_EXCEPTION)
+ if(aInfo.isValid() && aInfo.getType() == SQLExceptionInfo::TYPE::SQLException)
throw *static_cast<const SQLException*>(aInfo);
}
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index e3fffb1ffb54..f764dcf3486e 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -176,7 +176,7 @@ bool OCopyTable::LeavePage()
SQLExceptionInfo aErrorInfo;
if ( !aNameCheck.isNameValid( m_pEdTableName->GetText(), aErrorInfo ) )
{
- aErrorInfo.append( SQLExceptionInfo::SQL_CONTEXT, ModuleRes( STR_SUGGEST_APPEND_TABLE_DATA ) );
+ aErrorInfo.append( SQLExceptionInfo::TYPE::SQLContext, ModuleRes( STR_SUGGEST_APPEND_TABLE_DATA ) );
m_pParent->showError(aErrorInfo.get());
return false;
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 70154bbfcf18..03c6e0235467 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -375,7 +375,7 @@ namespace dbaui
void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
const sal_Int32 _nErrorCode )
{
- m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLState( _eSQLState ),
+ m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::TYPE::SQLException, _rErrorMessage, getStandardSQLState( _eSQLState ),
_nErrorCode );
}
void DBSubComponentController::clearError()