diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 14:03:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 14:03:53 +0200 |
commit | 602867578e1e1c1d2cd89a6ef619c729482a0617 (patch) | |
tree | e977b63e0d5536fb609e7dd26ea53b6ca6509cbd /extensions | |
parent | a81c6eb5ffc055ce6e299eb6606095538a858d27 (diff) |
loplugin:oncevar (clang-cl): extensions
Change-Id: I70cac146d09f015db3f7889f3cdd46c00c45c41a
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/abpilot/typeselectionpage.cxx | 8 | ||||
-rw-r--r-- | extensions/source/ole/oleobjw.cxx | 6 | ||||
-rw-r--r-- | extensions/source/ole/unoobjw.cxx | 32 | ||||
-rw-r--r-- | extensions/source/ole/unotypewrapper.cxx | 6 |
4 files changed, 17 insertions, 35 deletions
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index f96a509cee32..1a730477b6ea 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -66,12 +66,11 @@ namespace abp // - MORK, THUNDERBIRD // - OTHER +#if !defined(_WIN32) bool bHaveEvolution = false; bool bHaveKab = false; bool bHaveMacab = false; -#if !defined(_WIN32) - Reference< XDriverManager2 > xManager = DriverManager::create( _pParent->getORB() ); try @@ -106,7 +105,10 @@ namespace abp catch(...) { } - +#else + bool const bHaveEvolution = false; + bool const bHaveKab = false; + bool const bHaveMacab = false; #endif // Items are displayed in list order diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index b7c2664a2ebf..414e707c9b15 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1389,10 +1389,9 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con dispparams.rgvarg = arArgs; // invoking OLE method - DWORD localeId = LOCALE_USER_DEFAULT; hInvRes = m_spDispatch->Invoke( dispid, IID_NULL, - localeId, + LOCALE_USER_DEFAULT, ::sal::static_int_cast< WORD, INVOKEKIND >( pInvkinds[nStep] ), &dispparams, &varResult, @@ -1957,10 +1956,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, } dispparams.rgvarg= arArgs; // invoking OLE method - DWORD localeId = LOCALE_USER_DEFAULT; result = m_spDispatch->Invoke(aFuncDesc->memid, IID_NULL, - localeId, + LOCALE_USER_DEFAULT, ::sal::static_int_cast< WORD, INVOKEKIND >( aFuncDesc->invkind ), &dispparams, &varResult, diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index be441c67e3a3..816360853cca 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -1156,9 +1156,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s STDMETHODIMP InterfaceOleWrapper_Impl::GetDispID(BSTR /*bstrName*/, DWORD /*grfdex*/, DISPID __RPC_FAR* /*pid*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::InvokeEx( @@ -1170,25 +1168,19 @@ STDMETHODIMP InterfaceOleWrapper_Impl::InvokeEx( /* [out] */ EXCEPINFO __RPC_FAR* /*pei*/, /* [unique][in] */ IServiceProvider __RPC_FAR* /*pspCaller*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::DeleteMemberByName( /* [in] */ BSTR /*bstr*/, /* [in] */ DWORD /*grfdex*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::DeleteMemberByDispID(DISPID /*id*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberProperties( @@ -1196,18 +1188,14 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberProperties( /* [in] */ DWORD /*grfdexFetch*/, /* [out] */ DWORD __RPC_FAR* /*pgrfdex*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberName( /* [in] */ DISPID /*id*/, /* [out] */ BSTR __RPC_FAR* /*pbstrName*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::GetNextDispID( @@ -1215,17 +1203,13 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetNextDispID( /* [in] */ DISPID /*id*/, /* [out] */ DISPID __RPC_FAR* /*pid*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } STDMETHODIMP InterfaceOleWrapper_Impl::GetNameSpaceParent( /* [out] */ IUnknown __RPC_FAR *__RPC_FAR* /*ppunk*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); - - return ret; + return ResultFromScode(E_NOTIMPL); } // UnoObjectWrapperRemoteOpt --------------------------------------------------- diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx index ef576a11aaa4..da1d13207615 100644 --- a/extensions/source/ole/unotypewrapper.cxx +++ b/extensions/source/ole/unotypewrapper.cxx @@ -140,22 +140,20 @@ STDMETHODIMP UnoTypeWrapper::Invoke( DISPID dispIdMember, STDMETHODIMP UnoTypeWrapper::put_Name(BSTR val) { Lock(); - HRESULT hr = S_OK; m_sName = val; Unlock(); - return hr; + return S_OK; } // (UnoTypeWrapper----------------------- STDMETHODIMP UnoTypeWrapper::get_Name(BSTR *pVal) { Lock(); - HRESULT hr = S_OK; if( !pVal) return E_POINTER; *pVal = m_sName.Copy(); Unlock(); - return hr; + return S_OK; } |