Re: [Libreoffice] [REVIEW] quick patch for extensions ole part

2012-01-03 Thread Eike Rathke
Hi julien2412,

On Thursday, 2011-12-29 08:38:31 -0800, julien2412 wrote:

 Another Same expression on both sides of '||'
  detected by cppcheck.
 
 I supposed this patch but I made a research of INVOKE_PROPERTYPUT on the
 file, either it's not the only location where INVOKE_PROPERTYPUTREF should
 be used or INVOKE_PROPERTYPUTREF shouldn't be used at all in this case.
 
 @@ -1814,7 +1814,7 @@ Any 
 IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc aFuncDesc,
  if (dispparams.cNamedArgs  0 
  ! (dispparams.cNamedArgs == 1 
 (aFuncDesc-invkind == INVOKE_PROPERTYPUT ||
 -aFuncDesc-invkind == INVOKE_PROPERTYPUT)))
 +aFuncDesc-invkind == INVOKE_PROPERTYPUTREF)))
  {
  //set up an array containing the member and parameter names
  //which is then used in ITypeInfo::GetIDsOfNames
 
 Any idea ?

IMHO it makes sense to change that to INVOKE_PROPERTYPUTREF. There are
other places that test for both, INVOKE_PROPERTYPUT and
INVOKE_PROPERTYPUTREF, i.e. line 1765

if (aFuncDesc-invkind == INVOKE_PROPERTYPUT
|| aFuncDesc-invkind == INVOKE_PROPERTYPUTREF)
dispparams.rgdispidNamedArgs =  idPropertyPut;

and line 1825

if (aFuncDesc-invkind == INVOKE_PROPERTYPUT
|| aFuncDesc-invkind == INVOKE_PROPERTYPUTREF)
{  
nSizeAr = dispparams.cNamedArgs; //counts the DISID_PROPERTYPUT
}

and line 2394

else if (pFuncDesc-invkind == INVOKE_PROPERTYPUT ||
 pFuncDesc-invkind == INVOKE_PROPERTYPUTREF)


  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpir5SDUKQ0O.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [REVIEW] quick patch for extensions ole part

2011-12-29 Thread julien2412
Hello,

Another Same expression on both sides of '||'
 detected by cppcheck.

I supposed this patch but I made a research of INVOKE_PROPERTYPUT on the
file, either it's not the only location where INVOKE_PROPERTYPUTREF should
be used or INVOKE_PROPERTYPUTREF shouldn't be used at all in this case.

diff --git a/extensions/source/ole/oleobjw.cxx
b/extensions/source/ole/oleobjw.cxx
index 8fb9261..9d203c8 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -1814,7 +1814,7 @@ Any 
IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc aFuncDesc,
 if (dispparams.cNamedArgs  0 
 ! (dispparams.cNamedArgs == 1 
(aFuncDesc-invkind == INVOKE_PROPERTYPUT ||
-aFuncDesc-invkind == INVOKE_PROPERTYPUT)))
+aFuncDesc-invkind == INVOKE_PROPERTYPUTREF)))
 {
 //set up an array containing the member and parameter names
 //which is then used in ITypeInfo::GetIDsOfNames

Any idea ?

Julien

--
View this message in context: 
http://nabble.documentfoundation.org/REVIEW-quick-patch-for-extensions-ole-part-tp3619208p3619208.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice