diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-26 15:38:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-26 17:01:08 +0100 |
commit | 5a448a920302c52b1366844efeab0f2e23bef95a (patch) | |
tree | 691b718f59c6e61efaf0621b9d715f91d764c627 /connectivity | |
parent | ae6e7be84ed377ac63f01fdea323c0d6ee909514 (diff) |
The Windows oleauto.h SafeArray* functions use LONG for indexing
Change-Id: If973cc337e0674462cfe2a15e347881a861a761f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106697
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity')
4 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 16acbc133bf3..a12f6e1fd6c4 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -151,14 +151,14 @@ Reference< css::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinar //Copy the data only up to the Actual Size of Field. sal_Int32 nSize = aField.GetActualSize(); Sequence<sal_Int8> aData(nSize); - long index = 0; + sal_Int32 index = 0; while(index < nSize) { m_aValue = aField.GetChunk(BLOCK_SIZE); if(m_aValue.isNull()) break; UCHAR chData; - for(long index2 = 0;index2 < BLOCK_SIZE;++index2) + for(LONG index2 = 0;index2 < BLOCK_SIZE;++index2) { HRESULT hr = ::SafeArrayGetElement(m_aValue.parray,&index2,&chData); if(SUCCEEDED(hr)) diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index dae0f91efb61..bf33edbd4528 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -174,14 +174,14 @@ Reference< css::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int //Copy the data only up to the Actual Size of Field. sal_Int32 nSize = aField.GetActualSize(); Sequence<sal_Int8> aData(nSize); - long index = 0; + sal_Int32 index = 0; while(index < nSize) { m_aValue = aField.GetChunk(BLOCK_SIZE); if(m_aValue.isNull()) break; UCHAR chData; - for(long index2 = 0;index2 < BLOCK_SIZE;++index2) + for(LONG index2 = 0;index2 < BLOCK_SIZE;++index2) { HRESULT hr = ::SafeArrayGetElement(m_aValue.parray,&index2,&chData); if(SUCCEEDED(hr)) diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index ae7c3f30572c..5c2d014b31d1 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -437,16 +437,16 @@ css::uno::Sequence< sal_Int8 > OLEVariant::getByteSequence() const if(pArray) { HRESULT hresult1,hresult2; - long lBound,uBound; + LONG lBound,uBound; // Verify that the SafeArray is the proper shape. hresult1 = ::SafeArrayGetLBound(pArray, 1, &lBound); hresult2 = ::SafeArrayGetUBound(pArray, 1, &uBound); if ( SUCCEEDED(hresult1) && SUCCEEDED(hresult2) ) { - long nCount = uBound-lBound+1; + LONG nCount = uBound-lBound+1; aRet.realloc(nCount); sal_Int8* pData = aRet.getArray(); - for(long i=0; SUCCEEDED(hresult1) && lBound <= uBound ;++i,++lBound) + for(; SUCCEEDED(hresult1) && lBound <= uBound ;++lBound) { sal_Int32 nData = 0; hresult1 = ::SafeArrayGetElement(pArray,&lBound,&nData); diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index 1fc664f89a5a..0393dc35c9a2 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -1981,7 +1981,7 @@ ADORecordset* WpADOConnection::getTables( const css::uno::Any& catalog, SAFEARRAY *psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound ); // Set the values for each element of the array - for( long i = 0 ; i < nCrit && SUCCEEDED( hr );i++) + for( LONG i = 0 ; i < nCrit && SUCCEEDED( hr );i++) { hr = SafeArrayPutElement(psa, &i,&varCriteria[i]); } |