Tag: cws_src680_dba204b
User: fs      
Date: 2006/07/13 00:10:56

Modified:
   dba/dbaccess/source/core/api/RowSetCache.cxx

Log:
 RESYNC: (1.85-1.86); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: RowSetCache.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.85.8.1&r2=1.85.8.2
Delta lines:  +20 -18
---------------------
--- RowSetCache.cxx     10 Jul 2006 07:59:46 -0000      1.85.8.1
+++ RowSetCache.cxx     13 Jul 2006 07:10:53 -0000      1.85.8.2
@@ -229,7 +229,7 @@
                                                        {
                                                                
Reference<XNameAccess> xSelColumns = xColSup->getColumns();
                                                                
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
-                                                               OColumnNamePos 
aColumnNames(xMeta.is() && xMeta->storesMixedCaseQuotedIdentifiers() ? true : 
false);
+                                                               
SelectColumnsMetaData aColumnNames(xMeta.is() && 
xMeta->storesMixedCaseQuotedIdentifiers() ? true : false);
                                                                
::dbaccess::getColumnPositions(xSelColumns,xColumns,aUpdateTableName,aColumnNames);
                                                                bAllKeysFound = 
!aColumnNames.empty() && sal_Int32(aColumnNames.size()) == 
xColumns->getElementNames().getLength();
                                                        }
@@ -296,7 +296,7 @@
                else
                {
                        Reference<XDatabaseMetaData> xMeta = 
xConnection->getMetaData();
-                       OColumnNamePos aColumnNames(xMeta.is() && 
xMeta->storesMixedCaseQuotedIdentifiers() ? true : false);
+                       SelectColumnsMetaData aColumnNames(xMeta.is() && 
xMeta->storesMixedCaseQuotedIdentifiers() ? true : false);
                        Reference<XColumnsSupplier> 
xColSup(_xAnalyzer,UNO_QUERY);
                        Reference<XNameAccess> xSelColumns      = 
xColSup->getColumns();
                        Reference<XNameAccess> xColumns         = 
m_aUpdateTable->getColumns();
@@ -420,7 +420,8 @@
                        if ( !aCacheIter->second.pRowSet->isInsertRow() 
                                /*&& aCacheIter->second.aIterator != 
m_pMatrix->end()*/ && !m_bModified )
                        {
-                               
aPositions.push_back(aCacheIter->second.aIterator - m_pMatrix->begin());
+                               ptrdiff_t nDist = (aCacheIter->second.aIterator 
- m_pMatrix->begin());
+                               aPositions.push_back(nDist);
                                aCacheIterToChange[aCacheIter->first] = 
sal_True;
                        }
                }
@@ -518,7 +519,7 @@
 // -------------------------------------------------------------------------
 sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 
rows )
 {
-       sal_Bool bRet = moveToBookmark(bookmark);
+       sal_Bool bRet( moveToBookmark( bookmark ) );
        if ( bRet )
        {
                m_nPosition = m_pCacheSet->getRow() + rows;
@@ -811,15 +812,15 @@
                                
::std::rotate(m_pMatrix->begin(),aEnd,m_pMatrix->end());
                                // now correct the iterator in our iterator 
vector
                                //      
rotateCacheIterator(aEnd-m_pMatrix->begin()); //can't be used because they 
decrement and here we need to increment
-                               ORowSetMatrix::difference_type nNewDist = aEnd 
- m_pMatrix->begin();
-                               ORowSetMatrix::difference_type nOffSet = 
m_pMatrix->end() - aEnd;
+                               ptrdiff_t nNewDist = aEnd - m_pMatrix->begin();
+                               ptrdiff_t nOffSet = m_pMatrix->end() - aEnd;
                                ORowSetCacheMap::iterator aCacheIter = 
m_aCacheIterators.begin();
                                for(;aCacheIter != 
m_aCacheIterators.end();++aCacheIter)
                                {
                                        if ( 
!aCacheIter->second.pRowSet->isInsertRow() 
                                                && aCacheIter->second.aIterator 
!= m_pMatrix->end() && !m_bModified )
                                        {
-                                               ORowSetMatrix::difference_type 
nDist = (aCacheIter->second.aIterator - m_pMatrix->begin());
+                                               ptrdiff_t nDist = 
(aCacheIter->second.aIterator - m_pMatrix->begin());
                                                if ( nDist >= nNewDist )
                                                {
                                                        
aCacheIter->second.aIterator = m_pMatrix->end();
@@ -884,16 +885,16 @@
                        m_aMatrixIter = calcPosition();
                        if(!m_aMatrixIter->isValid())
                        {
-                               sal_Bool bOk = 
m_pCacheSet->absolute(m_nPosition);
+                               sal_Bool bOk( m_pCacheSet->absolute( 
m_nPosition ) );
                                if ( bOk )
                                {
                                        *m_aMatrixIter = new 
ORowSetValueVector(m_xMetaData->getColumnCount());
                                        
m_pCacheSet->fillValueRow(*m_aMatrixIter,m_nPosition);
                                        // we have to read one row forward to 
enshure that we know when we are on last row
                                        // but only when we don't know it 
already
-                                       if(!m_bRowCountFinal ) 
+                                       if ( !m_bRowCountFinal )
                     {
-                        bOk = m_pCacheSet->absolute(m_nPosition+1);
+                        bOk = m_pCacheSet->absolute( m_nPosition + 1 );
                         if ( bOk )
                                                m_nRowCount = 
std::max(sal_Int32(m_nPosition+1),m_nRowCount);
                     }
@@ -934,7 +935,7 @@
                        {       // rotate the end to the front
                                
::std::rotate(m_pMatrix->begin(),aIter,m_pMatrix->end());
                                // now correct the iterator in our iterator 
vector
-                               rotateCacheIterator(aIter - m_pMatrix->begin());
+                               rotateCacheIterator( (sal_Int16)( aIter - 
m_pMatrix->begin() ) );
                                m_nStartPos = nNewStartPos - 1; // must be -1
                                // now I can say how many rows we have
                                if(!bOk)
@@ -953,7 +954,7 @@
                                //      m_nStartPos = (aIter - 
m_pMatrix->begin());
                                
::std::rotate(m_pMatrix->begin(),aIter,m_pMatrix->end());
                                // now correct the iterator in our iterator 
vector
-                               rotateCacheIterator(aIter - m_pMatrix->begin());
+                               rotateCacheIterator( (sal_Int16)( aIter - 
m_pMatrix->begin() ) );
 
                                if ( !m_bRowCountFinal )
                                {
@@ -1208,7 +1209,8 @@
                throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_MOVETOINSERTROW_CALLED),NULL,SQLSTATE_GENERAL,1000,Any()
 );
 
        m_pCacheSet->insertRow(*m_aInsertRow,m_aUpdateTable);
-    sal_Bool bRet = rowInserted();
+
+       sal_Bool bRet( rowInserted() );
        if ( bRet )
        {
                ++m_nRowCount;
@@ -1353,7 +1355,7 @@
                        if ( !aCacheIter->second.pRowSet->isInsertRow()
                                && aCacheIter->second.aIterator != 
m_pMatrix->end() && !m_bModified )
                        {
-                               ORowSetMatrix::difference_type nDist = 
(aCacheIter->second.aIterator - m_pMatrix->begin());
+                               ptrdiff_t nDist = (aCacheIter->second.aIterator 
- m_pMatrix->begin());
                                if(nDist < _nDist)
                                {
                                        aCacheIter->second.aIterator = 
m_pMatrix->end();




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

Reply via email to