diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-01-23 16:56:33 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-01-23 17:12:03 +0000 |
commit | 847494bc43c4647b28464b6159760bbbf65e7a60 (patch) | |
tree | f23081622e8d3720a9f01d559eb3a1be6eb1ede5 /cppuhelper/source | |
parent | android: setup the unorc path correctly into assets (diff) | |
download | core-847494bc43c4647b28464b6159760bbbf65e7a60.tar.gz core-847494bc43c4647b28464b6159760bbbf65e7a60.zip |
android: nasty hack to overcome unpleasantness of UNO bootstrapping
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/bootstrap.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index 05d404b49728..063bece4d8a0 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -98,8 +98,19 @@ Bootstrap const & get_unorc() SAL_THROW( () ) static rtlBootstrapHandle s_bstrap = 0; if (! s_bstrap) { +#ifdef ANDROID + // Wouldn't it be lovely to avoid this fugly hard-coding. + // The problem is that the 'create_boostrap_macro_expander_factory()' + // required for bootstrapping services, calls cppu::get_unorc directly + // instead of re-using the BoostrapHandle from: + // defaultBootstrap_InitialComponentContext + // and since rtlBootstrapHandle is not ref-counted doing anything + // clean here is hardish. + OUString iniName( RTL_CONSTASCII_USTRINGPARAM( "file:///assets/program/unorc" ) ); +#else OUString iniName( get_this_libpath() + OUSTR("/" SAL_CONFIGFILE("uno")) ); +#endif rtlBootstrapHandle bstrap = rtl_bootstrap_args_open( iniName.pData ); ClearableMutexGuard guard( Mutex::getGlobalMutex() ); |