Kaydet (Commit) 847494bc authored tarafından Michael Meeks's avatar Michael Meeks

android: nasty hack to overcome unpleasantness of UNO bootstrapping

üst 91c7d943
...@@ -98,8 +98,19 @@ Bootstrap const & get_unorc() SAL_THROW( () ) ...@@ -98,8 +98,19 @@ Bootstrap const & get_unorc() SAL_THROW( () )
static rtlBootstrapHandle s_bstrap = 0; static rtlBootstrapHandle s_bstrap = 0;
if (! s_bstrap) 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( OUString iniName(
get_this_libpath() + OUSTR("/" SAL_CONFIGFILE("uno")) ); get_this_libpath() + OUSTR("/" SAL_CONFIGFILE("uno")) );
#endif
rtlBootstrapHandle bstrap = rtl_bootstrap_args_open( iniName.pData ); rtlBootstrapHandle bstrap = rtl_bootstrap_args_open( iniName.pData );
ClearableMutexGuard guard( Mutex::getGlobalMutex() ); ClearableMutexGuard guard( Mutex::getGlobalMutex() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment