User: hr      
Date: 06/06/19 18:55:06

Modified:
 /dba/connectivity/source/drivers/odbc/
  ODatabaseMetaDataResultSet.cxx

Log:
 INTEGRATION: CWS warnings01 (1.32.30); FILE MERGED
 2005/12/22 11:44:56 fs 1.32.30.4: #i57457# warning-free code
 2005/11/21 10:07:55 fs 1.32.30.3: #i57457# warning-free code on unx*
 2005/11/16 12:59:20 fs 1.32.30.2: #i57457# warning free code
 2005/11/07 14:44:01 fs 1.32.30.1: #i57457# warning-free code

File Changes:

Directory: /dba/connectivity/source/drivers/odbc/
=================================================

File [changed]: ODatabaseMetaDataResultSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx?r1=1.32&r2=1.33
Delta lines:  +126 -132
-----------------------
--- ODatabaseMetaDataResultSet.cxx      8 Sep 2005 06:33:53 -0000       1.32
+++ ODatabaseMetaDataResultSet.cxx      20 Jun 2006 01:55:04 -0000      1.33
@@ -84,6 +84,9 @@
 #ifndef _CONNECTIVITY_DATABASEMETADATARESULTSETMETADATA_HXX_
 #include "FDatabaseMetaDataResultSetMetaData.hxx"
 #endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
 
 using namespace ::comphelper;
 
@@ -101,15 +104,20 @@
 ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* 
_pConnection) 
        :ODatabaseMetaDataResultSet_BASE(m_aMutex)
        ,OPropertySetHelper(ODatabaseMetaDataResultSet_BASE::rBHelper)
+
+    ,m_aStatementHandle(_pConnection->createStatementHandle())
        ,m_aStatement(NULL)
        ,m_xMetaData(NULL)
-       ,m_aStatementHandle(_pConnection->createStatementHandle())
-       ,m_bEOF(sal_False)
-       ,m_nTextEncoding(_pConnection->getTextEncoding())
-       ,m_bFreeHandle(sal_False)
+    ,m_pRowStatusArray(NULL)
        ,m_pConnection(_pConnection)
+    ,m_nTextEncoding(_pConnection->getTextEncoding())
+    ,m_nRowPos(-1)
+    ,m_nLastColumnPos(0)
        ,m_nDriverColumnCount(0)
+    ,m_nCurrentFetchState(0)
        ,m_bWasNull(sal_True)
+    ,m_bEOF(sal_False)
+       ,m_bFreeHandle(sal_False)
 {
        
OSL_ENSURE(m_pConnection,"ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet:
 No parent set!");
        osl_incrementInterlockedCount( &m_refCount );
@@ -205,13 +213,15 @@
        return i;
 }
 // -------------------------------------------------------------------------
-Reference< ::com::sun::star::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 columnIndex ) 
throw(SQLException, RuntimeException)
+Reference< ::com::sun::star::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) 
throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getBinaryStream", 
*this );
        return NULL;
 }
 // -------------------------------------------------------------------------
-Reference< ::com::sun::star::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 columnIndex ) 
throw(SQLException, RuntimeException)
+Reference< ::com::sun::star::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) 
throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getCharacterStream", 
*this );
        return NULL;
 }
 
@@ -222,7 +232,6 @@
        checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
        ::osl::MutexGuard aGuard( m_aMutex );
                
-
        columnIndex = mapColumn(columnIndex);
 
        sal_Bool bRet = sal_False;
@@ -288,7 +297,6 @@
                                        ::rtl::OUString aRet = 
OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this,m_nTextEncoding);
                                        return 
Sequence<sal_Int8>(reinterpret_cast<const 
sal_Int8*>(aRet.getStr()),sizeof(sal_Unicode)*aRet.getLength());
                                }
-                               break;
                }
                return 
OTools::getBytesValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this);
        }
@@ -383,44 +391,49 @@
 }
 // -------------------------------------------------------------------------
 
-sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 columnIndex 
) throw(SQLException, RuntimeException)
+sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 
/*columnIndex*/ ) throw(SQLException, RuntimeException)
 {
-       return sal_Int64(0);
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getLong", *this );
+    return 0;
 }
 // -------------------------------------------------------------------------
 
 Reference< XResultSetMetaData > SAL_CALL 
ODatabaseMetaDataResultSet::getMetaData(  ) throw(SQLException, 
RuntimeException)
 {
-       
        checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
        ::osl::MutexGuard aGuard( m_aMutex );
        return m_xMetaData.is() ? m_xMetaData :  (m_xMetaData = new 
OResultSetMetaData(m_pConnection,m_aStatementHandle));
 }
 // -------------------------------------------------------------------------
-Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 
columnIndex ) throw(SQLException, RuntimeException)
+Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 
/*columnIndex*/ ) throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getArray", *this );
        return NULL;
 }
 // -------------------------------------------------------------------------
-Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 
columnIndex ) throw(SQLException, RuntimeException)
+Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 
/*columnIndex*/ ) throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getClob", *this );
        return NULL;
 }
 // -------------------------------------------------------------------------
-Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 
columnIndex ) throw(SQLException, RuntimeException)
+Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 
/*columnIndex*/ ) throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getBlob", *this );
        return NULL;
 }
 // -------------------------------------------------------------------------
 
-Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 
columnIndex ) throw(SQLException, RuntimeException)
+Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 
/*columnIndex*/ ) throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getRef", *this );
        return NULL;
 }
 // -------------------------------------------------------------------------
 
-Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, 
const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) 
throw(SQLException, RuntimeException)
+Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 /*columnIndex*/, 
const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) 
throw(SQLException, RuntimeException)
 {
+    ::dbtools::throwFunctionNotSupportedException( "XRow::getObject", *this );
        return Any();
 }
 // -------------------------------------------------------------------------
@@ -431,7 +444,6 @@
        checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed);
        ::osl::MutexGuard aGuard( m_aMutex );
                
-
        columnIndex = mapColumn(columnIndex);
        sal_Int16 nVal = 0;
        if(columnIndex <= m_nDriverColumnCount)
@@ -499,7 +511,7 @@
                
OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof
 aTime);
        else
                m_bWasNull = sal_True;
-       return 
DateTime(aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
+       return 
DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
 }
 // -------------------------------------------------------------------------
 
@@ -579,8 +591,8 @@
 
        m_nCurrentFetchState = 
N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_FIRST,0);
        
OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this);
-       sal_Bool bRet;
-       if(bRet = (m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState 
== SQL_SUCCESS_WITH_INFO))
+    sal_Bool bRet = ( m_nCurrentFetchState == SQL_SUCCESS || 
m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO );
+       if( bRet )
                m_nRowPos = 1;
        return bRet;
 }
@@ -595,7 +607,7 @@
        m_nCurrentFetchState = 
N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_LAST,0);
        
OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this);
        // here I know definitely that I stand on the last record
-       return m_bLastRecord = (m_nCurrentFetchState == SQL_SUCCESS || 
m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO);
+       return (m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == 
SQL_SUCCESS_WITH_INFO);
 }
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) 
throw(SQLException, RuntimeException)
@@ -768,14 +780,6 @@
        return ::rtl::OUString();
 }
 
-//------------------------------------------------------------------------------
-void ODatabaseMetaDataResultSet::setFetchDirection(sal_Int32 _par0) 
throw(SQLException, RuntimeException) 
-{
-}
-//------------------------------------------------------------------------------
-void ODatabaseMetaDataResultSet::setFetchSize(sal_Int32 _par0) 
throw(SQLException, RuntimeException) 
-{
-}
 // -------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper* ODatabaseMetaDataResultSet::createArrayHelper( ) 
const
 {
@@ -810,7 +814,6 @@
                case PROPERTY_ID_RESULTSETCONCURRENCY:
                case PROPERTY_ID_RESULTSETTYPE:
                        throw 
::com::sun::star::lang::IllegalArgumentException();
-                       break;
                case PROPERTY_ID_FETCHDIRECTION:
                        return ::comphelper::tryPropertyValue(rConvertedValue, 
rOldValue, rValue, getFetchDirection());
                case PROPERTY_ID_FETCHSIZE:
@@ -821,11 +824,7 @@
        return sal_False;
 }
 // -------------------------------------------------------------------------
-void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast(
-                                                               sal_Int32 
nHandle,
-                                                               const Any& 
rValue
-                                                                               
                 )
-                                                                               
                 throw (Exception)
+void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 
nHandle, const Any& /*rValue*/ ) throw (Exception)
 {
        switch(nHandle)
        {
@@ -835,16 +834,12 @@
                case PROPERTY_ID_FETCHDIRECTION:
                case PROPERTY_ID_FETCHSIZE:
                        throw Exception();
-                       break;
                default:
                        OSL_ENSURE(0,"setFastPropertyValue_NoBroadcast: Illegal 
handle value!");
        }
 }
 // -------------------------------------------------------------------------
-void ODatabaseMetaDataResultSet::getFastPropertyValue(
-                                                               Any& rValue,
-                                                               sal_Int32 
nHandle
-                                                                        ) const
+void ODatabaseMetaDataResultSet::getFastPropertyValue( Any& rValue, sal_Int32 
nHandle ) const
 {
        switch(nHandle)
        {
@@ -868,7 +863,6 @@
 // -------------------------------------------------------------------------
 void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, 
RuntimeException)
 {
-
        TInt2IntMap aMap;
        aMap[SQL_BIT]                           = DataType::BIT;
        aMap[SQL_TINYINT]                       = DataType::TINYINT;




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

Reply via email to