diff options
-rw-r--r-- | extensions/source/plugin/unx/npnapi.cxx | 6 | ||||
-rw-r--r-- | include/vcl/ppdparser.hxx | 2 | ||||
-rw-r--r-- | io/source/stm/odata.cxx | 2 | ||||
-rw-r--r-- | javaunohelper/source/bootstrap.cxx | 4 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 4 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 5 | ||||
-rw-r--r-- | sot/source/base/filelist.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stg.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.hxx | 4 | ||||
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 8 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 2 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 2 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 2 |
14 files changed, 23 insertions, 24 deletions
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 69b39b2b9c16..3bdcd7a50ec6 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -727,7 +727,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) gtk_widget_show( pInst->pGtkWidget ); gtk_container_add( GTK_CONTAINER(pInst->pGtkWindow), pInst->pGtkWidget ); gtk_widget_show_all( pInst->pGtkWindow ); - pInst->window.window = (void *)(sal_uIntPtr)gtk_socket_get_id( GTK_SOCKET(pInst->pGtkWidget ) ); + pInst->window.window = reinterpret_cast<void *>(gtk_socket_get_id( GTK_SOCKET(pInst->pGtkWidget ) )); XSync( pAppDisplay, False ); @@ -764,11 +764,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { if( ! pInst->pWidget ) { - pInst->pWidget = CreateNewShell( &(pInst->pShell), (Window)pWindow->window ); + pInst->pWidget = CreateNewShell( &(pInst->pShell), reinterpret_cast<Window>(pWindow->window) ); } // fill in NPWindow and NPCallbackStruct - pInst->window.window = (void*)XtWindow( (Widget)pInst->pWidget ); + pInst->window.window = reinterpret_cast<void*>(XtWindow( (Widget)pInst->pWidget )); pInst->window.x = 0; pInst->window.y = 0; pInst->window.width = pWindow->width; diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx index 79f50a68d3fd..ddd18622e823 100644 --- a/include/vcl/ppdparser.hxx +++ b/include/vcl/ppdparser.hxx @@ -108,7 +108,7 @@ public: struct PPDKeyhash { size_t operator()( const PPDKey * pKey) const - { return (size_t)pKey; } + { return reinterpret_cast<size_t>(pKey); } }; diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index 556c985b2fb3..163c07e816e6 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -909,7 +909,7 @@ struct hashObjectContainer_Impl { size_t operator()(const Reference< XInterface > & xRef) const { - return (size_t)xRef.get(); + return reinterpret_cast<size_t>(xRef.get()); } }; diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index fe26502b4fde..1e800ddb3563 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -76,7 +76,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( while (nPos < len) { // name - jstring jstr = (jstring)jni_env->GetObjectArrayElement( jpairs, nPos ); + jstring jstr = static_cast<jstring>(jni_env->GetObjectArrayElement( jpairs, nPos )); if (JNI_FALSE != jni_env->ExceptionCheck()) { jni_env->ExceptionClear(); @@ -86,7 +86,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( { OUString name( ::javaunohelper::jstring_to_oustring( jstr, jni_env ) ); // value - jstr = (jstring)jni_env->GetObjectArrayElement( jpairs, nPos +1 ); + jstr = static_cast<jstring>(jni_env->GetObjectArrayElement( jpairs, nPos +1 )); if (JNI_FALSE != jni_env->ExceptionCheck()) { jni_env->ExceptionClear(); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index d32beff86104..ab5153dd033f 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -678,7 +678,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( // all versions below 1.5.1 int n = 0; options[n].optionString= (char *) "abort"; - options[n].extraInfo= (void* )(sal_IntPtr)abort_handler; + options[n].extraInfo= reinterpret_cast<void*>(abort_handler); ++n; OString sClassPathOption; for (int i = 0; i < cOptions; i++) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 0815ea83a704..eb840b6207e7 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -139,7 +139,7 @@ namespace OUString getLibraryLocation() { OUString libraryFileUrl; - OSL_VERIFY(osl::Module::getUrlFromAddress((void *)(sal_IntPtr)getLibraryLocation, libraryFileUrl)); + OSL_VERIFY(osl::Module::getUrlFromAddress(reinterpret_cast<void *>(getLibraryLocation), libraryFileUrl)); return getDirFromFile(libraryFileUrl); } @@ -388,7 +388,7 @@ bool getJavaProps(const OUString & exePath, //next to the plugin, except on OS X where it is in ../Resources/java relative //to the plugin. OUString sThisLib; - if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps, + if (osl_getModuleURLFromAddress(reinterpret_cast<void *>(&getJavaProps), & sThisLib.pData) == sal_False) { return false; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index bda00dedae6a..8f4c7545845e 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -561,7 +561,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const { sal_Int64 that = tunnel->getSomething( ::pyuno::Adapter::getUnoTunnelImplementationId() ); if( that ) - return ((Adapter*)sal::static_int_cast< sal_IntPtr >(that))->getWrappedObject(); + return reinterpret_cast<Adapter*>(that)->getWrappedObject(); } } //This is just like the struct case: @@ -837,8 +837,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con // object got already bridged ! Reference< com::sun::star::lang::XUnoTunnel > tunnel( adapterObject, UNO_QUERY ); - Adapter *pAdapter = ( Adapter * ) - sal::static_int_cast< sal_IntPtr >( + Adapter *pAdapter = reinterpret_cast<Adapter*>( tunnel->getSomething( ::pyuno::Adapter::getUnoTunnelImplementationId() ) ); diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx index 42113063819b..750658c56122 100644 --- a/sot/source/base/filelist.cxx +++ b/sot/source/base/filelist.cxx @@ -73,7 +73,7 @@ void FileList::Save( SvStream& rOStm ) void FileList::Assign( const SvDataCopyStream& rCopyStream ) { - *this = (const FileList&)rCopyStream; + *this = static_cast<const FileList&>(rCopyStream); } /****************************************************************************** diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 84219df91e69..551b00a3c156 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -827,7 +827,7 @@ bool Storage::MoveTo( const OUString& rElem, BaseStorage* pODest, const OUString Storage *pOther = PTR_CAST( Storage, pODest ); if( pOther && pIo == pOther->pIo && rElem == rNew ) { - Storage *p = (Storage*) pODest; + Storage *p = static_cast<Storage*>(pODest); Storage *pDest = p; // both storages are conventional storages, use implementation dependent code if( !pElem->IsContained( pDest->pEntry ) ) diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx index 6ebea95c47f7..9cb9f25ed181 100644 --- a/sot/source/sdstor/stgdir.hxx +++ b/sot/source/sdstor/stgdir.hxx @@ -114,8 +114,8 @@ class StgIterator : public StgAvlIterator { public: StgIterator( StgDirEntry& rStg ) : StgAvlIterator( rStg.pDown ) {} - StgDirEntry* First() { return (StgDirEntry*) StgAvlIterator::First(); } - StgDirEntry* Next() { return (StgDirEntry*) StgAvlIterator::Next(); } + StgDirEntry* First() { return static_cast<StgDirEntry*>( StgAvlIterator::First() ); } + StgDirEntry* Next() { return static_cast<StgDirEntry*>( StgAvlIterator::Next() ); } }; #endif diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 2051b08124f8..bd7619768228 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -466,7 +466,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal case MAP_FIELD: { - Reference<XIdlField> xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlField> xField = static_cast<XIdlField*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); Reference<XIdlField2> xField2(xField, UNO_QUERY); if( xField2.is() ) { @@ -491,7 +491,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal case MAP_SETONLY: { // Retrieve set-Methods - Reference<XIdlMethod> xMethod = (XIdlMethod*)(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlMethod> xMethod = static_cast<XIdlMethod*>(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence<Any> args( 1 ); @@ -582,7 +582,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_ case MAP_FIELD: { - Reference<XIdlField> xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlField> xField = static_cast<XIdlField*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); if( xField.is() ) { aRet = xField->get( obj ); @@ -600,7 +600,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_ case MAP_GETSET: { // get-Methode holen - Reference<XIdlMethod> xMethod = (XIdlMethod*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlMethod> xMethod = static_cast<XIdlMethod*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence<Any> args; diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 99fd73d1466c..8cd68ce79f4c 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -77,7 +77,7 @@ static OUString invadp_getImplementationName() struct hash_ptr { inline size_t operator() ( void * p ) const - { return (size_t)p; } + { return reinterpret_cast<size_t>(p); } }; typedef boost::unordered_set< void *, hash_ptr, equal_to< void * > > t_ptr_set; typedef boost::unordered_map< void *, t_ptr_set, hash_ptr, equal_to< void * > > t_ptr_map; diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index bb0bd3590ec2..6e9c8fdba87b 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1245,7 +1245,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java.lang.Class", 0); jmethodID jmName= pJNIEnv->GetMethodID( jcClass,"getName","()Ljava/lang/String;"); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.lang.Class.getName", 0); - jstring jsClass= (jstring) pJNIEnv->CallObjectMethod( jcSec, jmName); + jstring jsClass= static_cast<jstring>(pJNIEnv->CallObjectMethod( jcSec, jmName)); const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); OUString sName( jcharName); jboolean bIsSandbox; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 45d64e13a20b..ca2ab6aa51c3 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -132,7 +132,7 @@ struct hashRef_Impl { // query to XInterface. The cast to XInterface* must be the same for the same object Reference<XInterface > x( Reference<XInterface >::query( rName ) ); - return (size_t)x.get(); + return reinterpret_cast<size_t>(x.get()); } }; |