summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-08-08 21:00:01 +0300
committerTor Lillqvist <tml@iki.fi>2011-08-08 21:20:53 +0300
commit8cd859d9a69a199886355aa8655bb3240536280f (patch)
tree6472d586e6372b5eddb5ff2a764560cae1da1de4 /cppuhelper
parentc8eefebef629e0c5a87e2230fbd255cca98cc8b6 (diff)
For iOS just link directly to the bootstrap component
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/shlib.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 30c7c1a7e66e..8e8fc33cf447 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -441,6 +441,20 @@ Reference< XInterface > invokeComponentFactory(
} // namespace
+#ifdef IOS
+extern "C"
+{
+ // In stoc/source/bootstrap/services.cxx.
+
+ // Sure, some public header would be a better place for this. But
+ // it can't be in some stoc header as that hasn't been built and
+ // delivered yet when cppuhelper is built.
+
+ extern void * bootstrap_component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
+}
+#endif
+
Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUString const & rLibName, OUString const & rPath,
OUString const & rImplName,
@@ -483,7 +497,17 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUString aExcMsg;
OUString aGetFactoryName = rPrefix + OUSTR(COMPONENT_GETFACTORY);
- oslGenericFunction pSym = osl_getFunctionSymbol( lib, aGetFactoryName.pData );
+
+ oslGenericFunction pSym = NULL;
+
+#ifdef IOS
+ if ( rLibName.equals( OUSTR("bootstrap.uno" SAL_DLLEXTENSION)) )
+ pSym = (oslGenericFunction) bootstrap_component_getFactory;
+#endif
+
+ if ( pSym == NULL )
+ pSym = osl_getFunctionSymbol( lib, aGetFactoryName.pData );
+
if (pSym != 0)
{
xRet = invokeComponentFactory( pSym, lib, aModulePath, rImplName, xMgr, xKey, rPrefix, aExcMsg );