diff options
author | Ocke Janssen <oj@openoffice.org> | 2000-12-14 12:17:53 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2000-12-14 12:17:53 +0000 |
commit | 17bffa7483eb4cb4b5fbc34ce14d430734fcdcf5 (patch) | |
tree | 83fa03ae4597bc4f2c818b17f824dca9a9e7b8c0 /connectivity/source/drivers/file | |
parent | 4695f7d361641ea4dcd927a7b4aab86e0c971d5b (diff) |
#82004# check size of indexes
Diffstat (limited to 'connectivity/source/drivers/file')
-rw-r--r-- | connectivity/source/drivers/file/FResultSet.cxx | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 0c1b184ae933..797f19cab220 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FResultSet.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: oj $ $Date: 2000-12-13 15:22:55 $ + * last change: $Author: oj $ $Date: 2000-12-14 13:17:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,8 +100,8 @@ #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_ #include <cppuhelper/typeprovider.hxx> #endif -#ifndef _CONNECTIVITY_DATECONVERSION_HXX_ -#include "connectivity/DateConversion.hxx" +#ifndef _DBHELPER_DBCONVERSION_HXX_ +#include "connectivity/dbconversion.hxx" #endif #ifndef _CPPUHELPER_PROPSHLP_HXX #include <cppuhelper/propshlp.hxx> @@ -966,7 +966,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::s columnIndex = mapColumn(columnIndex); (*m_aInsertRow)[columnIndex].setBound(sal_True); - (*m_aInsertRow)[columnIndex] = DateConversion::toDouble(x); + (*m_aInsertRow)[columnIndex] = x; } // ------------------------------------------------------------------------- @@ -979,7 +979,7 @@ void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::s columnIndex = mapColumn(columnIndex); (*m_aInsertRow)[columnIndex].setBound(sal_True); - (*m_aInsertRow)[columnIndex] = DateConversion::toDouble(x); + (*m_aInsertRow)[columnIndex] = x; } // ------------------------------------------------------------------------- @@ -992,7 +992,7 @@ void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::s columnIndex = mapColumn(columnIndex); (*m_aInsertRow)[columnIndex].setBound(sal_True); - (*m_aInsertRow)[columnIndex] = DateConversion::toDouble(x); + (*m_aInsertRow)[columnIndex] = x; } // ------------------------------------------------------------------------- @@ -2026,19 +2026,22 @@ BOOL OResultSet::OpenImpl() { xIndexes = Reference<XIndexAccess>(xIndexSup->getIndexes(),UNO_QUERY); Reference<XPropertySet> xColProp; - xNames->getByIndex(nOrderbyColumnNumber[0]) >>= xColProp; - // iterate through the indexes to find the matching column - for(sal_Int32 i=0;i<xIndexes->getCount();++i) + if(nOrderbyColumnNumber[0] < xNames->getCount()) { - Reference<XColumnsSupplier> xIndex; - xIndexes->getByIndex(i) >>= xIndex; - Reference<XNameAccess> xIndexCols = xIndex->getColumns(); - if(xIndexCols->hasByName(connectivity::getString(xColProp->getPropertyValue(PROPERTY_NAME)))) + xNames->getByIndex(nOrderbyColumnNumber[0]) >>= xColProp; + // iterate through the indexes to find the matching column + for(sal_Int32 i=0;i<xIndexes->getCount();++i) { - m_pFileSet = new OKeySet(); + Reference<XColumnsSupplier> xIndex; + xIndexes->getByIndex(i) >>= xIndex; + Reference<XNameAccess> xIndexCols = xIndex->getColumns(); + if(xIndexCols->hasByName(connectivity::getString(xColProp->getPropertyValue(PROPERTY_NAME)))) + { + m_pFileSet = new OKeySet(); - if(fillIndexValues(xIndex)) - goto DISTINCT; + if(fillIndexValues(xIndex)) + goto DISTINCT; + } } } } |