summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/dlg/sqlmessage.cxx
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/source/ui/dlg/sqlmessage.cxx
parentconvert InternationalKeyCode to scoped enum (diff)
downloadcore-761e55d3683845606fcb94cfdf32450051b67a9d.tar.gz
core-761e55d3683845606fcb94cfdf32450051b67a9d.zip
convert SQLExceptionInfo::TYPE to scoped enum
Change-Id: I2f21a742bc649fc42f89aebac2691c6054cd20d8
Diffstat (limited to 'dbaccess/source/ui/dlg/sqlmessage.cxx')
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx26
1 files changed, 13 insertions, 13 deletions
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!" );
}
}