From b349c5f4f6340ca20c212e8d53baad5844b33964 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(+) (limited to 'cppuhelper') diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index 4df655bad33c..1eb73ab1b21a 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