diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-12-30 13:32:01 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-12-30 13:32:01 +0000 |
commit | 2c579a73a7ca9891e044baca8e73608f19c2376d (patch) | |
tree | 6b1aa78d7ac696b7f1c6f46d0d56d62ac5ade699 /connectivity/source/drivers/file | |
parent | a6b0328bb9a677197a377ced03f57f2625009372 (diff) |
CWS-TOOLING: integrate CWS sb102
2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work
2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT
2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer
2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms
2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC
2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab
2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME
2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath)
2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory)
2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X
2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS
2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file
2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut
2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories
2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does
2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all)
2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning
2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often
2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564
2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers
2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np)
2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE
2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
Diffstat (limited to 'connectivity/source/drivers/file')
-rw-r--r-- | connectivity/source/drivers/file/FDriver.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FNoException.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FPreparedStatement.cxx | 58 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FResultSet.cxx | 160 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FResultSetMetaData.cxx | 24 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FStatement.cxx | 44 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fanalyzer.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 12 | ||||
-rw-r--r-- | connectivity/source/drivers/file/makefile.mk | 3 |
9 files changed, 160 insertions, 157 deletions
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 709dbe481d..af6c674735 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -245,9 +245,9 @@ void OOperandParam::describe(const Reference< XPropertySet>& rColumn, ::vos::ORe { // den alten namen beibehalten - OSL_ENSURE(getRowPos() < rParameterColumns->size(),"Invalid index for orderkey values!"); + OSL_ENSURE(getRowPos() < rParameterColumns->get().size(),"Invalid index for orderkey values!"); - Reference< XPropertySet> xColumn = (*rParameterColumns)[getRowPos()]; + Reference< XPropertySet> xColumn = (rParameterColumns->get())[getRowPos()]; try { diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx index 35726a83c8..86e2371b0c 100644 --- a/connectivity/source/drivers/file/FNoException.cxx +++ b/connectivity/source/drivers/file/FNoException.cxx @@ -118,15 +118,15 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< // ----------------------------------------------------------------------------- OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) { - UINT32 nBookmarkValue = Abs((sal_Int32)(*_rRow)[0]->getValue()); + UINT32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue()); OKeyValue* pKeyValue = OKeyValue::createKeyValue((UINT32)nBookmarkValue); ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin(); for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter) { - OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->size()),"Invalid index for orderkey values!"); - pKeyValue->pushKey(new ORowSetValueDecorator((*_rRow)[*aIter]->getValue())); + OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!"); + pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[*aIter]->getValue())); } return pKeyValue; diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index f1cf7408fe..09adbf8cd4 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -99,7 +99,7 @@ void OPreparedStatement::disposing() m_xMetaData = NULL; if(m_aParameterRow.isValid()) { - m_aParameterRow->clear(); + m_aParameterRow->get().clear(); m_aParameterRow = NULL; } @@ -111,7 +111,7 @@ void OPreparedStatement::construct(const ::rtl::OUString& sql) throw(SQLExcepti OStatement_Base::construct(sql); m_aParameterRow = new OValueRefVector(); - m_aParameterRow->push_back(new ORowSetValueDecorator(sal_Int32(0)) ); + m_aParameterRow->get().push_back(new ORowSetValueDecorator(sal_Int32(0)) ); Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY); @@ -280,9 +280,9 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 / checkAndResizeParameters(parameterIndex); if ( m_aAssignValues.isValid() ) - (*m_aAssignValues)[m_aParameterIndexes[parameterIndex]]->setNull(); + (m_aAssignValues->get())[m_aParameterIndexes[parameterIndex]]->setNull(); else - (*m_aParameterRow)[parameterIndex]->setNull(); + (m_aParameterRow->get())[parameterIndex]->setNull(); } // ------------------------------------------------------------------------- @@ -376,8 +376,8 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - m_aParameterRow->clear(); - m_aParameterRow->push_back(new ORowSetValueDecorator(sal_Int32(0)) ); + m_aParameterRow->get().clear(); + m_aParameterRow->get().push_back(new ORowSetValueDecorator(sal_Int32(0)) ); } // ------------------------------------------------------------------------- OResultSet* OPreparedStatement::createResultSet() @@ -391,8 +391,8 @@ Reference<XResultSet> OPreparedStatement::initResultSet() Reference<XResultSet> xRs(m_pResultSet); // check if we got enough paramters - if ( (m_aParameterRow.isValid() && ( m_aParameterRow->size() -1 ) < m_xParamColumns->size()) || - (m_xParamColumns.isValid() && !m_aParameterRow.isValid() && !m_aParameterRow->empty()) ) + if ( (m_aParameterRow.isValid() && ( m_aParameterRow->get().size() -1 ) < m_xParamColumns->get().size()) || + (m_xParamColumns.isValid() && !m_aParameterRow.isValid() && !m_aParameterRow->get().empty()) ) m_pConnection->throwGenericSQLException(STR_INVALID_PARA_COUNT,*this); m_pResultSet->OpenImpl(); @@ -416,14 +416,14 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) ::connectivity::checkDisposed(OStatement_BASE::rBHelper.bDisposed); if ( m_aAssignValues.isValid() && (parameterIndex < 1 || parameterIndex >= static_cast<sal_Int32>(m_aParameterIndexes.size())) ) throwInvalidIndexException(*this); - else if ( static_cast<sal_Int32>((*m_aParameterRow).size()) <= parameterIndex ) + else if ( static_cast<sal_Int32>((m_aParameterRow->get()).size()) <= parameterIndex ) { - sal_Int32 i = m_aParameterRow->size(); - (*m_aParameterRow).resize(parameterIndex+1); + sal_Int32 i = m_aParameterRow->get().size(); + (m_aParameterRow->get()).resize(parameterIndex+1); for ( ;i <= parameterIndex+1; ++i ) { - if ( !(*m_aParameterRow)[i].isValid() ) - (*m_aParameterRow)[i] = new ORowSetValueDecorator; + if ( !(m_aParameterRow->get())[i].isValid() ) + (m_aParameterRow->get())[i] = new ORowSetValueDecorator; } } } @@ -434,9 +434,9 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal checkAndResizeParameters(parameterIndex); if(m_aAssignValues.isValid()) - *(*m_aAssignValues)[m_aParameterIndexes[parameterIndex]] = x; + *(m_aAssignValues->get())[m_aParameterIndexes[parameterIndex]] = x; else - *((*m_aParameterRow)[parameterIndex]) = x; + *((m_aParameterRow->get())[parameterIndex]) = x; } // ----------------------------------------------------------------------------- UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) @@ -478,8 +478,8 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere ,sal_False ,sal_False ,m_aSQLIterator.isCaseSensitive()); - m_xParamColumns->push_back(xParaColumn); - return m_xParamColumns->size(); + m_xParamColumns->get().push_back(xParaColumn); + return m_xParamColumns->get().size(); } // ----------------------------------------------------------------------------- void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) @@ -529,13 +529,13 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult) m_pResultSet->setParameterRow(m_aParameterRow); // Parameter substituieren (AssignValues und Kriterien): - if (!m_xParamColumns->empty()) + if (!m_xParamColumns->get().empty()) { // Zunaechst AssignValues USHORT nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an // Nach zu substituierenden Parametern suchen: - size_t nCount = m_aAssignValues.isValid() ? m_aAssignValues->size() : 1; // 1 ist wichtig fuer die Kriterien + size_t nCount = m_aAssignValues.isValid() ? m_aAssignValues->get().size() : 1; // 1 ist wichtig fuer die Kriterien for (size_t j = 1; j < nCount; j++) { UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j); @@ -548,19 +548,19 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult) // (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter]; } - if (m_aParameterRow.isValid() && (m_xParamColumns->size()+1) != m_aParameterRow->size() ) + if (m_aParameterRow.isValid() && (m_xParamColumns->get().size()+1) != m_aParameterRow->get().size() ) { - sal_Int32 i = m_aParameterRow->size(); - sal_Int32 nParamColumns = m_xParamColumns->size()+1; - m_aParameterRow->resize(nParamColumns); + sal_Int32 i = m_aParameterRow->get().size(); + sal_Int32 nParamColumns = m_xParamColumns->get().size()+1; + m_aParameterRow->get().resize(nParamColumns); for ( ;i < nParamColumns; ++i ) { - if ( !(*m_aParameterRow)[i].isValid() ) - (*m_aParameterRow)[i] = new ORowSetValueDecorator; + if ( !(m_aParameterRow->get())[i].isValid() ) + (m_aParameterRow->get())[i] = new ORowSetValueDecorator; } //m_aParameterRow->resize(m_xParamColumns->size()+1); } - if (m_aParameterRow.isValid() && nParaCount < m_aParameterRow->size() ) + if (m_aParameterRow.isValid() && nParaCount < m_aParameterRow->get().size() ) { m_pSQLAnalyzer->bindParameterRow(m_aParameterRow); @@ -575,9 +575,9 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN sal_Int32 nParameter = -1; if(m_xParamColumns.isValid()) { - OSQLColumns::const_iterator aIter = find(m_xParamColumns->begin(),m_xParamColumns->end(),_sColumnName,::comphelper::UStringMixEqual(m_pTable->isCaseSensitive())); - if(aIter != m_xParamColumns->end()) - nParameter = m_xParamColumns->size() - (m_xParamColumns->end() - aIter) + 1;// +1 because the rows start at 1 + OSQLColumns::Vector::const_iterator aIter = find(m_xParamColumns->get().begin(),m_xParamColumns->get().end(),_sColumnName,::comphelper::UStringMixEqual(m_pTable->isCaseSensitive())); + if(aIter != m_xParamColumns->get().end()) + nParameter = m_xParamColumns->get().size() - (m_xParamColumns->get().end() - aIter) + 1;// +1 because the rows start at 1 } if(nParameter == -1) nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol); diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 531e02fb1b..ba0c2d7cf1 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -184,7 +184,7 @@ void OResultSet::clear() DELETEZ(m_pSortIndex); if(m_aInsertRow.isValid()) - m_aInsertRow->clear(); + m_aInsertRow->get().clear(); m_aSkipDeletedSet.clear(); } @@ -232,15 +232,15 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 columnIndex ) throw(::com::su checkIndex(columnIndex ); - m_bWasNull = (*m_aSelectRow)[columnIndex]->getValue().isNull(); - return *(*m_aSelectRow)[columnIndex]; + m_bWasNull = (m_aSelectRow->get())[columnIndex]->getValue().isNull(); + return *(m_aSelectRow->get())[columnIndex]; } // ----------------------------------------------------------------------------- void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { if ( columnIndex <= 0 // || columnIndex > (sal_Int32)m_xColumns->size() - || columnIndex >= (sal_Int32)m_aSelectRow->size() ) + || columnIndex >= (sal_Int32)m_aSelectRow->get().size() ) ::dbtools::throwInvalidIndexException(*this); } // ------------------------------------------------------------------------- @@ -304,7 +304,7 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) OSL_ENSURE((m_bShowDeleted || !m_aRow->isDeleted()),"getRow called for deleted row"); - return m_aSkipDeletedSet.getMappedPosition((*m_aRow)[0]->getValue()); + return m_aSkipDeletedSet.getMappedPosition((m_aRow->get())[0]->getValue()); } // ------------------------------------------------------------------------- @@ -382,7 +382,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_nRowPos == sal_Int32(m_pFileSet->size()); + return m_nRowPos == sal_Int32(m_pFileSet->get().size()); } // ------------------------------------------------------------------------- sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) @@ -400,7 +400,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_nRowPos == sal_Int32(m_pFileSet->size() - 1); + return m_nRowPos == sal_Int32(m_pFileSet->get().size() - 1); } // ------------------------------------------------------------------------- void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) @@ -592,12 +592,12 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), TRUE,m_xColsIdx); if(m_bRowInserted && m_pFileSet.isValid()) { - sal_Int32 nPos = (*m_aInsertRow)[0]->getValue(); - m_pFileSet->push_back(nPos); - *(*m_aInsertRow)[0] = sal_Int32(m_pFileSet->size()); + sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue(); + m_pFileSet->get().push_back(nPos); + *(m_aInsertRow->get())[0] = sal_Int32(m_pFileSet->get().size()); clearInsertRow(); - m_aSkipDeletedSet.insertNewPosition((*m_aRow)[0]->getValue()); + m_aSkipDeletedSet.insertNewPosition((m_aRow->get())[0]->getValue()); } } // ------------------------------------------------------------------------- @@ -610,7 +610,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) lcl_throwError(STR_TABLE_READONLY,*this); m_bRowUpdated = m_pTable->UpdateRow(m_aInsertRow.getBody(), m_aRow,m_xColsIdx); - *(*m_aInsertRow)[0] = (sal_Int32)(*m_aRow)[0]->getValue(); + *(m_aInsertRow->get())[0] = (sal_Int32)(m_aRow->get())[0]->getValue(); clearInsertRow(); } @@ -628,7 +628,7 @@ void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException) if(m_aRow->isDeleted()) lcl_throwError(STR_ROW_ALREADY_DELETED,*this); - sal_Int32 nPos = (sal_Int32)(*m_aRow)[0]->getValue(); + sal_Int32 nPos = (sal_Int32)(m_aRow->get())[0]->getValue(); m_bRowDeleted = m_pTable->DeleteRow(m_xColumns.getBody()); if(m_bRowDeleted && m_pFileSet.isValid()) { @@ -651,8 +651,8 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeExcept if(m_aInsertRow.isValid()) { - OValueRefVector::iterator aIter = m_aInsertRow->begin()+1; - for(;aIter != m_aInsertRow->end();++aIter) + OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1; + for(;aIter != m_aInsertRow->get().end();++aIter) { (*aIter)->setBound(sal_False); (*aIter)->setNull(); @@ -671,8 +671,8 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti m_bInserted = sal_True; - OValueRefVector::iterator aIter = m_aInsertRow->begin()+1; - for(;aIter != m_aInsertRow->end();++aIter) + OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1; + for(;aIter != m_aInsertRow->get().end();++aIter) { (*aIter)->setBound(sal_False); (*aIter)->setNull(); @@ -692,8 +692,8 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw checkIndex(columnIndex ); columnIndex = mapColumn(columnIndex); - (*m_aInsertRow)[columnIndex]->setBound(sal_True); - *(*m_aInsertRow)[columnIndex] = x; + (m_aInsertRow->get())[columnIndex]->setBound(sal_True); + *(m_aInsertRow->get())[columnIndex] = x; } // ----------------------------------------------------------------------------- @@ -916,8 +916,8 @@ again: else if (m_pFileSet.isValid()) { // OSL_ENSURE(!m_pFileSet->IsFrozen() , "Falsche CursorPosition!"); - sal_uInt32 nBookmarkValue = Abs((sal_Int32)(*m_aEvaluateRow)[0]->getValue()); - m_pFileSet->push_back(nBookmarkValue); + sal_uInt32 nBookmarkValue = Abs((sal_Int32)(m_aEvaluateRow->get())[0]->getValue()); + m_pFileSet->get().push_back(nBookmarkValue); } } else if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_UPDATE) @@ -971,7 +971,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData); // now set the bookmark for outside this is the logical pos and not the file pos - *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1); + *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); } else { @@ -989,7 +989,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, break; case IResultSetHelper::LAST: // OSL_ENSURE(IsRowCountFinal(), "Fehler im Keyset!"); // muss eingefroren sein, sonst Fehler beim SQLCursor - m_nRowPos = m_pFileSet->size() - 1; + m_nRowPos = m_pFileSet->get().size() - 1; break; case IResultSetHelper::RELATIVE: m_nRowPos += nOffset; @@ -1006,20 +1006,20 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, // Der FileCursor ist ausserhalb des gueltigen Bereichs, wenn // a.) m_nRowPos < 1 // b.) Ein KeySet besteht und m_nRowPos > m_pFileSet->size() - if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->size() )) // && m_pFileSet->IsFrozen() + if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen() { // aStatus.Set(SQL_STAT_NO_DATA_FOUND); goto Error; } else { - if (m_nRowPos < (INT32)m_pFileSet->size()) + if (m_nRowPos < (INT32)m_pFileSet->get().size()) { // Fetch ueber Index - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_pFileSet)[m_nRowPos],FALSE,bRetrieveData); + ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],FALSE,bRetrieveData); // now set the bookmark for outside - *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1); + *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); if ( (bRetrieveData || m_pSQLAnalyzer->hasRestriction()) && m_pSQLAnalyzer->hasFunctions() ) { m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); @@ -1028,15 +1028,15 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, else // Index muss weiter aufgebaut werden { // Zunaechst auf die letzte bekannte Zeile setzen - if (!m_pFileSet->empty()) + if (!m_pFileSet->get().empty()) { - m_aFileSetIter = m_pFileSet->end()-1; + m_aFileSetIter = m_pFileSet->get().end()-1; // m_pFileSet->SeekPos(m_pFileSet->size()-1); m_pTable->seekRow(IResultSetHelper::BOOKMARK, *m_aFileSetIter, m_nFilePos); } sal_Bool bOK = sal_True; // Ermitteln der Anzahl weiterer Fetches - while (bOK && m_nRowPos >= (INT32)m_pFileSet->size()) + while (bOK && m_nRowPos >= (INT32)m_pFileSet->get().size()) { if (m_pEvaluationKeySet) { @@ -1064,7 +1064,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, m_pTable->fetchRow(m_aRow, m_pTable->getTableColumns().getBody(), sal_True,bRetrieveData); // now set the bookmark for outside - *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1); + *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); if ( (bRetrieveData || m_pSQLAnalyzer->hasRestriction()) && m_pSQLAnalyzer->hasFunctions() ) { @@ -1115,12 +1115,12 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, { // COUNT(*) in Ergebnisrow packen // (muss die erste und einzige Variable in der Row sein) - if (m_aRow->size() >= 2) + if (m_aRow->get().size() >= 2) { - *(*m_aRow)[1] = m_nRowCountResult; - *(*m_aRow)[0] = sal_Int32(1); - (*m_aRow)[1]->setBound(sal_True); - (*m_aSelectRow)[1] = (*m_aRow)[1]; + *(m_aRow->get())[1] = m_nRowCountResult; + *(m_aRow->get())[0] = sal_Int32(1); + (m_aRow->get())[1]->setBound(sal_True); + (m_aSelectRow->get())[1] = (m_aRow->get())[1]; } } else @@ -1154,7 +1154,7 @@ Error: case IResultSetHelper::ABSOLUTE: case IResultSetHelper::RELATIVE: if (nOffset > 0) - m_nRowPos = m_pFileSet.isValid() ? (sal_Int32)m_pFileSet->size() : -1; + m_nRowPos = m_pFileSet.isValid() ? (sal_Int32)m_pFileSet->get().size() : -1; else if (nOffset < 0) m_nRowPos = -1; break; @@ -1207,8 +1207,8 @@ void OResultSet::sortRows() ::std::vector<sal_Int32>::iterator aOrderByIter = m_aOrderbyColumnNumber.begin(); for (::std::vector<sal_Int16>::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i) { - OSL_ENSURE((sal_Int32)m_aRow->size() > *aOrderByIter,"Invalid Index"); - switch ((*(m_aRow->begin()+*aOrderByIter))->getValue().getTypeKind()) + OSL_ENSURE((sal_Int32)m_aRow->get().size() > *aOrderByIter,"Invalid Index"); + switch ((*(m_aRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) { case DataType::CHAR: case DataType::VARCHAR: @@ -1236,7 +1236,7 @@ void OResultSet::sortRows() OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert"); break; } - (*m_aEvaluateRow)[*aOrderByIter]->setBound(sal_True); + (m_aEvaluateRow->get())[*aOrderByIter]->setBound(sal_True); } m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending); @@ -1324,7 +1324,7 @@ BOOL OResultSet::OpenImpl() { if(isCount()) { - if(m_xColumns->size() > 1) + if(m_xColumns->get().size() > 1) lcl_throwError(STR_QUERY_COMPLEX_COUNT,*this); m_nRowCountResult = 0; @@ -1402,24 +1402,24 @@ BOOL OResultSet::OpenImpl() // abgelegt werden! { if(m_pTable->getCurrentLastPos() > 0) - m_pFileSet->reserve(m_pTable->getCurrentLastPos() ); + m_pFileSet->get().reserve(m_pTable->getCurrentLastPos() ); for (sal_Int32 i = 0; i < m_pTable->getCurrentLastPos(); i++) - m_pFileSet->push_back(i + 1); + m_pFileSet->get().push_back(i + 1); } } OSL_ENSURE(m_pFileSet.isValid(),"Kein KeySet vorhanden! :-("); if(bDistinct && m_pFileSet.isValid()) // sicher ist sicher { - OValueRow aSearchRow = new OValueVector(m_aRow->size()); - OValueRefVector::iterator aRowIter = m_aRow->begin(); - OValueVector::iterator aSearchIter = aSearchRow->begin(); + OValueRow aSearchRow = new OValueVector(m_aRow->get().size()); + OValueRefVector::Vector::iterator aRowIter = m_aRow->get().begin(); + OValueVector::Vector::iterator aSearchIter = aSearchRow->get().begin(); for ( ++aRowIter,++aSearchIter; // the first column is the bookmark column - aRowIter != m_aRow->end(); + aRowIter != m_aRow->get().end(); ++aRowIter,++aSearchIter) - aSearchIter->setBound((*aRowIter)->isBound()); + aSearchIter->setBound((*aRowIter)->isBound()); - size_t nMaxRow = m_pFileSet->size(); + size_t nMaxRow = m_pFileSet->get().size(); if (nMaxRow) { @@ -1431,44 +1431,44 @@ BOOL OResultSet::OpenImpl() for( size_t j = nMaxRow-1; j > 0; --j) { - nPos = (*m_pFileSet)[j]; + nPos = (m_pFileSet->get())[j]; ExecuteRow(IResultSetHelper::BOOKMARK,nPos,FALSE); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); { // copy row values - OValueRefVector::iterator copyFrom = m_aSelectRow->begin(); - OValueVector::iterator copyTo = aSearchRow->begin(); + OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin(); + OValueVector::Vector::iterator copyTo = aSearchRow->get().begin(); for ( ++copyFrom,++copyTo; // the first column is the bookmark column - copyFrom != m_aSelectRow->end(); + copyFrom != m_aSelectRow->get().end(); ++copyFrom,++copyTo) *copyTo = *(*copyFrom); // *aSearchRow = *m_aRow; } // compare with next row - nKey = (*m_pFileSet)[j-1]; + nKey = (m_pFileSet->get())[j-1]; ExecuteRow(IResultSetHelper::BOOKMARK,nKey,FALSE); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); - OValueRefVector::iterator loopInRow = m_aSelectRow->begin(); - OValueVector::iterator existentInSearchRow = aSearchRow->begin(); + OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin(); + OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin(); for ( ++loopInRow,++existentInSearchRow; // the first column is the bookmark column - loopInRow != m_aSelectRow->end(); + loopInRow != m_aSelectRow->get().end(); ++loopInRow,++existentInSearchRow) { if ( (*loopInRow)->isBound() && !( *(*loopInRow) == *existentInSearchRow) ) break; } - if(loopInRow == m_aSelectRow->end()) - (*m_pFileSet)[j] = 0; // Rows match -- Mark for deletion by setting key to 0 + if(loopInRow == m_aSelectRow->get().end()) + (m_pFileSet->get())[j] = 0; // Rows match -- Mark for deletion by setting key to 0 #if OSL_DEBUG_LEVEL > 1 else nFound++; #endif } - m_pFileSet->erase(::std::remove_if(m_pFileSet->begin(),m_pFileSet->end(), + m_pFileSet->get().erase(::std::remove_if(m_pFileSet->get().begin(),m_pFileSet->get().end(), ::std::bind2nd(::std::equal_to<sal_Int32>(),0)) - ,m_pFileSet->end()); + ,m_pFileSet->get().end()); if (bWasSorted) { @@ -1476,7 +1476,7 @@ BOOL OResultSet::OpenImpl() m_aOrderbyColumnNumber = aOrderbyColumnNumberSave; m_aOrderbyAscending.assign(aOrderbyAscendingSave.begin(), aOrderbyAscendingSave.end()); - TIntVector aEvaluationKeySet(*m_pFileSet); + TIntVector aEvaluationKeySet(m_pFileSet->get()); m_pEvaluationKeySet = &aEvaluationKeySet; sortRows(); } @@ -1484,7 +1484,7 @@ BOOL OResultSet::OpenImpl() { m_aOrderbyColumnNumber.clear(); m_aOrderbyAscending.clear(); - ::std::sort(m_pFileSet->begin(),m_pFileSet->end()); + ::std::sort(m_pFileSet->get().begin(),m_pFileSet->get().end()); } } // SetRowCount(m_pFileSet->count()); @@ -1597,11 +1597,11 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, const ::rtl::OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); const ::rtl::OUString sType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); - typedef ::std::map<OSQLColumns::iterator,sal_Bool> IterMap; + typedef ::std::map<OSQLColumns::Vector::iterator,sal_Bool> IterMap; IterMap aSelectIters; - OValueRefVector::iterator aRowIter = _rRow->begin()+1; + OValueRefVector::Vector::iterator aRowIter = _rRow->get().begin()+1; for (sal_Int32 i=0; // the first column is the bookmark column - aRowIter != _rRow->end(); + aRowIter != _rRow->get().end(); ++i, ++aRowIter ) { @@ -1618,8 +1618,8 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, // look if we have such a select column // TODO: would like to have a O(log n) search here ... - for ( OSQLColumns::iterator aIter = _rxColumns->begin(); - aIter != _rxColumns->end(); + for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); + aIter != _rxColumns->get().end(); ++aIter ) { @@ -1633,12 +1633,12 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, aSelectIters.insert(IterMap::value_type(aIter,sal_True)); if(_bSetColumnMapping) { - sal_Int32 nSelectColumnPos = aIter - _rxColumns->begin() + 1; + sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1; // the getXXX methods are 1-based ... sal_Int32 nTableColumnPos = i + 1; // get first table column is the bookmark column ... _rColMapping[nSelectColumnPos] = nTableColumnPos; - (*_rSelectRow)[nSelectColumnPos] = *aRowIter; + (_rSelectRow->get())[nSelectColumnPos] = *aRowIter; } (*aRowIter)->setBound(sal_True); @@ -1662,8 +1662,8 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, Reference<XNameAccess> xNameAccess(_xNames,UNO_QUERY); Sequence< ::rtl::OUString > aSelectColumns = xNameAccess->getElementNames(); - for ( OSQLColumns::iterator aIter = _rxColumns->begin(); - aIter != _rxColumns->end(); + for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); + aIter != _rxColumns->get().end(); ++aIter ) { @@ -1677,7 +1677,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, if ( xNameAccess->hasByName( sSelectColumnRealName ) ) { aSelectIters.insert(IterMap::value_type(aIter,sal_True)); - sal_Int32 nSelectColumnPos = aIter - _rxColumns->begin() + 1; + sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1; const ::rtl::OUString* pBegin = aSelectColumns.getConstArray(); const ::rtl::OUString* pEnd = pBegin + aSelectColumns.getLength(); for(sal_Int32 i=0;pBegin != pEnd;++pBegin,++i) @@ -1688,7 +1688,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, sal_Int32 nTableColumnPos = i + 1; // get first table column is the bookmark column ... _rColMapping[nSelectColumnPos] = nTableColumnPos; - (*_rSelectRow)[nSelectColumnPos] = (*_rRow)[nTableColumnPos]; + (_rSelectRow->get())[nSelectColumnPos] = (_rRow->get())[nTableColumnPos]; break; } } @@ -1728,14 +1728,14 @@ void OResultSet::doTableSpecials(const OSQLTable& _xTable) void OResultSet::clearInsertRow() { m_aRow->setDeleted(sal_False); // set to false here because this is the new row - OValueRefVector::iterator aIter = m_aInsertRow->begin(); - const OValueRefVector::iterator aEnd = m_aInsertRow->end(); + OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin(); + const OValueRefVector::Vector::iterator aEnd = m_aInsertRow->get().end(); for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos) { ORowSetValueDecoratorRef& rValue = (*aIter); if ( rValue->isBound() ) { - (*m_aRow)[nPos]->setValue( (*aIter)->getValue() ); + (m_aRow->get())[nPos]->setValue( (*aIter)->getValue() ); } rValue->setBound(nPos == 0); rValue->setModified(sal_False); @@ -1748,8 +1748,8 @@ void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount) if(!_rRow.isValid()) { _rRow = new OValueRefVector(_nColumnCount); - (*_rRow)[0]->setBound(sal_True); - ::std::for_each(_rRow->begin()+1,_rRow->end(),TSetRefBound(sal_False)); + (_rRow->get())[0]->setBound(sal_True); + ::std::for_each(_rRow->get().begin()+1,_rRow->get().end(),TSetRefBound(sal_False)); } } // ----------------------------------------------------------------------------- @@ -1765,7 +1765,7 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 // ----------------------------------------------------------------------------- sal_Int32 OResultSet::getDriverPos() const { - return (*m_aRow)[0]->getValue(); + return (m_aRow->get())[0]->getValue(); } // ----------------------------------------------------------------------------- sal_Bool OResultSet::deletedVisible() const diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index b6433784c1..3282682e36 100644 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx @@ -63,7 +63,7 @@ OResultSetMetaData::~OResultSetMetaData() // ----------------------------------------------------------------------------- void OResultSetMetaData::checkColumnIndex(sal_Int32 column) throw(SQLException, RuntimeException) { - if(column <= 0 || column > (sal_Int32)(sal_Int32)m_xColumns->size()) + if(column <= 0 || column > (sal_Int32)(sal_Int32)m_xColumns->get().size()) throwInvalidIndexException(*this); } // ------------------------------------------------------------------------- @@ -76,13 +76,13 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); + return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { - return (*m_xColumns).size(); + return (m_xColumns->get()).size(); } // ------------------------------------------------------------------------- @@ -102,8 +102,8 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) th { checkColumnIndex(column); - Any aName((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); - return aName.hasValue() ? getString(aName) : getString((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); + Any aName((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); + return aName.hasValue() ? getString(aName) : getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) @@ -119,7 +119,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) th ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - return getString((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))); + return getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -136,7 +136,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) th sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - return getBOOL((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))); + return getBOOL((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))); } // ------------------------------------------------------------------------- @@ -153,20 +153,20 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 /*column*/ ) throw(SQL sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); + return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { checkColumnIndex(column); - return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))); + return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))); + return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))); } // ------------------------------------------------------------------------- @@ -179,8 +179,8 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - sal_Bool bReadOnly = (*m_xColumns)[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && - ::cppu::any2bool((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION))); + sal_Bool bReadOnly = (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && + ::cppu::any2bool((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION))); return bReadOnly || m_pTable->isReadOnly(); } diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index eb60975c26..3984714b31 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -136,7 +136,7 @@ void OStatement_BASE2::disposing() if(m_aRow.isValid()) { - m_aRow->clear(); + m_aRow->get().clear(); m_aRow = NULL; } @@ -352,7 +352,7 @@ void SAL_CALL OStatement_Base::disposing(void) { if(m_aEvaluateRow.isValid()) { - m_aEvaluateRow->clear(); + m_aEvaluateRow->get().clear(); m_aEvaluateRow = NULL; } delete m_pEvaluationKeySet; @@ -443,10 +443,10 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, { ::vos::ORef<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns(); ::comphelper::UStringMixEqual aCase; - OSQLColumns::const_iterator aFind = ::connectivity::find(aSelectColumns->begin(),aSelectColumns->end(),aColumnName,aCase); - if ( aFind == aSelectColumns->end() ) + OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase); + if ( aFind == aSelectColumns->get().end() ) throw SQLException(); - m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->begin()) + 1); + m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1); } // Ascending or Descending? @@ -473,7 +473,7 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException, // more than one table -> can't operate on them -> error m_pConnection->throwGenericSQLException(STR_QUERY_MORE_TABLES,*this); - if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT) && m_aSQLIterator.getSelectColumns()->empty() ) + if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT) && m_aSQLIterator.getSelectColumns()->get().empty() ) // SELECT statement without columns -> error m_pConnection->throwGenericSQLException(STR_QUERY_NO_COLUMN,*this); @@ -501,18 +501,18 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException, Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY); // set the binding of the resultrow m_aRow = new OValueRefVector(xNames->getCount()); - (*m_aRow)[0]->setBound(sal_True); - ::std::for_each(m_aRow->begin()+1,m_aRow->end(),TSetRefBound(sal_False)); + (m_aRow->get())[0]->setBound(sal_True); + ::std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetRefBound(sal_False)); // set the binding of the resultrow m_aEvaluateRow = new OValueRefVector(xNames->getCount()); - (*m_aEvaluateRow)[0]->setBound(sal_True); - ::std::for_each(m_aEvaluateRow->begin()+1,m_aEvaluateRow->end(),TSetRefBound(sal_False)); + (m_aEvaluateRow->get())[0]->setBound(sal_True); + ::std::for_each(m_aEvaluateRow->get().begin()+1,m_aEvaluateRow->get().end(),TSetRefBound(sal_False)); // set the select row - m_aSelectRow = new OValueRefVector(m_aSQLIterator.getSelectColumns()->size()); - ::std::for_each(m_aSelectRow->begin(),m_aSelectRow->end(),TSetRefBound(sal_True)); + m_aSelectRow = new OValueRefVector(m_aSQLIterator.getSelectColumns()->get().size()); + ::std::for_each(m_aSelectRow->get().begin(),m_aSelectRow->get().end(),TSetRefBound(sal_True)); // create the column mapping createColumnMapping(); @@ -533,7 +533,7 @@ void OStatement_Base::createColumnMapping() { // initialize the column index map (mapping select columns to table columns) ::vos::ORef<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns(); - m_aColMapping.resize(xColumns->size() + 1); + m_aColMapping.resize(xColumns->get().size() + 1); for (sal_Int32 i=0; i<(sal_Int32)m_aColMapping.size(); ++i) m_aColMapping[i] = i; @@ -575,11 +575,11 @@ void OStatement_Base::GetAssignValues() { // Row fuer die zu setzenden Werte anlegen (Referenz durch new) if(m_aAssignValues.isValid()) - m_aAssignValues->clear(); + m_aAssignValues->get().clear(); sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount(); m_aAssignValues = new OAssignValues(nCount); // unbound all - ::std::for_each(m_aAssignValues->begin()+1,m_aAssignValues->end(),TSetRefBound(sal_False)); + ::std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(sal_False)); m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER); @@ -682,11 +682,11 @@ void OStatement_Base::GetAssignValues() else if (SQL_ISRULE(m_pParseTree,update_statement_searched)) { if(m_aAssignValues.isValid()) - m_aAssignValues->clear(); + m_aAssignValues->get().clear(); sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount(); m_aAssignValues = new OAssignValues(nCount); // unbound all - ::std::for_each(m_aAssignValues->begin()+1,m_aAssignValues->end(),TSetRefBound(sal_False)); + ::std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(sal_False)); m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER); @@ -781,7 +781,7 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, // Alles geprueft und wir haben den Namen der Column. // Jetzt eine Value allozieren, den Wert setzen und die Value an die Row binden. if (bSetNull) - (*m_aAssignValues)[nId]->setNull(); + (m_aAssignValues->get())[nId]->setNull(); else { switch (::comphelper::getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))) @@ -789,16 +789,16 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, // Kriterium je nach Typ als String oder double in die Variable packen ... case DataType::CHAR: case DataType::VARCHAR: - *(*m_aAssignValues)[nId] = ORowSetValue(aValue); + *(m_aAssignValues->get())[nId] = ORowSetValue(aValue); // Zeichensatz ist bereits konvertiert, da ja das gesamte Statement konvertiert wurde break; case DataType::BIT: { if (aValue.EqualsIgnoreCaseAscii("TRUE") || aValue.GetChar(0) == '1') - *(*m_aAssignValues)[nId] = sal_True; + *(m_aAssignValues->get())[nId] = sal_True; else if (aValue.EqualsIgnoreCaseAscii("FALSE") || aValue.GetChar(0) == '0') - *(*m_aAssignValues)[nId] = sal_False; + *(m_aAssignValues->get())[nId] = sal_False; else { // aStatus.Set(SQL_STAT_ERROR); // nyi: genauer! @@ -817,7 +817,7 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, case DataType::TIME: case DataType::TIMESTAMP: { - *(*m_aAssignValues)[nId] = ORowSetValue(aValue); // .ToDouble + *(m_aAssignValues->get())[nId] = ORowSetValue(aValue); // .ToDouble // try // { // double n = xValue->toDouble(); diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 3cc089206c..aa0a824145 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -203,7 +203,7 @@ void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns) if (!rCodeList.size()) return; // kein Praedikat - if (!rParameterColumns->size()) + if (!rParameterColumns->get().size()) return; // keine Parameter // Anlegen von Columns, die eine genauere Beschreibung fuer die enthalten @@ -211,7 +211,7 @@ void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns) // Anlegen einer Testzeile, wird benoetigt um die Parameter zu beschreiben - OValueRefRow aParameterRow = new OValueRefVector(rParameterColumns->size()); + OValueRefRow aParameterRow = new OValueRefVector(rParameterColumns->get().size()); bindParameterRow(aParameterRow); OValueRefRow aTestRow = new OValueRefVector(Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getCount()); @@ -295,7 +295,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: // the first column (index 0) is for convenience only. The first real select column is no 1. if ( (nPos > 0) && (nPos < static_cast<sal_Int32>(_rColumnMapping.size())) ) map = _rColumnMapping[nPos]; - aIter->second->startSelection((*_pRow)[map]); + aIter->second->startSelection((_pRow->get())[map]); } } } diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index dd09d34025..0d3f99bc5d 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -103,20 +103,20 @@ void OOperandRow::bindValue(const OValueRefRow& _pRow) { OSL_ENSURE(_pRow.isValid(),"NO EMPTY row allowed!"); m_pRow = _pRow; - OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()"); - (*m_pRow)[m_nRowPos]->setBound(sal_True); + OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()"); + (m_pRow->get())[m_nRowPos]->setBound(sal_True); } // ----------------------------------------------------------------------------- void OOperandRow::setValue(const ORowSetValue& _rVal) { - OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()"); - (*(*m_pRow)[m_nRowPos]) = _rVal; + OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()"); + (*(m_pRow->get())[m_nRowPos]) = _rVal; } //------------------------------------------------------------------ const ORowSetValue& OOperandRow::getValue() const { - OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()"); - return (*m_pRow)[m_nRowPos]->getValue(); + OSL_ENSURE(m_pRow.isValid() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()"); + return (m_pRow->get())[m_nRowPos]->getValue(); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/file/makefile.mk b/connectivity/source/drivers/file/makefile.mk index 5f00227479..0696b29b01 100644 --- a/connectivity/source/drivers/file/makefile.mk +++ b/connectivity/source/drivers/file/makefile.mk @@ -35,6 +35,7 @@ PRJNAME=connectivity TARGET=file USE_DEFFILE=TRUE +VISIBILITY_HIDDEN=TRUE # --- Settings ---------------------------------- .IF "$(DBGUTIL_OJ)"!="" @@ -44,6 +45,8 @@ ENVCFLAGS+=/FR$(SLO)$/ .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/version.mk +CDEFS += -DOOO_DLLIMPLEMENTATION_FILE + # --- Files ------------------------------------- EXCEPTIONSFILES=\ $(SLO)$/FNoException.obj \ |