summaryrefslogtreecommitdiff
path: root/cppuhelper/source/defaultbootstrap.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-09 11:34:22 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-09 12:08:28 +0100
commit892ef8b0565c7f5f343d71e3b61c41655f80267b (patch)
treef900613a4e797d3a55f05a39c200d97cddbcfc30 /cppuhelper/source/defaultbootstrap.cxx
parent4e38ea86701bdefcf31c6f9e3136d1eda4e5c061 (diff)
WIP: Experimental new binary type.rdb format
Implement theTypeDescriptionManager directly on top of unoidl::Manager and unoidl::Provider in cppuhelper instead of on top of css.reflection UNO interfaces in stoc. Adapt desktop/source/deployment/ accordingly. There is no longer a com.sun.star.reflection.TypeDescriptionManager service implementation now, only a com.sun.star.reflection.theTypeDescriptionManager singleton one, which appears to not cause problems in practice. Change-Id: I179501272f0712353b7d50d3eba2ec2bb79db373
Diffstat (limited to 'cppuhelper/source/defaultbootstrap.cxx')
-rw-r--r--cppuhelper/source/defaultbootstrap.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 39d5b22326e7..54516ea59174 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -32,8 +32,6 @@
#include <cassert>
#include <vector>
-#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
-#include "com/sun/star/container/XSet.hpp"
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
@@ -47,7 +45,7 @@
#include "macro_expander.hxx"
#include "paths.hxx"
#include "servicemanager.hxx"
-#include "typedescriptionprovider.hxx"
+#include "typemanager.hxx"
namespace {
@@ -78,6 +76,9 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
rtl::Reference< cppuhelper::ServiceManager > smgr(
new cppuhelper::ServiceManager(
getBootstrapVariable(bs, "UNO_SERVICES")));
+ rtl::Reference< cppuhelper::TypeManager > tmgr(
+ new cppuhelper::TypeManager(
+ getBootstrapVariable(bs, "UNO_TYPES")));
cppu::ContextEntry_Init entry;
std::vector< cppu::ContextEntry_Init > context_values;
context_values.push_back(
@@ -87,6 +88,13 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
css::uno::Reference< css::uno::XInterface >(
static_cast< cppu::OWeakObject * >(smgr.get()))),
false));
+ context_values.push_back(
+ cppu::ContextEntry_Init(
+ "/singletons/com.sun.star.reflection.theTypeDescriptionManager",
+ css::uno::makeAny(
+ css::uno::Reference< css::uno::XInterface >(
+ static_cast< cppu::OWeakObject * >(tmgr.get()))),
+ false));
context_values.push_back( //TODO: from services.rdb?
cppu::ContextEntry_Init(
"/singletons/com.sun.star.util.theMacroExpander",
@@ -110,18 +118,7 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
&context_values[0], context_values.size(),
css::uno::Reference< css::uno::XComponentContext >()));
smgr->setContext(context);
- css::uno::Reference< css::container::XHierarchicalNameAccess > tdmgr(
- context->getValueByName(
- "/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
- css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::container::XSet >(
- tdmgr, css::uno::UNO_QUERY_THROW)->
- insert(
- css::uno::makeAny(
- cppuhelper::createTypeDescriptionProviders(
- getBootstrapVariable(bs, "UNO_TYPES"), smgr.get(),
- context)));
- cppu::installTypeDescriptionManager(tdmgr);
+ cppu::installTypeDescriptionManager(tmgr.get());
return context;
}