diff options
author | David Tardon <dtardon@redhat.com> | 2012-04-01 11:55:47 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-04-01 12:21:00 +0200 |
commit | 59c0f8f452a538308a9d4098cdc8319b884c3c81 (patch) | |
tree | 6272bb19d30661acdc9995f8a18ce11e9f2fe6b0 /stoc/source | |
parent | add $(gb_STDLIBS) to linked libs (diff) | |
parent | use better/correct assert macros in ucalc (diff) | |
download | core-59c0f8f452a538308a9d4098cdc8319b884c3c81.tar.gz core-59c0f8f452a538308a9d4098cdc8319b884c3c81.zip |
merge origin/master
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/bootstrap/services.cxx | 4 | ||||
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 2 | ||||
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 12 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 12 | ||||
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 7 | ||||
-rw-r--r-- | stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx | 2 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 4 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 6 | ||||
-rw-r--r-- | stoc/source/simpleregistry/textualservices.cxx | 2 | ||||
-rw-r--r-- | stoc/source/tdmanager/tdmgr.cxx | 2 |
10 files changed, 34 insertions, 19 deletions
diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx index e92acad12494..5ddc729a794f 100644 --- a/stoc/source/bootstrap/services.cxx +++ b/stoc/source/bootstrap/services.cxx @@ -118,14 +118,14 @@ static struct ImplementationEntry g_entries[] = extern "C" { -#ifndef IOS +#ifndef DISABLE_DYNLOADING SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) { return g_moduleCount.canUnload( &g_moduleCount , pTime ); } #endif -#ifdef IOS +#ifdef DISABLE_DYNLOADING #define component_getFactory bootstrap_component_getFactory #endif diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index eb35840b1642..1296ccd1ec70 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -159,7 +159,7 @@ void IdlReflectionServiceImpl::dispose() MutexGuard aGuard( _aComponentMutex ); _aElements.clear(); #ifdef TEST_LIST_CLASSES - OSL_ENSURE( g_aClassNames.size() == 0, "### idl classes still alive!" ); + OSL_ENSURE( g_aClassNames.empty(), "### idl classes still alive!" ); ClassNameList::const_iterator iPos( g_aClassNames.begin() ); while (iPos != g_aClassNames.end()) { diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index aad88991bfaf..a1f239f84084 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2346,7 +2346,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else { - if( aMethName != OUString( RTL_CONSTASCII_USTRINGPARAM("queryInterface")) ) + if( !aMethName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("queryInterface")) ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; @@ -2355,7 +2355,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else if( rxMethod_i->getDeclaringClass()->equals( mxAggregationClass ) ) { - if( aMethName == OUString( RTL_CONSTASCII_USTRINGPARAM("setDelegator")) ) + if( aMethName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setDelegator")) ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; @@ -2388,7 +2388,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // Ist es eine get-Methode? aStartStr = aMethName.copy( 0, 3 ); - if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("get")) ) + if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("get")) ) { // Namen der potentiellen Property aPropName = aMethName.copy( 3 ); @@ -2461,7 +2461,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( OUString aMethName2 = rxMethod_k->getName(); OUString aStartStr2 = aMethName2.copy( 0, 3 ); // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! - if( !( aStartStr2 == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) ) ) + if( !( aStartStr2.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) ) continue; // Ist es denn der gleiche Name? @@ -2509,7 +2509,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } // Ist es eine addListener-Methode? - else if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("add")) ) + else if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("add")) ) { OUString aListenerStr( RTL_CONSTASCII_USTRINGPARAM("Listener" ) ); @@ -2598,7 +2598,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // Ist es eine set-Methode ohne zugehoerige get-Methode? aStartStr = aMethName.copy( 0, 3 ); - if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) ) + if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) { // Namen der potentiellen Property aPropName = aMethName.copy( 3 ); diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 14437eec041b..25d0000fea0d 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -782,8 +782,12 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) JNIEnv * pMainThreadEnv = 0; javaFrameworkError errcode = JFW_E_NONE; - errcode = jfw_startVM(arOptions, index, & m_pJavaVm, - & pMainThreadEnv); + + if (getenv("STOC_FORCE_NO_JRE")) + errcode = JFW_E_NO_SELECT; + else + errcode = jfw_startVM(arOptions, index, & m_pJavaVm, + & pMainThreadEnv); bool bStarted = false; switch (errcode) @@ -794,6 +798,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) // No Java configured. We silenty run the java configuration // Java. javaFrameworkError errFind = jfw_findAndSelectJRE( NULL ); + if (getenv("STOC_FORCE_NO_JRE")) + errFind = JFW_E_NO_JAVA_FOUND; if (errFind == JFW_E_NONE) { continue; @@ -1341,7 +1347,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); rtl::OUString sName( jcharName); jboolean bIsSandbox; - if (sName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lib.sandbox.SandboxSecurity"))) + if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.lib.sandbox.SandboxSecurity"))) bIsSandbox= JNI_TRUE; else bIsSandbox= JNI_FALSE; diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index cd690a23e563..b2327262a472 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -229,9 +229,16 @@ sal_Bool SAL_CALL DllComponentLoader::writeRegistryInfo( throw(CannotRegisterImplementationException, RuntimeException) { +#ifdef DISABLE_DYNLOADING + (void) xKey; + (void) rLibName; + OSL_FAIL( "DllComponentLoader::writeRegistryInfo() should not be called I think?" ); + return sal_False; +#else writeSharedLibComponentInfo( expand_url( rLibName ), OUString(), m_xSMgr, xKey ); return sal_True; +#endif } } diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index d5bcd9b08575..cfc59a186b77 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -171,7 +171,7 @@ TypeDescriptionEnumerationImpl::createInstance( if ( !bOpenKeySucceeded ) throw reflection::NoSuchTypeNameException(); - if ( aModuleKeys.size() == 0 ) + if ( aModuleKeys.empty() ) throw reflection::InvalidTypeNameException(); return rtl::Reference< TypeDescriptionEnumerationImpl >( diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 93715e8c48b3..d8327344d4ef 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -419,11 +419,11 @@ bool FilePermission::implies( Permission const & perm ) const SAL_THROW(()) #ifdef SAL_W32 return ((0 == ::rtl_ustr_compareIgnoreAsciiCase_WithLength( demanded.m_url.pData->buffer, len, m_url.pData->buffer, len )) && - (0 > demanded.m_url.indexOf( '/', len ))); // in addition, no deeper pathes + (0 > demanded.m_url.indexOf( '/', len ))); // in addition, no deeper paths #else return ((0 == ::rtl_ustr_reverseCompare_WithLength( demanded.m_url.pData->buffer, len, m_url.pData->buffer, len )) && - (0 > demanded.m_url.indexOf( '/', len ))); // in addition, no deeper pathes + (0 > demanded.m_url.indexOf( '/', len ))); // in addition, no deeper paths #endif } return false; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index bb65892578a3..1671321cac23 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -890,7 +890,7 @@ void OServiceManager::onUnloadingNotify() } // delete elements from m_ServiceMap CIT_DMM it_end2= listDeleteServiceMap.end(); - for( CIT_DMM it_i2= listDeleteServiceMap.begin(); it_i2 != it_end2; it_i2++) + for( CIT_DMM it_i2= listDeleteServiceMap.begin(); it_i2 != it_end2; ++it_i2) m_ServiceMap.erase( *it_i2); // find elements in m_ImplementationNameMap @@ -914,7 +914,7 @@ void OServiceManager::onUnloadingNotify() } // delete elements from m_ImplementationNameMap CIT_DM it_end4= listDeleteImplementationNameMap.end(); - for( CIT_DM it_i4= listDeleteImplementationNameMap.begin(); it_i4 != it_end4; it_i4++) + for( CIT_DM it_i4= listDeleteImplementationNameMap.begin(); it_i4 != it_end4; ++it_i4) m_ImplementationNameMap.erase( *it_i4); // find elements in m_ImplementationMap @@ -938,7 +938,7 @@ void OServiceManager::onUnloadingNotify() } // delete elements from m_ImplementationMap CIT_DS it_end6= listDeleteImplementationMap.end(); - for( CIT_DS it_i6= listDeleteImplementationMap.begin(); it_i6 != it_end6; it_i6++) + for( CIT_DS it_i6= listDeleteImplementationMap.begin(); it_i6 != it_end6; ++it_i6) m_ImplementationMap.erase( *it_i6); // remove Event listener before the factories are released. diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx index 37540c820134..ad24a4454550 100644 --- a/stoc/source/simpleregistry/textualservices.cxx +++ b/stoc/source/simpleregistry/textualservices.cxx @@ -326,6 +326,7 @@ void Parser::handleComponent() { ": <component> is missing \"loader\" attribute"))), css::uno::Reference< css::uno::XInterface >()); } +#ifndef DISABLE_DYNLOADING try { attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_); } catch (const rtl::MalformedUriException & e) { @@ -336,6 +337,7 @@ void Parser::handleComponent() { e.getMessage()), css::uno::Reference< css::uno::XInterface >()); } +#endif } void Parser::handleImplementation() { diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index d3d5ced731d5..e8a8256395c3 100644 --- a/stoc/source/tdmanager/tdmgr.cxx +++ b/stoc/source/tdmanager/tdmgr.cxx @@ -290,7 +290,7 @@ ManagerImpl::ManagerImpl( //__________________________________________________________________________________________________ ManagerImpl::~ManagerImpl() { - OSL_ENSURE( _aProviders.size() == 0, "### still providers left!" ); + OSL_ENSURE( _aProviders.empty(), "### still providers left!" ); OSL_TRACE( "> TypeDescriptionManager shut down. <" ); ::g_moduleCount.modCnt.release( &::g_moduleCount.modCnt ); } |