Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


On 11/30/2014 01:31 PM, Chris Sherlock wrote:
How do you insert a value to be retrieved later into an
XComponentContext reference?

I see there is a XNameContainer, which is created
by comphelper::NameContainer_createInstance(::cppu::UnoType<sal_Int32>::get())
or whatever value you want. From here you then do insertByName.

However, how do you then insert this into the component context?

You can query a component context for the XNameContainer interface, and use that. See e.g. cppuhelper::ServiceManager::insertExtraData (cppuhelper/source/servicemanager.cxx) inserting information about singletons into the component context. (Which also shows the intended structure of the key namespace, using hierarchical paths like "/singletons/...")

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.