diff options
author | Andreas Becker <atayoohoo@googlemail.com> | 2011-04-28 00:59:28 +0200 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2011-04-28 13:45:46 +0200 |
commit | 9ad4eeb4fa413b1a3e084d141c6eb01795f95b7f (patch) | |
tree | 031b7ad30c650665210cb5b63d59efe740fd57d1 /extensions | |
parent | 8a9f54bc1283b7137a90506e29dba7962dd73f83 (diff) |
fixed cppcheck warnings
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 5 | ||||
-rw-r--r-- | extensions/source/ole/oleobjw.cxx | 22 | ||||
-rw-r--r-- | extensions/source/ole/oleobjw.hxx | 2 |
3 files changed, 8 insertions, 21 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index b2698154fd03..265496506a90 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -118,14 +118,13 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) { xDataSource = Reference< XDataSource > (Reference< XNamingService > (xNamingContext, UNO_QUERY)->getRegisteredObject(_rURL), UNO_QUERY); } - catch(Exception eEx) + catch(Exception &) { - (void) eEx; // make compiler happy OSL_FAIL("Exception caught in ODatabaseContext::getRegisteredObject()"); } } // build the connection from the data source - Reference< XConnection > xConn; + Reference< XConnection > xConn; if (xDataSource.is()) { // need user/pwd for this diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 6648d1773560..5866eb6a6c91 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1366,7 +1366,6 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const ::rtl::OUString& aNa scoped_array<CComVariant> ptrRefArgs; // referenced arguments CComVariant * arArgs = NULL; CComVariant * arRefArgs = NULL; - bool bVarargParam = false; dispparams.cArgs = aParams.getLength(); @@ -1758,8 +1757,6 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, CComVariant * arArgs = NULL; CComVariant * arRefArgs = NULL; sal_Int32 revIndex = 0; - bool bVarargParam = false; - //Set the array of DISPIDs for named args if it is a property put operation. //If there are other named arguments another array is set later on. @@ -1906,24 +1903,15 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, if ( i < nUnoArgs) anyArg= Params.getConstArray()[i]; - //Test if the current parameter is a "vararg" parameter. - if (bVarargParam || (aFuncDesc->cParamsOpt == -1 && - aFuncDesc->cParams == (i + 1))) - { //This parameter is from the variable argument list. There is no - //type info available, except that it must be a VARIANT - bVarargParam = true; - } - unsigned short paramFlags = PARAMFLAG_FOPT | PARAMFLAG_FIN; VARTYPE varType = VT_VARIANT; - if ( ! bVarargParam) + if (aFuncDesc->cParamsOpt != -1 || aFuncDesc->cParams != (i + 1)) { - paramFlags = - aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags; - varType = getElementTypeDesc( - & aFuncDesc->lprgelemdescParam[i].tdesc); + paramFlags = aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags; + varType = getElementTypeDesc(&aFuncDesc->lprgelemdescParam[i].tdesc); } - //Make sure that there is a UNO parameter for every + + // Make sure that there is a UNO parameter for every // expected parameter. If there is no UNO parameter where the // called function expects one, then it must be optional. Otherwise // its a UNO programming error. diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 0be19ddc6cff..f2882fc4417d 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -148,7 +148,7 @@ public: virtual ::sal_Bool SAL_CALL hasMember( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, + Any invokeWithDispIdComTlb(FuncDesc& aFuncDesc, const OUString& sFuncName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, |