From a90f6b270c4570c001dc3c6bec2e2a43a665b2e5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 1 Aug 2011 21:10:14 +0300 Subject: Try to use the app executable module on iOS for now --- cppuhelper/source/shlib.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index a97945431..8acfb334b 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -354,6 +354,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory( OUString const & rPrefix ) SAL_THROW( (loader::CannotActivateFactoryException) ) { +#ifndef IOS OUString aModulePath( makeComponentPath( rLibName, rPath ) ); if (! checkAccessPath( &aModulePath )) { @@ -371,6 +372,16 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory( OUSTR("loading component library failed: ") + aModulePath, Reference< XInterface >() ); } +#else + oslModule lib; + OUString aModulePath(OUSTR("MAIN")); + if (! osl_getModuleHandle( NULL, &lib)) + { + throw loader::CannotActivateFactoryException( + OUSTR("osl_getModuleHandle of the executable: "), + Reference< XInterface >() ); + } +#endif Reference< XInterface > xRet; -- cgit v1.2.3