summaryrefslogtreecommitdiff
path: root/cppuhelper/source/servicemanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/servicemanager.cxx')
-rw-r--r--cppuhelper/source/servicemanager.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index bdf1b1a39474..dcb7af9c7bca 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -29,6 +29,7 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "cppuhelper/bootstrap.hxx"
+#include "cppuhelper/component_context.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase3.hxx"
#include "cppuhelper/shlib.hxx"
@@ -38,6 +39,7 @@
#include "rtl/ref.hxx"
#include "rtl/uri.hxx"
#include "rtl/ustring.hxx"
+#include "sal/log.hxx"
#include "xmlreader/xmlreader.hxx"
#include "paths.hxx"
@@ -596,6 +598,26 @@ void FactoryWrapper::loadImplementation(
}
+void cppuhelper::ServiceManager::addSingletonContextEntries(
+ std::vector< cppu::ContextEntry_Init > * entries) const
+{
+ assert(entries != 0);
+ for (Data::ImplementationMap::const_iterator i(data_.singletons.begin());
+ i != data_.singletons.end(); ++i)
+ {
+ assert(!i->second.empty());
+ assert(i->second[0].get() != 0);
+ SAL_INFO_IF(
+ i->second.size() > 1, "cppuhelper",
+ "Arbitrarily chosing " << i->second[0]->info->name
+ << " among multiple implementations for " << i->first);
+ entries->push_back(
+ cppu::ContextEntry_Init(
+ "/singletons/" + i->first,
+ css::uno::makeAny(i->second[0]->info->name), true));
+ }
+}
+
void cppuhelper::ServiceManager::loadImplementation(
css::uno::Reference< css::uno::XComponentContext > const & context,
boost::shared_ptr< Data::ImplementationInfo > const & info,