summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)AuthorFilesLines
2014-02-27Remove visual noise from cppuhelperAlexander Wilms11-74/+74
Change-Id: If23a1aa19949f91f900d55ff9e1d5039378d7277 Reviewed-on: https://gerrit.libreoffice.org/8248 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann15-417/+417
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-23Remove unneccessary commentsAlexander Wilms13-136/+136
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21coverity#707716 Uninitialized pointer fieldCaolán McNamara1-2/+4
Change-Id: Ifea113d6fc0d6dd764a25cb6e70b9df41b7279c7
2014-02-18clean upStephan Bergmann1-7/+5
Change-Id: I02fa1aea1070a6485b96a67f7d6f7f56c022bd9e
2014-02-18Do not throw when a singleton can't be raised, only warn.Matúš Kukan1-9/+3
This can happen for mobile platforms where we don't need singletons like com.sun.star.deployment.ExtensionManager. Change-Id: Iad6729539c7ed1ad2b3315c7b9a35647e92ebbff
2014-02-17cppuhelper: sal_Bool -> boolStephan Bergmann6-21/+21
Change-Id: I6e0e6c1e4880a652ea4d8f0cccf9d8103c2cbbef
2014-02-17Drop unused #includeTakeshi Abe1-3/+0
Change-Id: Id1badf4ae68d322a6e05e900aa63bdb124387bab
2014-02-07Simplify service manager's tracking of singletonsStephan Bergmann2-112/+76
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-02-03Remove needless SAL_DLLPRIVATE annotationsStephan Bergmann1-1/+1
Change-Id: Iaf2d742ae3dcc15a915a996805955d93daac9d45
2014-02-03fdo#54938 Convert to cppu::supportsServiceAlexandre Vicenzi1-2/+1
Change-Id: I512c525029ebd63d261560d27e9f38bbe94f7e10 Reviewed-on: https://gerrit.libreoffice.org/7649 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
2014-01-31Remove UNOIDL "array" and "union" vaporware remnantsStephan Bergmann1-102/+0
...and deprecate what cannot be removed for compatibility. Change-Id: I1ea335af775b867b468b8285113631167729a92a
2014-01-28bool improvementsStephan Bergmann2-7/+7
Change-Id: Iaf63fd2282ce8de4f4c3dc7120afe1bc0613228a
2014-01-24Log what we are about to "load" in the DISABLE_DYNLOADING caseTor Lillqvist1-0/+2
Change-Id: I75b9511e82d57da453527e7bc497ec1523ab2216
2014-01-23Let C++ inline functions return bool instead of sal_BoolStephan Bergmann1-1/+1
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Missing overloads of insert() for bool have been added to OStringBuffer and OUStringBuffer (which required dropping one !VALID_CONVERSION check that would now pick that overload, but would be flagged by compilerplugins/clang/pointertobool.cxx). Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-22Introduce static inline cppu::acquire(), and make use of that.Jan Holesovsky2-49/+33
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 Holesovsky2-22/+50
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 Bergmann2-25/+15
Change-Id: I661eb69551eae3d888d156c6bd4291a532d0b6ab
2014-01-20Minimize the constructor functions to a bare minimum.Jan Holesovsky1-7/+4
Most of the constructors are supposed to be only a call of new TheInstance(arguments) or an equivalent; so let's just change the constructor caller accordingly, to accept unacquired new instance. If there are exceptions that need to do more heavy lifting, they do not have to use the constructor feature, or there can be a wrapper for the real implementation, doing the additional work in their (C++) constructor. Change-Id: I035c378778aeda60d15af4e56ca3761c586d5ded
2014-01-16cppuhelper: valgrind complains about uninitialized variable...Michael Stahl1-2/+4
... cppuhelper::ServcieManager::Data::Implementation::dispose Change-Id: I70a96e608f17eb6630326bbf32fff5fb5d7d4569
2014-01-16Support for singleton constructor functionsStephan Bergmann2-167/+320
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úš Kukan2-5/+5
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2014-01-15Initialize constructor based implementations in one place.Matúš Kukan1-7/+19
Change-Id: I324f25bb5ec7d792c3e015815f2a11b08f519764
2014-01-14Use SAL_WARN, too, to increase chance of actually seeing the messageTor Lillqvist1-0/+2
Passing an, as such useful, verbose error message to the CannotActivateFactoryException constructor is fairly pointless if that exception ends up being unexpected and causes program termination. Which of course is exactly the case when one would be very interested in seeing any message associated with the exception. Change-Id: I1cd987669e39e47d5f072690dc5013e4a42fd50a
2014-01-10[API CHANGE] cppu::Enterable::v_isValid returns boolStephan Bergmann1-3/+3
While strictly speaking an incompatible change, it is extremely unlikely that external code uses cppu::Enterable at all; this should always have been a private URE implementation detail. Change-Id: I2c3fe754fe6268b18ca03532229f3403736f6f6e
2014-01-07remove unnecessary sal_Unicode casts in OUStringBuffer::append callsNoel Grandin1-6/+6
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-01Only component-mapping.h is needed here.Matúš Kukan1-3/+1
Change-Id: I09fc944d7d19e8a2804d8530ba2a98b5719d8b37
2013-12-20typo fixesAndras Timar1-1/+1
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-19Missing initializationStephan Bergmann1-1/+1
Change-Id: I177da4fbe87eacfb86b6196df3d023218b1c9012
2013-12-19Legacy cppu::loadSharedLibComponentFactory isn't DISABLE_DYNLOADING cond.Stephan Bergmann1-2/+2
Change-Id: I020d4fc382470d7bc08df9b88e42ac62c97cb47e
2013-12-19FactoryWrapper is a misnomer nowStephan Bergmann1-17/+20
Change-Id: I59d77b4712e273318409a326c835861dc467596c
2013-12-19Add .component <implementation constructor="..." featureStephan Bergmann4-431/+434
...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-18Get more --disable-dynamic-loading code out of shlib.cxx.Matúš Kukan1-58/+9
It's not terribly nice, but, hopefully, better. The hope is that one day, lo_get_library_map will be no more. In lo_get_implementation_map we can specify more precisely what to link into the binary. Change-Id: I99a1854fbae05be2f70302cc56bea88e522ec129
2013-12-18bootstrap component: Split into implementation functions.Matúš Kukan1-14/+10
Change-Id: I91cb0177edd79485eab885e995e79b1a19a769d5
2013-12-18Deduplicate some foo_component_getFactory declarations.Matúš Kukan1-31/+0
Change-Id: I9304b62134bab375b721399ae078bf66e01191d8
2013-12-18Allow UNO component libraries to have each implementation in its own function.Matúš Kukan1-4/+25
Demonstrating on expwrap library. There is hope, this will bring code size savings for mobile platforms, where we don't need every implementation. Change-Id: I3519fb6148fd7a47ed9df092c73779ea6add552f
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann1-2/+2
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-16fdo#72598 Remove SunStudio cruft from code baseJelle van der Waa1-5/+0
Change-Id: I5150eec33228e18e274a8ae4effd3f185851b7f4 Reviewed-on: https://gerrit.libreoffice.org/7103 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-12-16Allow setting environment value directly in .component filesStephan Bergmann4-64/+89
...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-12-16Parser::attrImplementation_ can be a local varStephan Bergmann1-7/+6
Change-Id: I402040a4b747d457b1b7a3695d0b3567fa7bf478
2013-12-16Clean-up uno/lbnames.hStephan Bergmann8-5/+11
Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
2013-12-16Clean-up: The "_" delimiter is logically not part of the prefixStephan Bergmann2-7/+7
Change-Id: I60329aabe465da48aac11ad76dd72e9a0ae4d078
2013-12-13cppcheck: fix same expression, ')' = 29 not 28 in ascii'Julien Nabet1-1/+1
Change-Id: I90e22a5532f59b190c59d267256b5e889e82da74
2013-12-13Shortcut common case of calling same-env component_getFactory fnStephan Bergmann1-31/+41
Change-Id: I7f5d31c3b3e128b2df4d83c915673bf7b5d2ab8c
2013-12-13[API CHANGE] remove cppu::loadSharedLibComponentFactory w/ rPrefix againStephan Bergmann4-21/+79
...it was never meant to be called by client code anyway and is no longer needed to be exposed since the global service manager implementation moved to cppuhelper. Change-Id: If2d0510b2364084d36edeb156a3459d9b8aeb983
2013-12-11fdo#60698: Merge fastsax and sax_shared into expwrapMarcos Paulo de Souza1-2/+0
Change-Id: I6f8c6827c00db50184a46f39968f882b944d18d4 Reviewed-on: https://gerrit.libreoffice.org/6967 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2013-12-11Let's have a static variable for getenv("UNO_ENV_LOG").Matúš Kukan1-1/+1
Change-Id: Id382726b86726515a9ae3017c11fad0420136a4c
2013-11-19remove most use of RTL_CONSTASCII_USTRINGPARAM macroNoel Grandin1-1/+1
This is largely unnecessary when working with OUString Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-11Don't call Manager::addProvider(null) upon optional NoSuchFileExceptionStephan Bergmann1-3/+1
Change-Id: I62e953c886886158f227362fef7048459192217b
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin1-2/+2
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f