diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 16:15:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 16:15:29 +0100 |
commit | af04ae6b02f3048607bbff6a1b721ea5a2a8de63 (patch) | |
tree | 268603cb0b6f8afcf1ddff1fe8ebe815a3852795 /extensions | |
parent | 1590a19cb56445227a90d7e9e8ed6a11ea7fddf0 (diff) |
Constness issues
Change-Id: Ib72b6225f20e1e53e9d811ddb2d266f17f57404b
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/activex/SOActiveX.cxx | 40 | ||||
-rw-r--r-- | extensions/source/activex/SOActiveX.h | 8 | ||||
-rw-r--r-- | extensions/source/activex/SODispatchInterceptor.cxx | 10 | ||||
-rw-r--r-- | extensions/source/activex/com_uno_helper.h | 4 |
4 files changed, 31 insertions, 31 deletions
diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx index 4fa427f3e8f3..95e362de934d 100644 --- a/extensions/source/activex/SOActiveX.cxx +++ b/extensions/source/activex/SOActiveX.cxx @@ -60,7 +60,7 @@ void OutputError_Impl( HWND hw, HRESULT ErrorCode ) } HRESULT ExecuteFunc( IDispatch* idispUnoObject, - OLECHAR* sFuncName, + OLECHAR const * sFuncName, CComVariant* params, unsigned int count, CComVariant* pResult ) @@ -69,7 +69,7 @@ HRESULT ExecuteFunc( IDispatch* idispUnoObject, return E_FAIL; DISPID id; - HRESULT hr = idispUnoObject->GetIDsOfNames( IID_NULL, &sFuncName, 1, LOCALE_USER_DEFAULT, &id); + HRESULT hr = idispUnoObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sFuncName), 1, LOCALE_USER_DEFAULT, &id); if( !SUCCEEDED( hr ) ) return hr; DISPPARAMS dispparams= { params, 0, count, 0}; @@ -88,7 +88,7 @@ HRESULT ExecuteFunc( IDispatch* idispUnoObject, } HRESULT GetIDispByFunc( IDispatch* idispUnoObject, - OLECHAR* sFuncName, + OLECHAR const * sFuncName, CComVariant* params, unsigned int count, CComPtr<IDispatch>& pdispResult ) @@ -109,14 +109,14 @@ HRESULT GetIDispByFunc( IDispatch* idispUnoObject, } HRESULT PutPropertiesToIDisp( IDispatch* pdispObject, - OLECHAR** sMemberNames, + OLECHAR const ** sMemberNames, CComVariant* pVariant, unsigned int count ) { for( unsigned int ind = 0; ind < count; ind++ ) { DISPID id; - HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, &sMemberNames[ind], 1, LOCALE_USER_DEFAULT, &id ); + HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sMemberNames[ind]), 1, LOCALE_USER_DEFAULT, &id ); if( !SUCCEEDED( hr ) ) return hr; hr = CComDispatchDriver::PutProperty( pdispObject, id, &pVariant[ind] ); @@ -127,14 +127,14 @@ HRESULT PutPropertiesToIDisp( IDispatch* pdispObject, } HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject, - OLECHAR** sMemberNames, + OLECHAR const ** sMemberNames, CComVariant* pVariant, unsigned int count ) { for( unsigned int ind = 0; ind < count; ind++ ) { DISPID id; - HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, &sMemberNames[ind], 1, LOCALE_USER_DEFAULT, &id ); + HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sMemberNames[ind]), 1, LOCALE_USER_DEFAULT, &id ); if( !SUCCEEDED( hr ) ) return hr; hr = CComDispatchDriver::GetProperty( pdispObject, id, &pVariant[ind] ); @@ -390,7 +390,7 @@ STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG /*pErrorLog*/ return hr; mbReadyForActivation = FALSE; - hr = CBindStatusCallback<CSOActiveX>::Download( this, &CSOActiveX::CallbackCreateXInputStream, mCurFileUrl, m_spClientSite, FALSE ); + hr = CBindStatusCallback<CSOActiveX>::Download( this, &CSOActiveX::CallbackCreateXInputStream, const_cast<OLECHAR *>(mCurFileUrl), m_spClientSite, FALSE ); if ( hr == MK_S_ASYNCHRONOUS ) hr = S_OK; @@ -406,20 +406,20 @@ STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG /*pErrorLog*/ return hr; } -HRESULT CSOActiveX::GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult ) +HRESULT CSOActiveX::GetUnoStruct( OLECHAR const * sStructName, CComPtr<IDispatch>& pdispResult ) { CComVariant aComStruct( sStructName ); return GetIDispByFunc( mpDispFactory, L"Bridge_GetStruct", &aComStruct, 1, pdispResult ); } -HRESULT CSOActiveX::GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl ) +HRESULT CSOActiveX::GetUrlStruct( OLECHAR const * sUrl, CComPtr<IDispatch>& pdispUrl ) { HRESULT hr = GetUnoStruct( L"com.sun.star.util.URL", pdispUrl ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sURLMemberName = L"Complete"; + OLECHAR const * sURLMemberName = L"Complete"; DISPID nURLID; - hr = pdispUrl->GetIDsOfNames( IID_NULL, &sURLMemberName, 1, LOCALE_USER_DEFAULT, &nURLID ); + hr = pdispUrl->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sURLMemberName), 1, LOCALE_USER_DEFAULT, &nURLID ); if( !SUCCEEDED( hr ) ) return hr; CComVariant aComUrl( sUrl ); hr = CComDispatchDriver::PutProperty( pdispUrl, nURLID, &aComUrl ); @@ -452,7 +452,7 @@ HRESULT CSOActiveX::SetLayoutManagerProps() return E_FAIL; CComVariant pVarLayoutMgr; - OLECHAR* sLMPropName = L"LayoutManager"; + OLECHAR const * sLMPropName = L"LayoutManager"; HRESULT hr = GetPropertiesFromIDisp( mpDispFrame, &sLMPropName, &pVarLayoutMgr, 1 ); if( pVarLayoutMgr.vt != VT_DISPATCH || pVarLayoutMgr.pdispVal == NULL ) return E_FAIL; @@ -463,7 +463,7 @@ HRESULT CSOActiveX::SetLayoutManagerProps() if( !SUCCEEDED( hr ) || !pdispLM ) return E_FAIL; - OLECHAR* sATName = L"AutomaticToolbars"; + OLECHAR const * sATName = L"AutomaticToolbars"; CComVariant pATProp; pATProp.vt = VT_BOOL; pATProp.boolVal = VARIANT_FALSE ; hr = PutPropertiesToIDisp( pdispLM, &sATName, &pATProp, 1 ); @@ -486,7 +486,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height ) HRESULT hr = GetUnoStruct( L"com.sun.star.awt.Rectangle", pdispRectangle ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sRectMemberNames[4] = { L"X", + OLECHAR const * sRectMemberNames[4] = { L"X", L"Y", L"Width", L"Height" }; @@ -502,7 +502,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height ) if( !SUCCEEDED( hr ) ) return hr; // fill in descriptor with info - OLECHAR* sDescriptorMemberNames[6] = { L"Type", + OLECHAR const * sDescriptorMemberNames[6] = { L"Type", L"WindowServiceName", L"ParentIndex", L"Parent", @@ -636,7 +636,7 @@ HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArg HRESULT hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; + OLECHAR const * sPropMemberNames[2] = { L"Name", L"Value" }; CComVariant pPropVar[2]; pPropVar[0] = CComVariant( sArgName ); pPropVar[1].vt = VT_BOOL; pPropVar[1].boolVal = sArgVal ? VARIANT_TRUE : VARIANT_FALSE ; @@ -659,7 +659,7 @@ HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArg return S_OK; } -HRESULT CSOActiveX::CallDispatchMethod( OLECHAR* sUrl, +HRESULT CSOActiveX::CallDispatchMethod( OLECHAR const * sUrl, CComVariant* aArgNames, CComVariant* aArgVals, unsigned int count ) @@ -687,7 +687,7 @@ HRESULT CSOActiveX::CallDispatchMethod( OLECHAR* sUrl, hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; + OLECHAR const * sPropMemberNames[2] = { L"Name", L"Value" }; CComVariant pPropVar[2]; pPropVar[0] = aArgNames[ix]; pPropVar[1] = aArgVals[ix]; @@ -822,7 +822,7 @@ HRESULT CSOActiveX::LoadURLToFrame( ) { // this is a presentation // let the slide show be shown in the document window - OLECHAR* pPropName = L"IsFullScreen"; + OLECHAR const * pPropName = L"IsFullScreen"; CComVariant pPresProp; pPresProp.vt = VT_BOOL; pPresProp.boolVal = VARIANT_FALSE ; hr = PutPropertiesToIDisp( pdispPres, &pPropName, &pPresProp, 1 ); diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h index 23824a20a9ee..570b37ee253b 100644 --- a/extensions/source/activex/SOActiveX.h +++ b/extensions/source/activex/SOActiveX.h @@ -87,7 +87,7 @@ protected: CComPtr<IDispatch> mpDispFrame; CComPtr<IDispatch> mpInstanceLocker; CComPtr<IDispatch> mpDispWin; - OLECHAR* mCurFileUrl; + OLECHAR const * mCurFileUrl; BOOL mbLoad; BOOL mbViewOnly; WNDCLASS mPWinClass; @@ -185,11 +185,11 @@ public: HRESULT SetLayoutManagerProps(); HRESULT CreateFrameOldWay( HWND hwnd, int width, int height ); - HRESULT GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult ); + HRESULT GetUnoStruct( OLECHAR const * sStructName, CComPtr<IDispatch>& pdispResult ); HRESULT LoadURLToFrame(); - HRESULT CallDispatchMethod( OLECHAR* sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count ); + HRESULT CallDispatchMethod( OLECHAR const * sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count ); HRESULT CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal ); - HRESULT GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl ); + HRESULT GetUrlStruct( OLECHAR const * sUrl, CComPtr<IDispatch>& pdispUrl ); HRESULT Cleanup(); HRESULT TerminateOffice(); HRESULT GetURL( const OLECHAR* url, diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx index 035d613853ca..8df2813b44ad 100644 --- a/extensions/source/activex/SODispatchInterceptor.cxx +++ b/extensions/source/activex/SODispatchInterceptor.cxx @@ -66,9 +66,9 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL, if ( !aURL || !retVal ) return E_FAIL; CComVariant aTargetUrl; - OLECHAR* sURLMemberName = L"Complete"; + OLECHAR const * sURLMemberName = L"Complete"; DISPID nURLID; - HRESULT hr = aURL->GetIDsOfNames( IID_NULL, &sURLMemberName, 1, LOCALE_USER_DEFAULT, &nURLID ); + HRESULT hr = aURL->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sURLMemberName), 1, LOCALE_USER_DEFAULT, &nURLID ); if( !SUCCEEDED( hr ) ) return hr; hr = CComDispatchDriver::GetProperty( aURL, nURLID, &aTargetUrl ); @@ -139,7 +139,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts, SafeArrayGetElement( aDescripts, &ind, pElem ); if( pElem ) { - OLECHAR* pMemberNames[3] = { L"FeatureURL", L"FrameName", L"SearchFlags" }; + OLECHAR const * pMemberNames[3] = { L"FeatureURL", L"FrameName", L"SearchFlags" }; CComVariant pValues[3]; hr = GetPropertiesFromIDisp( pElem, pMemberNames, pValues, 3 ); if( !SUCCEEDED( hr ) ) return hr; @@ -160,7 +160,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts, STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR* aArgs) { // get url from aURL - OLECHAR* pUrlName = L"Complete"; + OLECHAR const * pUrlName = L"Complete"; CComVariant pValue; HRESULT hr = GetPropertiesFromIDisp( aURL, &pUrlName, &pValue, 1 ); if( !SUCCEEDED( hr ) ) return hr; @@ -186,7 +186,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR SafeArrayGetElement( aArgs, &ind, &pVarElem ); if( pVarElem.vt == VT_DISPATCH && pVarElem.pdispVal != NULL ) { - OLECHAR* pMemberNames[2] = { L"Name", L"Value" }; + OLECHAR const * pMemberNames[2] = { L"Name", L"Value" }; CComVariant pValues[2]; hr = GetPropertiesFromIDisp( pVarElem.pdispVal, pMemberNames, pValues, 2 ); if( !SUCCEEDED( hr ) ) return hr; diff --git a/extensions/source/activex/com_uno_helper.h b/extensions/source/activex/com_uno_helper.h index d0caa0ac0911..a3d09ea2350f 100644 --- a/extensions/source/activex/com_uno_helper.h +++ b/extensions/source/activex/com_uno_helper.h @@ -20,7 +20,7 @@ #include "stdafx2.h" HRESULT ExecuteFunc( IDispatch* idispUnoObject, - OLECHAR* sFuncName, + OLECHAR const * sFuncName, CComVariant* params, unsigned int count, CComVariant* pResult ); @@ -37,7 +37,7 @@ HRESULT PutPropertiesToIDisp( IDispatch* pdispObject, unsigned int count ); HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject, - OLECHAR** sMemberNames, + OLECHAR const ** sMemberNames, CComVariant* pVariant, unsigned int count ); |