summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-26 15:38:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-26 17:01:08 +0100
commit5a448a920302c52b1366844efeab0f2e23bef95a (patch)
tree691b718f59c6e61efaf0621b9d715f91d764c627 /extensions
parentae6e7be84ed377ac63f01fdea323c0d6ee909514 (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 'extensions')
-rw-r--r--extensions/source/activex/SOActionsApproval.h2
-rw-r--r--extensions/source/activex/SOActiveX.cxx10
-rw-r--r--extensions/source/activex/SOComWindowPeer.h2
-rw-r--r--extensions/source/activex/SODispatchInterceptor.cxx10
-rw-r--r--extensions/source/activex/SODispatchInterceptor.h2
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx16
6 files changed, 21 insertions, 21 deletions
diff --git a/extensions/source/activex/SOActionsApproval.h b/extensions/source/activex/SOActionsApproval.h
index fd0c05331e89..f96b23fd9452 100644
--- a/extensions/source/activex/SOActionsApproval.h
+++ b/extensions/source/activex/SOActionsApproval.h
@@ -95,7 +95,7 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SODOCUMENTEVENTLISTENER)
if( !*pVal )
return E_FAIL;
- long ix = 0;
+ LONG ix = 0;
CComBSTR aInterface( OLESTR( "com.sun.star.embed.XActionsApproval" ) );
SafeArrayPutElement( *pVal, &ix, aInterface );
diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx
index 489fd6b363b1..5b387bc2beef 100644
--- a/extensions/source/activex/SOActiveX.cxx
+++ b/extensions/source/activex/SOActiveX.cxx
@@ -224,7 +224,7 @@ HRESULT CSOActiveX::Cleanup()
if ( SUCCEEDED( hr ) && pDispDocumentCloser )
{
SAFEARRAY FAR* pInitFrame = SafeArrayCreateVector( VT_VARIANT, 0, 1 );
- long nInitInd = 0;
+ LONG nInitInd = 0;
CComVariant pFrameVariant( mpDispFrame );
SafeArrayPutElement( pInitFrame, &nInitInd, &pFrameVariant );
CComVariant aVarInitFrame;
@@ -593,7 +593,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height )
SAFEARRAY FAR* pInitVals = SafeArrayCreateVector( VT_VARIANT, 0, 3 );
// the first sequence element
- long nInitInd = 0;
+ LONG nInitInd = 0;
CComVariant pFrameVariant( mpDispFrame );
SafeArrayPutElement( pInitVals, &nInitInd, &pFrameVariant );
@@ -632,7 +632,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height )
HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR const * sUrl, OLECHAR const * sArgName, BOOL sArgVal )
{
SAFEARRAY FAR* pPropVals = SafeArrayCreateVector( VT_DISPATCH, 0, 1 );
- long ix = 0;
+ LONG ix = 0;
CComPtr<IDispatch> pdispPropVal;
HRESULT hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal );
if( !SUCCEEDED( hr ) ) return hr;
@@ -682,7 +682,7 @@ HRESULT CSOActiveX::CallDispatchMethod( OLECHAR const * sUrl,
if( !SUCCEEDED( hr ) ) return hr;
SAFEARRAY FAR* pPropVals = SafeArrayCreateVector( VT_DISPATCH, 0, count );
- for( long ix = 0; ix < static_cast<long>(count); ix ++ )
+ for( LONG ix = 0; ix < static_cast<LONG>(count); ix ++ )
{
CComPtr<IDispatch> pdispPropVal;
hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal );
@@ -880,7 +880,7 @@ SOVersion CSOActiveX::GetVersionConnected()
if( pInitParams )
{
- long ix = 0;
+ LONG ix = 0;
CComVariant aConfPath( L"org.openoffice.Setup" );
SafeArrayPutElement( pInitParams, &ix, &aConfPath );
diff --git a/extensions/source/activex/SOComWindowPeer.h b/extensions/source/activex/SOComWindowPeer.h
index b06f2efbdd67..8e2b704e6783 100644
--- a/extensions/source/activex/SOComWindowPeer.h
+++ b/extensions/source/activex/SOComWindowPeer.h
@@ -143,7 +143,7 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SOCOMWINDOWPEER)
if( !*pVal )
return E_FAIL;
- long ix = 0;
+ LONG ix = 0;
CComBSTR aInterface( OLESTR( "com.sun.star.awt.XSystemDependentWindowPeer" ) );
SafeArrayPutElement( *pVal, &ix, aInterface );
diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx
index a5f9aa91865c..f5497fc0efdd 100644
--- a/extensions/source/activex/SODispatchInterceptor.cxx
+++ b/extensions/source/activex/SODispatchInterceptor.cxx
@@ -121,7 +121,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts,
if ( !aDescripts || !retVal || SafeArrayGetDim( aDescripts ) != 1 )
return E_FAIL;
- long nLB, nUB;
+ LONG nLB, nUB;
HRESULT hr = SafeArrayGetLBound( aDescripts, 1, &nLB );
if( !SUCCEEDED( hr ) ) return hr;
@@ -132,7 +132,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts,
*retVal = SafeArrayCreateVector( VT_DISPATCH, 0, nUB - nLB );
- for ( long ind = nLB; ind <= nUB; ind ++ )
+ for ( LONG ind = nLB; ind <= nUB; ind ++ )
{
CComPtr<IDispatch> pElem;
SafeArrayGetElement( aDescripts, &ind, pElem );
@@ -168,7 +168,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR
if (!wcsncmp(pValue.bstrVal, L".uno:OpenHyperlink", 18))
{
- long nLB = 0, nUB = 0;
+ LONG nLB = 0, nUB = 0;
// long nDim = SafeArrayGetDim( aArgs );
hr = SafeArrayGetLBound( aArgs, 1, &nLB );
@@ -178,7 +178,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR
if( !SUCCEEDED( hr ) ) return hr;
if( nUB < nLB ) return E_FAIL;
- for ( long ind = nLB; ind <= nUB; ind ++ )
+ for ( LONG ind = nLB; ind <= nUB; ind ++ )
{
CComVariant pVarElem;
SafeArrayGetElement( aArgs, &ind, &pVarElem );
@@ -230,7 +230,7 @@ STDMETHODIMP SODispatchInterceptor::getInterceptedURLs( SAFEARRAY FAR* FAR* pVal
if( !*pVal )
return E_FAIL;
- long ix = 0;
+ LONG ix = 0;
CComBSTR aPattern( OLESTR( "ftp://*" ) );
SafeArrayPutElement( *pVal, &ix, aPattern );
diff --git a/extensions/source/activex/SODispatchInterceptor.h b/extensions/source/activex/SODispatchInterceptor.h
index dbb2b6a4f031..aa8138024fc6 100644
--- a/extensions/source/activex/SODispatchInterceptor.h
+++ b/extensions/source/activex/SODispatchInterceptor.h
@@ -153,7 +153,7 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SODISPATCHINTERCEPTOR)
if( !*pVal )
return E_FAIL;
- long ix = 0;
+ LONG ix = 0;
CComBSTR aInterface( OLESTR( "com.sun.star.frame.XDispatchProviderInterceptor" ) );
SafeArrayPutElement( *pVal, &ix, aInterface );
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 4065fd682c92..32788abc4ad5 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -154,7 +154,7 @@ public:
bool convertValueObject( const VARIANTARG *var, Any& any);
void dispatchExObject2Sequence( const VARIANTARG* pvar, Any& anySeq, const Type& type);
- Sequence<Any> createOleArrayWrapperOfDim(SAFEARRAY* pArray, unsigned int dimCount, unsigned int actDim, long* index,
+ Sequence<Any> createOleArrayWrapperOfDim(SAFEARRAY* pArray, unsigned int dimCount, unsigned int actDim, LONG* index,
VARTYPE type, const Type& unotype);
Sequence<Any> createOleArrayWrapper(SAFEARRAY* pArray, VARTYPE type, const Type& unotype= Type());
@@ -1299,7 +1299,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq)
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = n;
VARIANT oleElement;
- long safeI[1];
+ LONG safeI[1];
pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
@@ -2066,12 +2066,12 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva
*/
template<class T>
Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapperOfDim(SAFEARRAY* pArray,
- unsigned int dimCount, unsigned int actDim, long* index, VARTYPE type, const Type& unotype)
+ unsigned int dimCount, unsigned int actDim, LONG* index, VARTYPE type, const Type& unotype)
{
HRESULT hr= S_OK;
- long lBound;
- long uBound;
- long nCountElements;
+ LONG lBound;
+ LONG uBound;
+ LONG nCountElements;
SafeArrayGetLBound(pArray, actDim, &lBound);
SafeArrayGetUBound(pArray, actDim, &uBound);
@@ -2187,8 +2187,8 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapper(SAFEARRAY* pArray
if (dim > 0)
{
- std::unique_ptr<long[]> sarIndex(new long[dim]);
- long * index = sarIndex.get();
+ std::unique_ptr<LONG[]> sarIndex(new LONG[dim]);
+ LONG * index = sarIndex.get();
for (unsigned int i = 0; i < dim; i++)
{