INTEGRATION: CWS bunoexttm (1.10.28); FILE MERGED

2007/01/30 15:45:29 kr 1.10.28.1: adapted: joined from UTF2 - add purposed env. support
This commit is contained in:
Kurt Zenker
2007-05-09 12:25:36 +00:00
parent 50c1037e69
commit b6a391b5e3

View File

@@ -4,9 +4,9 @@
*
* $RCSfile: macro_expander.cxx,v $
*
* $Revision: 1.10 $
* $Revision: 1.11 $
*
* last change: $Author: obo $ $Date: 2006-09-16 12:41:36 $
* last change: $Author: kz $ $Date: 2007-05-09 13:25:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,6 +38,8 @@
#include <rtl/bootstrap.hxx>
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/compbase3.hxx>
@@ -233,10 +235,20 @@ namespace cppu
//##################################################################################################
Reference< lang::XSingleComponentFactory > create_boostrap_macro_expander_factory() SAL_THROW( () )
{
return ::cppu::createSingleComponentFactory(
service_create,
s_impl_name(),
s_get_service_names() );
Reference< lang::XSingleComponentFactory > free(::cppu::createSingleComponentFactory(
service_create,
s_impl_name(),
s_get_service_names() ));
uno::Environment curr_env(Environment::getCurrent());
uno::Environment target_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))));
uno::Mapping target2curr(target_env, curr_env);
return Reference<lang::XSingleComponentFactory>(
reinterpret_cast<lang::XSingleComponentFactory *>(
target2curr.mapInterface(free.get(), ::getCppuType(&free))),
SAL_NO_ACQUIRE);
}
}