From 97593ae24a98daca89fad176dc2492e582b3a821 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 7 Oct 2012 07:52:26 +0300 Subject: Handle lack of module loading/unloading API when DISABLE_DYNLOADING There are basicically two classes of cases: 1) Where the code is for obscure historical reasons or what I see as misguided "optimization" split into a more libraries than necessary, and these then are loaded at run-time. Instead, just use direct linking. 2) Where dynamic loading is part of the functionality offered to some upper (scripting etc) layer, or where some system-specific non-LO library is loaded dynamically, as it is not necessarily present on end-user machines. Can't have such in the DISABLE_DYNLOADING case. Change-Id: I9eceac5fb635245def2f4f3320821447bb7cd8c0 --- toolkit/source/helper/accessibilityclient.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toolkit') diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index cbc729362895..4a1cb993fb14 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -178,7 +178,11 @@ namespace toolkit } //-------------------------------------------------------------------- +#ifndef DISABLE_DYNLOADING extern "C" { static void SAL_CALL thisModule() {} } +#else + extern "C" void *getStandardAccessibleFactory(); +#endif void AccessibilityClient::ensureInitialized() { @@ -194,6 +198,7 @@ namespace toolkit // load the library implementing the factory if ( !s_pFactory.get() ) { +#ifndef DISABLE_DYNLOADING const ::rtl::OUString sModuleName( SVLIBRARY( "acc" ) ); s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 ); if ( s_hAccessibleImplementationModule != NULL ) @@ -205,6 +210,9 @@ namespace toolkit } OSL_ENSURE( s_pAccessibleFactoryFunc, "AccessibilityClient::ensureInitialized: could not load the library, or not retrieve the needed symbol!" ); +#else + s_pAccessibleFactoryFunc = getStandardAccessibleFactory; +#endif // get a factory instance if ( s_pAccessibleFactoryFunc ) -- cgit v1.2.3