diff options
author | David Ostrovsky <david@ostrovsky.org> | 2016-02-20 16:47:26 +0100 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2016-02-28 14:52:32 +0000 |
commit | 43cdf4b6284ba5f73f290027b9374353f7f47e1f (patch) | |
tree | bed86472ce8ac75b448678cb139c677689ecc1ea /extensions/source/ole | |
parent | Unused resources (diff) | |
download | core-43cdf4b6284ba5f73f290027b9374353f7f47e1f.tar.gz core-43cdf4b6284ba5f73f290027b9374353f7f47e1f.zip |
Ole: Fix WaE
Change-Id: Ia6ccdc21608abcbd715bd9ff4aa2057f9f306e58
Reviewed-on: https://gerrit.libreoffice.org/22686
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Diffstat (limited to 'extensions/source/ole')
-rw-r--r-- | extensions/source/ole/oleobjw.cxx | 17 | ||||
-rw-r--r-- | extensions/source/ole/unoconversionutilities.hxx | 12 | ||||
-rw-r--r-- | extensions/source/ole/unoobjw.cxx | 8 |
3 files changed, 19 insertions, 18 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index e019cee7d233..b2fde4a3a406 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1019,7 +1019,8 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, CComVariant varResult; ExcepInfo excepinfo; unsigned int uArgErr; - DISPPARAMS dispparams= { pVarParams, NULL, parameterCount, 0}; + DISPPARAMS dispparams= { pVarParams, NULL, static_cast<UINT>(parameterCount), 0}; + // Get the DISPID FuncDesc aDesc(getTypeInfo()); getFuncDesc(sFunctionName, & aDesc); @@ -1583,9 +1584,9 @@ TypeDescription IUnknownWrapper_Impl::getInterfaceMemberDescOfCurrentCall(const { typelib_InterfaceMemberTypeDescription* pMember= NULL; //find the member description of the current call - for( int i=0; i < pInterface->nAllMembers; i++) + for( int j=0; j < pInterface->nAllMembers; j++) { - typelib_TypeDescriptionReference* pTypeRefMember = pInterface->ppAllMembers[i]; + typelib_TypeDescriptionReference* pTypeRefMember = pInterface->ppAllMembers[j]; typelib_TypeDescription* pDescMember= NULL; TYPELIB_DANGER_GET( &pDescMember, pTypeRefMember); @@ -2004,9 +2005,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, // allocate space for the out param Sequence and indices Sequence int outParamsCount= 0; // includes in/out parameter - for (int i = 0; i < aFuncDesc->cParams; i++) + for (int j = 0; j < aFuncDesc->cParams; j++) { - if (aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags & + if (aFuncDesc->lprgelemdescParam[j].paramdesc.wParamFlags & PARAMFLAG_FOUT) outParamsCount++; } @@ -2172,9 +2173,9 @@ void IUnknownWrapper_Impl::getFuncDescForInvoke(const OUString & sFuncName, { // Fallback: DISPATCH_PROPERTYGET can mostly be called as // DISPATCH_METHOD - ITypeInfo * pInfo = getTypeInfo(); - FuncDesc aDescPut(pInfo); - VarDesc aVarDesc(pInfo); + ITypeInfo * pTypeInfo = getTypeInfo(); + FuncDesc aDescPut(pTypeInfo); + VarDesc aVarDesc(pTypeInfo); getPropDesc(sFuncName, & aFuncDesc, & aDescPut, & aVarDesc); if ( ! aFuncDesc ) { diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index 742fe809c58a..1fdb038f4afc 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1409,8 +1409,8 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT { Sequence<Any> params(1); params.getArray()[0] = rObj; - Reference<XInterface> xInt = xInvFactory->createInstanceWithArguments(params); - xInv.set(xInt, UNO_QUERY); + Reference<XInterface> xInt2 = xInvFactory->createInstanceWithArguments(params); + xInv.set(xInt2, UNO_QUERY); } } @@ -1675,12 +1675,12 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& } else if (pVar->vt == VT_DISPATCH && pVar->pdispVal != NULL) { - CComPtr<IDispatch> spDispatch(pVar->pdispVal); - if (spDispatch) + CComPtr<IDispatch> spDispatch2(pVar->pdispVal); + if (spDispatch2) #ifdef __MINGW32__ - spDispatch->QueryInterface( IID_IUnknown, reinterpret_cast<LPVOID*>( & spUnknown.p)); + spDispatch2->QueryInterface( IID_IUnknown, reinterpret_cast<LPVOID*>( & spUnknown.p)); #else - spDispatch.QueryInterface( & spUnknown.p); + spDispatch2.QueryInterface( & spUnknown.p); #endif } diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 91363108337f..9855b4554253 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -374,10 +374,10 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, IDispatch* pdisp= pdispparams->rgvarg[i].pdispVal; OLECHAR const * sindex= L"0"; - DISPID id; + DISPID id2; DISPPARAMS noParams= {0,0,0,0}; - if(SUCCEEDED( hr= pdisp->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sindex), 1, LOCALE_USER_DEFAULT, &id))) - hr= pdisp->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, + if(SUCCEEDED( hr= pdisp->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sindex), 1, LOCALE_USER_DEFAULT, &id2))) + hr= pdisp->Invoke( id2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, & noParams, & varParam, NULL, NULL); if( FAILED( hr)) { @@ -488,7 +488,7 @@ Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject, pVar->pdispVal= static_cast<IDispatch*>( this); AddRef(); - retAny<<= reinterpret_cast< sal_uInt32 >( pVar); + retAny<<= reinterpret_cast< sal_uIntPtr >( pVar); } } } |