summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-08-01 21:10:14 +0300
committerTor Lillqvist <tml@iki.fi>2011-08-01 21:10:14 +0300
commitb349c5f4f6340ca20c212e8d53baad5844b33964 (patch)
treef48a32dac88843453e15ef14bd7c282f84b7971f /cppuhelper
parent6255681095b81e82aa8305655a531d1317f424e6 (diff)
Try to use the app executable module on iOS for now
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/shlib.cxx11
1 files changed, 11 insertions, 0 deletions
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;