User: hr Date: 06/06/19 19:35:10 Modified: /dba/dbaccess/source/core/api/ KeySet.cxx
Log: INTEGRATION: CWS warnings01 (1.59.74); FILE MERGED 2006/05/23 23:41:59 sb 1.59.74.2: RESYNC: (1.59-1.60); FILE MERGED 2006/03/24 15:35:45 fs 1.59.74.1: #i57457# warning-free code (unxlngi6/.pro + unxsoli4.pro) File Changes: Directory: /dba/dbaccess/source/core/api/ ========================================= File [changed]: KeySet.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/KeySet.cxx?r1=1.60&r2=1.61 Delta lines: +15 -19 --------------------- --- KeySet.cxx 4 May 2006 08:35:48 -0000 1.60 +++ KeySet.cxx 20 Jun 2006 02:35:08 -0000 1.61 @@ -150,12 +150,12 @@ OKeySet::OKeySet(const connectivity::OSQLTable& _xTable, const ::rtl::OUString& _rUpdateTableName, // this can be the alias or the full qualified name const Reference< XSingleSelectQueryAnalyzer >& _xComposer) - :m_xTable(_xTable) - ,m_bRowCountFinal(sal_False) + :m_pKeyColumnNames(NULL) + ,m_pColumnNames(NULL) + ,m_xTable(_xTable) ,m_xComposer(_xComposer) ,m_sUpdateTableName(_rUpdateTableName) - ,m_pKeyColumnNames(NULL) - ,m_pColumnNames(NULL) + ,m_bRowCountFinal(sal_False) { DBG_CTOR(OKeySet,NULL); @@ -255,7 +255,7 @@ ::comphelper::disposeComponent(xAnalyzer); } // ------------------------------------------------------------------------- -Any SAL_CALL OKeySet::getBookmark( const ORowSetRow& _rRow ) throw(SQLException, RuntimeException) +Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException) { OSL_ENSURE(m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin(), "getBookmark is only possible when we stand on a valid row!"); @@ -282,11 +282,11 @@ return !isBeforeFirst() && !isAfterLast(); } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& first, const Any& second ) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException) { sal_Int32 nFirst,nSecond; - first >>= nFirst; - second >>= nSecond; + _first >>= nFirst; + _second >>= nSecond; return (nFirst != nSecond) ? CompareBookmark::NOT_EQUAL : CompareBookmark::EQUAL; } @@ -369,8 +369,8 @@ memset(aRet.getArray(),bOk,sizeof(sal_Int32)*aRet.getLength()); if(bOk) { - const Any* pBegin = rows.getConstArray(); - const Any* pEnd = pBegin + rows.getLength(); + pBegin = rows.getConstArray(); + pEnd = pBegin + rows.getLength(); for(;pBegin != pEnd;++pBegin) { @@ -421,7 +421,6 @@ OColumnNamePos::const_iterator aIter = m_pColumnNames->begin(); for(;aIter != m_pColumnNames->end();++aIter,++i) { - sal_Bool bSigned = m_xSetMetaData->isSigned(i); if(xKeyColumns.is() && xKeyColumns->hasByName(aIter->first)) { sKeyCondition += ::dbtools::quoteName( aQuote,aIter->first); @@ -533,7 +532,6 @@ m_aKeyIter = m_aKeyMap.find(::comphelper::getINT32((*_rInsertRow)[0].getAny())); OSL_ENSURE(m_aKeyIter != m_aKeyMap.end(),"New inserted row not found!"); m_aKeyIter->second.second = 2; - copyRowValue(_rInsertRow,m_aKeyIter->second.first); } } @@ -577,7 +575,6 @@ Reference< XParameters > xParameter(xPrep,UNO_QUERY); OColumnNamePos::const_iterator aPosIter = m_pColumnNames->begin(); - sal_uInt16 k = 0; for(sal_Int32 i = 1;aPosIter != m_pColumnNames->end();++aPosIter) { sal_Int32 nPos = aPosIter->second.first; @@ -598,11 +595,11 @@ if ( m_bInserted ) { // first insert the default values into the insertrow - OColumnNamePos::const_iterator aIter = m_pColumnNames->begin(); - for(;aIter != m_pColumnNames->end();++aIter) + OColumnNamePos::const_iterator defaultIter = m_pColumnNames->begin(); + for(;defaultIter != m_pColumnNames->end();++defaultIter) { - if ( !(*_rInsertRow)[aIter->second.first].isModified() ) - (*_rInsertRow)[aIter->second.first] = aIter->second.second.second; + if ( !(*_rInsertRow)[defaultIter->second.first].isModified() ) + (*_rInsertRow)[defaultIter->second.first] = defaultIter->second.second.second; } try { @@ -692,7 +689,6 @@ if ( m_bInserted ) { ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >((*m_pKeyColumnNames).size()); - copyRowValue(_rInsertRow,aKeyRow); OKeySetMatrix::iterator aKeyIter = m_aKeyMap.end(); @@ -1034,7 +1030,7 @@ m_xSet = m_xStatement->executeQuery(); OSL_ENSURE(m_xSet.is(),"No resultset form statement!"); - sal_Bool bOK = m_xSet->next(); + sal_Bool bOK = m_xSet->next(); (void)bOK; OSL_ENSURE(bOK,"No rows!"); m_xRow.set(m_xSet,UNO_QUERY); OSL_ENSURE(m_xRow.is(),"No row form statement!"); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
