diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-08-01 21:10:14 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-08-01 21:10:14 +0300 |
commit | a90f6b270c4570c001dc3c6bec2e2a43a665b2e5 (patch) | |
tree | 5ada394081d66cb78468c904f9bc1296ab18ae0c | |
parent | fc87095321c08d1ee1845586cae101660843e9ca (diff) |
Try to use the app executable module on iOS for now
-rw-r--r-- | cppuhelper/source/shlib.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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; |