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

Eike Rathke erack at redhat.com
Tue Jan 3 10:56:20 PST 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120103/1cf370ed/attachment.pgp>


More information about the LibreOffice mailing list