From 847494bc43c4647b28464b6159760bbbf65e7a60 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 23 Jan 2012 16:56:33 +0000 Subject: android: nasty hack to overcome unpleasantness of UNO bootstrapping --- cppuhelper/source/bootstrap.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cppuhelper') 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() ); -- cgit