Put create_bootstrap_macro_expander_factory properly into a header

...and fix the typo in its name.
This commit is contained in:
Stephan Bergmann
2012-04-18 15:59:58 +02:00
parent 7746e42006
commit a26c2ee3c9
4 changed files with 17 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ Bootstrap const & get_unorc() SAL_THROW(())
{
#ifdef ANDROID
// Wouldn't it be lovely to avoid this fugly hard-coding.
// The problem is that the 'create_boostrap_macro_expander_factory()'
// The problem is that the 'create_bootstrap_macro_expander_factory()'
// required for bootstrapping services, calls cppu::get_unorc directly
// instead of re-using the BoostrapHandle from:
// defaultBootstrap_InitialComponentContext

View File

@@ -181,11 +181,9 @@ Reference< XInterface > SAL_CALL service_create(
}
namespace cppu
{
namespace cppuhelper { namespace detail {
//##################################################################################################
Reference< lang::XSingleComponentFactory > create_boostrap_macro_expander_factory() SAL_THROW(())
Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_factory() SAL_THROW(())
{
Reference< lang::XSingleComponentFactory > free(::cppu::createSingleComponentFactory(
service_create,
@@ -203,6 +201,6 @@ Reference< lang::XSingleComponentFactory > create_boostrap_macro_expander_factor
SAL_NO_ACQUIRE);
}
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -31,6 +31,12 @@
#include "sal/config.h"
#include "com/sun/star/uno/Reference.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace lang {
class XSingleComponentFactory;
} } } }
namespace rtl { class OUString; }
namespace cppuhelper {
@@ -54,6 +60,9 @@ namespace detail {
*/
::rtl::OUString expandMacros(rtl::OUString const & text);
com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
create_bootstrap_macro_expander_factory() SAL_THROW(());
}
}

View File

@@ -58,6 +58,8 @@
#include <stdio.h>
#endif
#include "macro_expander.hxx"
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
@@ -73,9 +75,6 @@ namespace cppu
Reference< security::XAccessController >
createDefaultAccessController() SAL_THROW(());
Reference< lang::XSingleComponentFactory >
create_boostrap_macro_expander_factory() SAL_THROW(());
OUString const & get_this_libpath();
@@ -435,7 +434,8 @@ Reference< XComponentContext > bootstrapInitialContext(
// macro expander singleton for loader
entry.bLateInitService = true;
entry.name = OUSTR("/singletons/com.sun.star.util.theMacroExpander");
entry.value <<= create_boostrap_macro_expander_factory();
entry.value
<<= cppuhelper::detail::create_bootstrap_macro_expander_factory();
context_values.push_back( entry );
// tdmgr singleton