Kaydet (Commit) 43cdf4b6 authored tarafından David Ostrovsky's avatar David Ostrovsky

Ole: Fix WaE

Change-Id: Ia6ccdc21608abcbd715bd9ff4aa2057f9f306e58
Reviewed-on: https://gerrit.libreoffice.org/22686Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
üst f64a190f
...@@ -978,8 +978,8 @@ HRESULT CSOActiveX::OnDrawAdvanced( ATL_DRAWINFO& di ) ...@@ -978,8 +978,8 @@ HRESULT CSOActiveX::OnDrawAdvanced( ATL_DRAWINFO& di )
CComVariant dummyResult; CComVariant dummyResult;
CComVariant aPropVar; CComVariant aPropVar;
aPropVar.vt = VT_BOOL; aPropVar.boolVal = VARIANT_FALSE; aPropVar.vt = VT_BOOL; aPropVar.boolVal = VARIANT_FALSE;
HRESULT hr = ExecuteFunc( mpDispFrame, L"close", &aPropVar, 1, &dummyResult ); HRESULT hres = ExecuteFunc( mpDispFrame, L"close", &aPropVar, 1, &dummyResult );
(void)hr; (void)hres;
mpDispFrame = CComPtr<IDispatch>(); mpDispFrame = CComPtr<IDispatch>();
} }
......
...@@ -182,7 +182,6 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR ...@@ -182,7 +182,6 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR
if( pValues[0].vt == VT_BSTR && pValues[1].vt == VT_BSTR ) if( pValues[0].vt == VT_BSTR && pValues[1].vt == VT_BSTR )
{ {
USES_CONVERSION;
if( !strncmp( OLE2T( pValues[0].bstrVal ), "URL", 3 ) ) if( !strncmp( OLE2T( pValues[0].bstrVal ), "URL", 3 ) )
{ {
EnterCriticalSection( &mMutex ); EnterCriticalSection( &mMutex );
......
...@@ -1019,7 +1019,8 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, ...@@ -1019,7 +1019,8 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
CComVariant varResult; CComVariant varResult;
ExcepInfo excepinfo; ExcepInfo excepinfo;
unsigned int uArgErr; unsigned int uArgErr;
DISPPARAMS dispparams= { pVarParams, NULL, parameterCount, 0}; DISPPARAMS dispparams= { pVarParams, NULL, static_cast<UINT>(parameterCount), 0};
// Get the DISPID // Get the DISPID
FuncDesc aDesc(getTypeInfo()); FuncDesc aDesc(getTypeInfo());
getFuncDesc(sFunctionName, & aDesc); getFuncDesc(sFunctionName, & aDesc);
...@@ -1583,9 +1584,9 @@ TypeDescription IUnknownWrapper_Impl::getInterfaceMemberDescOfCurrentCall(const ...@@ -1583,9 +1584,9 @@ TypeDescription IUnknownWrapper_Impl::getInterfaceMemberDescOfCurrentCall(const
{ {
typelib_InterfaceMemberTypeDescription* pMember= NULL; typelib_InterfaceMemberTypeDescription* pMember= NULL;
//find the member description of the current call //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_TypeDescription* pDescMember= NULL;
TYPELIB_DANGER_GET( &pDescMember, pTypeRefMember); TYPELIB_DANGER_GET( &pDescMember, pTypeRefMember);
...@@ -2004,9 +2005,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, ...@@ -2004,9 +2005,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
// allocate space for the out param Sequence and indices Sequence // allocate space for the out param Sequence and indices Sequence
int outParamsCount= 0; // includes in/out parameter 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) PARAMFLAG_FOUT)
outParamsCount++; outParamsCount++;
} }
...@@ -2172,9 +2173,9 @@ void IUnknownWrapper_Impl::getFuncDescForInvoke(const OUString & sFuncName, ...@@ -2172,9 +2173,9 @@ void IUnknownWrapper_Impl::getFuncDescForInvoke(const OUString & sFuncName,
{ {
// Fallback: DISPATCH_PROPERTYGET can mostly be called as // Fallback: DISPATCH_PROPERTYGET can mostly be called as
// DISPATCH_METHOD // DISPATCH_METHOD
ITypeInfo * pInfo = getTypeInfo(); ITypeInfo * pTypeInfo = getTypeInfo();
FuncDesc aDescPut(pInfo); FuncDesc aDescPut(pTypeInfo);
VarDesc aVarDesc(pInfo); VarDesc aVarDesc(pTypeInfo);
getPropDesc(sFuncName, & aFuncDesc, & aDescPut, & aVarDesc); getPropDesc(sFuncName, & aFuncDesc, & aDescPut, & aVarDesc);
if ( ! aFuncDesc ) if ( ! aFuncDesc )
{ {
......
...@@ -1409,8 +1409,8 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT ...@@ -1409,8 +1409,8 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT
{ {
Sequence<Any> params(1); Sequence<Any> params(1);
params.getArray()[0] = rObj; params.getArray()[0] = rObj;
Reference<XInterface> xInt = xInvFactory->createInstanceWithArguments(params); Reference<XInterface> xInt2 = xInvFactory->createInstanceWithArguments(params);
xInv.set(xInt, UNO_QUERY); xInv.set(xInt2, UNO_QUERY);
} }
} }
...@@ -1675,12 +1675,12 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& ...@@ -1675,12 +1675,12 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type&
} }
else if (pVar->vt == VT_DISPATCH && pVar->pdispVal != NULL) else if (pVar->vt == VT_DISPATCH && pVar->pdispVal != NULL)
{ {
CComPtr<IDispatch> spDispatch(pVar->pdispVal); CComPtr<IDispatch> spDispatch2(pVar->pdispVal);
if (spDispatch) if (spDispatch2)
#ifdef __MINGW32__ #ifdef __MINGW32__
spDispatch->QueryInterface( IID_IUnknown, reinterpret_cast<LPVOID*>( & spUnknown.p)); spDispatch2->QueryInterface( IID_IUnknown, reinterpret_cast<LPVOID*>( & spUnknown.p));
#else #else
spDispatch.QueryInterface( & spUnknown.p); spDispatch2.QueryInterface( & spUnknown.p);
#endif #endif
} }
......
...@@ -374,10 +374,10 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, ...@@ -374,10 +374,10 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id,
IDispatch* pdisp= pdispparams->rgvarg[i].pdispVal; IDispatch* pdisp= pdispparams->rgvarg[i].pdispVal;
OLECHAR const * sindex= L"0"; OLECHAR const * sindex= L"0";
DISPID id; DISPID id2;
DISPPARAMS noParams= {0,0,0,0}; DISPPARAMS noParams= {0,0,0,0};
if(SUCCEEDED( hr= pdisp->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sindex), 1, LOCALE_USER_DEFAULT, &id))) if(SUCCEEDED( hr= pdisp->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sindex), 1, LOCALE_USER_DEFAULT, &id2)))
hr= pdisp->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, hr= pdisp->Invoke( id2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET,
& noParams, & varParam, NULL, NULL); & noParams, & varParam, NULL, NULL);
if( FAILED( hr)) if( FAILED( hr))
{ {
...@@ -488,7 +488,7 @@ Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject, ...@@ -488,7 +488,7 @@ Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject,
pVar->pdispVal= static_cast<IDispatch*>( this); pVar->pdispVal= static_cast<IDispatch*>( this);
AddRef(); AddRef();
retAny<<= reinterpret_cast< sal_uInt32 >( pVar); retAny<<= reinterpret_cast< sal_uIntPtr >( pVar);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment