summaryrefslogtreecommitdiff
path: root/cppuhelper/source/servicemanager.hxx
AgeCommit message (Collapse)Author
2016-02-26Use an XInitialization-based channel to request service mgr pre-initStephan Bergmann
...instead of private cppu::preInitBootstrap function Change-Id: Id0e6fcf721b697c993e5acffaf7836452cfa9750 Reviewed-on: https://gerrit.libreoffice.org/22699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-15Introduce lok_preinit() to preload all registered UNO implementationsHenry Castro
Intended to be used from an application like the LibreOffice On-Line server so that it can be called in a process that then will call fork() several times, and much space consuming data will end up being shared. Change-Id: I65341c57d00308d246ec90deab8050b2c4bb3e61
2015-11-28Work around clang-cl PR25641Stephan Bergmann
"defaultbootstrap.o : error LNK2001: unresolved external symbol '[thunk]:private: virtual class com::sun::star::uno::Sequence<class rtl::OUString> __cdecl cppuhelper::ServiceManager::getAvailableServiceNames`adjustor{24}' (void)' (?getAvailableServiceNames@ServiceManager@cppuhelper@@GBI@EAA?AV?$Sequence@VOUString@rtl@@@uno@star@sun@com@@XZ)" Change-Id: I04b7353305ffeeb316d70ab8408aeb52ea0f7186
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-14boost->stdCaolán McNamara
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-04cppuhelper: fix includesThomas Arnhold
Change-Id: I0e6bc822d19cf266dea716fe92f2ccd08d87c51f
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-18Use cppu::BaseMutex instead of plain osl::Mutex as baseStephan Bergmann
Change-Id: Id169891e60eb0a19899586fd3c9a9325ef9d1236
2014-03-18Find places where OUString and OString are passed by value.Noel Grandin
It's not very efficient, because we generally end up copying it twice - once into the parameter and again into the destination OUString. So I create a clang plugin that finds such places and generates a warning so that we can convert them to pass-by-reference. Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-07Simplify service manager's tracking of singletonsStephan Bergmann
It only tracks whether to dispose a singleton instance now, and (at least conceptually) no longer remembers the single instance (apart from what is necessary in order to call dispose on it), as the underlying implementation already needs to keep track of that to support direct calls of constructor functions. Change-Id: I154bf05438e1db099c1c5ffb1c56377725c6bfc6
2014-01-22Introduce static inline cppu::acquire(), and make use of that.Jan Holesovsky
This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-21Change _get_implementation()'s not to do initialization directly.Jan Holesovsky
Many of the initalizations (in eg. framework) have to be done on an acquire()'d object, so instead of doing the initialization directly, return the initialization member function back to the createInstance() / createInstanceWithContext() / ... and perform the initialization there. As a sideeffect, I belive the calling initialize() from servicemanager is not that much a hack any more - whoever converts the implementation to be constructor-base has the choice to provide the callback, or still initialize through XInitialization, where the callback is preferred by servicemanager when it exists. Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-20Simplify code; STATUS_LOADED => component||factory1||factory2Stephan Bergmann
Change-Id: I661eb69551eae3d888d156c6bd4291a532d0b6ab
2014-01-16cppuhelper: valgrind complains about uninitialized variable...Michael Stahl
... cppuhelper::ServcieManager::Data::Implementation::dispose Change-Id: I70a96e608f17eb6630326bbf32fff5fb5d7d4569
2014-01-16Support for singleton constructor functionsStephan Bergmann
The service manager now keeps track of instances of singleton implementations (i.e., implementations whose XML description lists at least one <singleton ...>). These instances will be disposed either when the service manager is disposed, or, for instances that have been instantiated into the component context's /singleton/* map, when the component context is disposed. This change allows to use constructor functions for such singleton implementations, too. Change-Id: I220c9ddc9824e4d7f7556daefb599e2ec36b0e6c
2014-01-15Use const& arguments parameter for ctor functions.Matúš Kukan
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2013-12-19Add .component <implementation constructor="..." featureStephan Bergmann
...to directly call constructor functions of ComponentContext-based C++ implementations of (non-single-instance) UNO services. The case where these calls would need to be bridged across different environments (e.g., from gcc3 to gcc3:affine) is not yet implemented. bootstrap.component and expwrap.component are adapted accordingly as a proof-of- concept (which had previously been adapted to use the prefix="direct" feature, which may become unnecessary again in the end, depending on how to handle single-instance services/singletons). More to follow. Change-Id: I18682d75bcd29d3d427e31331b4ce8161dbb846d
2013-12-16Allow setting environment value directly in .component filesStephan Bergmann
...for internal loader="com.sun.star.loader.SharedLibrary" components, instead of exported component_getImplementationEnvironmen (or implicit CPPU_CURRENT_LANGUAGE_BINDING_NAME). Adapted a few .component files as proof- of-concept, more to follow. Change-Id: I82332e0a48e6fc1da245990bb72265fe6e58447e
2013-05-08Don't call code in UNO object ctor that throws UNO exceptionsStephan Bergmann
...with Context set to this, that leads to refcounting bugs. Change-Id: I4875dbe4ccb5a7bcfaa8370b14d4eab83c21d0e5
2013-01-16Move addSingletonContextEntries to ServiceManagerStephan Bergmann
Change-Id: I2a4c5b1f1f735e2bf5a8670d2f957f84388f0164
2013-01-16UNO methods are no longer called directly on ServiceManagerStephan Bergmann
Change-Id: I037ed9899873e614e9e10c89f1f8a74efa73d737
2013-01-16Extract servicemanager and typedescriptionprovider from defaultbootstrapStephan Bergmann
Change-Id: I94fe7e68c5a49e591a625e9bf62108acac69428d