User: hr      
Date: 06/06/19 18:05:52

Modified:
 /dba/connectivity/source/commontools/
  dbexception.cxx

Log:
 INTEGRATION: CWS warnings01 (1.13.30); FILE MERGED
 2006/06/13 12:43:45 fs 1.13.30.4: #i66365# no initial next in the iterator
 2006/04/07 20:15:20 sb 1.13.30.3: RESYNC: (1.14-1.15); FILE MERGED
 2005/11/16 12:58:45 fs 1.13.30.2: #i57457# warning free code
 2005/11/07 14:43:00 fs 1.13.30.1: #i57457# warning-free code

File Changes:

Directory: /dba/connectivity/source/commontools/
================================================

File [changed]: dbexception.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbexception.cxx?r1=1.15&r2=1.16
Delta lines:  +47 -62
---------------------
--- dbexception.cxx     25 Jan 2006 15:00:03 -0000      1.15
+++ dbexception.cxx     20 Jun 2006 01:05:49 -0000      1.16
@@ -219,11 +219,10 @@
 
//==============================================================================
 
 
//------------------------------------------------------------------------------
-SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const SQLExceptionInfo& 
_rStart, NODES_INCLUDED _eMask)
+SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const SQLExceptionInfo& 
_rStart)
        :m_pCurrent(NULL)
        ,m_eCurrentType(SQLExceptionInfo::UNDEFINED)
                // no other chance without RTTI
-       ,m_eMask(_eMask)
 {
        if (_rStart.isValid())
        {
@@ -233,39 +232,27 @@
 }
 
 
//------------------------------------------------------------------------------
-SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdbc::SQLException* _pStart, NODES_INCLUDED _eMask)
+SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdbc::SQLException* _pStart)
                        :m_pCurrent(_pStart)
                        ,m_eCurrentType(SQLExceptionInfo::SQL_EXCEPTION)
                                // no other chance without RTTI
-                       ,m_eMask(_eMask)
 {
-       // initially check the start of the chain against the include mask
-       if (m_pCurrent && (m_eMask > NI_EXCEPTIONS))
-               next();
 }
 
 
//------------------------------------------------------------------------------
-SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdbc::SQLWarning* _pStart, NODES_INCLUDED _eMask)
+SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdbc::SQLWarning* _pStart)
                        :m_pCurrent(_pStart)
                        ,m_eCurrentType(SQLExceptionInfo::SQL_WARNING)
                                // no other chance without RTTI
-                       ,m_eMask(_eMask)
 {
-       // initially check the start of the chain against the include mask
-       if (m_pCurrent && (m_eMask > NI_WARNINGS))
-               next();
 }
 
 
//------------------------------------------------------------------------------
-SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdb::SQLContext* _pStart, NODES_INCLUDED _eMask)
+SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(const 
::com::sun::star::sdb::SQLContext* _pStart)
                        :m_pCurrent(_pStart)
                        ,m_eCurrentType(SQLExceptionInfo::SQL_CONTEXT)
                                // no other chance without RTTI
-                       ,m_eMask(_eMask)
 {
-       // initially check the start of the chain against the include mask
-       if (m_pCurrent && (m_eMask > NI_CONTEXTINFOS))
-               next();
 }
 
 
//------------------------------------------------------------------------------
@@ -298,20 +285,21 @@
        if (m_pCurrent)
        {       // check for the next element within the chain
                const staruno::Type& aSqlExceptionCompare = 
::getCppuType(reinterpret_cast< ::com::sun::star::sdbc::SQLException*>(NULL));
-               const staruno::Type& aSqlWarningCompare = 
::getCppuType(reinterpret_cast< ::com::sun::star::sdbc::SQLWarning*>(NULL));
-               const staruno::Type& aSqlContextCompare = 
::getCppuType(reinterpret_cast< ::com::sun::star::sdb::SQLContext*>(NULL));
 
                const ::com::sun::star::sdbc::SQLException* pSearch             
        = m_pCurrent;
                SQLExceptionInfo::TYPE eSearchType      = m_eCurrentType;
 
-               sal_Bool bIncludeThis = sal_False;
-               while (pSearch && !bIncludeThis)
+        do
                {
+            if ( !pSearch )
+                break;
+
                        if (!pSearch->NextException.hasValue())
                        {       // last chain element
                                pSearch = NULL;
                                break;
                        }
+
                        staruno::Type aNextElementType = 
pSearch->NextException.getValueType();
                        if (!isAssignableFrom(aSqlExceptionCompare, 
aNextElementType))
                        {
@@ -328,25 +316,22 @@
                        {
                                case SQLExceptionInfo::SQL_CONTEXT:
                                        pSearch = reinterpret_cast<const 
::com::sun::star::sdb::SQLContext*>(pSearch->NextException.getValue());
-                                       bIncludeThis = eSearchType >= 
NI_CONTEXTINFOS;
                                        break;
 
                                case SQLExceptionInfo::SQL_WARNING:
                                        pSearch = reinterpret_cast<const 
::com::sun::star::sdbc::SQLWarning*>(pSearch->NextException.getValue());
-                                       bIncludeThis = eSearchType >= 
NI_WARNINGS;
                                        break;
 
                                case SQLExceptionInfo::SQL_EXCEPTION:
                                        pSearch = reinterpret_cast<const 
::com::sun::star::sdbc::SQLException*>(pSearch->NextException.getValue());
-                                       bIncludeThis = eSearchType >= 
NI_EXCEPTIONS;
                                        break;
 
                                default:
                                        pSearch = NULL;
-                                       bIncludeThis = sal_False;
                                        break;
                        }
                }
+        while ( false );
 
                m_pCurrent = pSearch;
                m_eCurrentType = eSearchType;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to