diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-20 22:35:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-24 08:47:00 +0100 |
commit | dc5cb4d47dc7908ce2ea165cb9aa26ceca4f8701 (patch) | |
tree | 1d74b4cb9afdfd36561ae97e27946bba1758bafe /extensions | |
parent | 96fd3d32fa5ab347d08f2ce467b5b449e43ecce6 (diff) |
-Werror,-Wwritable-strings
Change-Id: Ief710b95ab7f41ef5fcb534dabe05311aa1135d3
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/ole/unoconversionutilities.hxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index e3574d8c1c5c..02acbe5bfd02 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1985,11 +1985,11 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva DISPPARAMS param= {0,0,0,0}; CComVariant result; - OLECHAR* sLength= L"length"; + OLECHAR const * sLength= L"length"; // Get the length of the array. Can also be obtained throu GetNextDispID. The // method only returns DISPIDs of the array data. Their names are like "0", "1" etc. - if( FAILED( hr= pdispEx->GetIDsOfNames(IID_NULL, &sLength , 1, LOCALE_USER_DEFAULT, &dispid))) + if( FAILED( hr= pdispEx->GetIDsOfNames(IID_NULL, const_cast<OLECHAR **>(&sLength), 1, LOCALE_USER_DEFAULT, &dispid))) throw BridgeRuntimeError("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" "Conversion of dispatch object to Sequence failed!"); if( FAILED( hr= pdispEx->InvokeEx(dispid, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, @@ -2258,12 +2258,13 @@ sal_Bool UnoConversionUtilities<T>::isJScriptArray(const VARIANT* rvar) { OSL_ENSURE( rvar->vt == VT_DISPATCH, "param is not a VT_DISPATCH"); HRESULT hr; - OLECHAR* sindex= L"0"; + OLECHAR const * sindex= L"0"; DISPID id; if ( rvar->vt == VT_DISPATCH && rvar->pdispVal ) { - hr= rvar->pdispVal->GetIDsOfNames( IID_NULL, &sindex, 1, - LOCALE_USER_DEFAULT, &id); + hr= rvar->pdispVal->GetIDsOfNames( + IID_NULL, const_cast<OLECHAR **>(&sindex), 1, LOCALE_USER_DEFAULT, + &id); if( SUCCEEDED ( hr) ) return sal_True; |