Commit Graph

53 Commits

Author SHA1 Message Date
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
35e44118b8 Remove visual noise from stoc
Change-Id: I19edfb2796298c4870124d0d1e9488974a010bb8
Reviewed-on: https://gerrit.libreoffice.org/8316
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 07:47:23 -06:00
Jan Holesovsky
c2c530da69 Introduce static inline cppu::acquire(), and make use of that.
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-22 15:09:28 +01:00
Jan Holesovsky
f278397787 Change _get_implementation()'s not to do initialization directly.
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-21 21:25:22 +01:00
Jan Holesovsky
306efefe22 Minimize the constructor functions to a bare minimum.
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-20 17:37:40 +01:00
Matúš Kukan
73eca35b0a Unify ctor functions for component implementations.
There is no need to use different styles for writing the same thing.
It also makes it easier in future to use search & replace.
But of course, there are also some more complicated functions.

Change-Id: I773da20378af0e0d5a27689d3903df7063fb8ac0
2014-01-18 17:02:40 +01:00
Matúš Kukan
a700ce8e2b Unify ctor functions to have _get_implementation suffix.
Change-Id: I07fe0671d0633ef9480a4f3431df6a64c7902db8
2014-01-15 15:12:01 +01:00
Matúš Kukan
4337a0664f Use const& arguments parameter for ctor functions.
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2014-01-15 08:51:27 +01:00
Stephan Bergmann
ae3a0c8da5 Add .component <implementation constructor="..." feature
...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-19 08:48:56 +01:00
Matúš Kukan
e20f27f0a0 bootstrap component: Split into implementation functions.
Change-Id: I91cb0177edd79485eab885e995e79b1a19a769d5
2013-12-18 07:15:49 +01:00
Stephan Bergmann
2f7b329297 [API CHANGE] remove cppu::loadSharedLibComponentFactory w/ rPrefix again
...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-13 15:13:57 +01:00
Marcos Paulo de Souza
ee5661ecd3 fdo#54938: Adapt supportsService implementations..
to cppu::supportsService

Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-22 10:28:10 +00:00
Stephan Bergmann
22edbdf53c No need to support "prefix" in DllComponentLoader
...which is only used for extension components, and only while they are live-
deployed into an soffice process and thus offloaded to an additional uno
process (which never happens for bundled extensions), cf.
cppuhelper::ServiceManager::loadImplementation
(cppuhelper/source/servicemanager.cxx), and (at least non-bundled) extensions
should never use the "prefix" feature anyway, cf.
3bafe5f5f5 "Extension shared library components
must not use the 'prefix' feature."

Change-Id: I19c4b71029eccf0c4f3d4481ea5f3542205f685e
2013-10-11 15:52:29 +02:00
Stephan Bergmann
d2e1dd559f [API CHANGE] Stricter requirements for shlib.hxx function arguments
rLibName -> uri must be an (absolute file) URI, rPath must be empty, and xKey
must be null in loadSharedLibComponentFactory.  While incompatible in theory,
these functions should only be called internally, anyway.

Change-Id: Iab144b199e4e7db62358283efec6877a5da19bab
2013-10-01 01:15:30 +02:00
Stephan Bergmann
f301032307 IllegalArgumentException is a RuntimeException now
Change-Id: I929da9300cc02da114907841ad8805d1227f3f79
2013-10-01 00:56:18 +02:00
Luboš Luňák
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02:00
Stephan Bergmann
e8ff469da5 Remove any remaining remnants of unused component_canUnload feature
Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a
2013-04-19 16:52:03 +02:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Thomas Arnhold
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
Jean-Noël Rouvignac
97eb8a6e0e Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-30 12:54:40 +00:00
Michael Meeks
3a53ddf0a2 re-base on ALv2 code. 2012-06-29 11:13:58 +01:00
Tor Lillqvist
128749140f More hacking on static linking (iOS) support 2012-03-21 00:00:05 +02:00
Olivier Hallot
71dc235aba Fix for fdo43460 Part XXXV getLength() to isEmpty()
Part XXXV
Modules
stoc
2012-01-12 19:15:08 -02:00
Takeshi Abe
c936e50627 catch exception by constant reference 2011-12-27 10:17:15 +09:00
Norbert Thiebaud
36f155dda1 remove include of pch header from stoc 2011-11-27 13:23:37 -06:00
Matúš Kukan
683d975d70 we are searching for prefix in activate
also fix small typo
2011-07-28 14:42:08 +02:00
Michael Meeks
babdd43fce re-work prefix handling and undo cppuhelper ABI change, add unit test
use a separate prefix enabled method instead of changing the ABI of cppuhelper
also - lookup the prefix in the dllcomponentloader in case we are called this way
also - add a unit test for the prefix change
2011-06-24 14:23:25 +01:00
Caolán McNamara
c1abc2ec9e fix up 2011-06-01 15:35:10 +01:00
Thomas Arnhold
adc6fe00e3 Move OSL_ENSURE(0,...) to OSL_FAIL(...) 2011-03-12 14:19:48 +01:00
Julien Nabet
480ab8a2b3 Remove "using namespace ::rtl" 2011-03-03 22:48:57 +01:00
Sebastian Spaeth
a715e1b3d0 Add vim/emacs modelines to all source files
Fixes #fdo30794
Based on bin/add-modelines script (originally posted in mail
1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-14 17:04:31 +02:00
Petr Mladek
334bef4563 remove include guards using fixguard.py 2010-10-05 18:12:51 +02:00
Jens-Heiner Rechtien
7c80db2eb3 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm
5066ad9ee3 INTEGRATION: CWS changefileheader (1.19.10); FILE MERGED
2008/04/01 15:42:26 thb 1.19.10.2: #i85898# Stripping all external header guards
2008/03/31 07:26:10 rt 1.19.10.1: #i87441# Change license header to LPGL v3.
2008-04-11 10:41:53 +00:00
Vladimir Glazounov
fa1de25dd3 INTEGRATION: CWS sb71 (1.17.34); FILE MERGED
2007/10/01 17:25:48 sb 1.17.34.2: RESYNC: (1.17-1.18); FILE MERGED
2007/04/16 13:54:58 sb 1.17.34.1: #i75466# Adapted to new bootstrap_expandUri helper.
2007-10-15 11:01:52 +00:00
Jens-Heiner Rechtien
fef7d406e9 INTEGRATION: CWS sb76 (1.17.46); FILE MERGED
2007/08/31 11:01:54 sb 1.17.46.1: #i77885# Consolidate stoc libraries; patch by jnavrati.
2007-09-27 11:59:12 +00:00
Oliver Bolte
7c8d44aeb3 INTEGRATION: CWS pchfix02 (1.16.10); FILE MERGED
2006/09/01 17:41:13 kaib 1.16.10.1: #i68856# Added header markers and pch files
2006-09-16 16:31:30 +00:00
Jens-Heiner Rechtien
24d3160ff8 INTEGRATION: CWS warnings01 (1.15.8); FILE MERGED
2005/10/31 14:38:09 sb 1.15.8.1: #i53898# Made code warning-free.
2006-06-19 23:03:34 +00:00
Rüdiger Timm
6f543bce88 INTEGRATION: CWS ooo19126 (1.14.18); FILE MERGED
2005/09/05 17:10:59 rt 1.14.18.1: #i54170# Change license header: remove SISSL
2005-09-08 07:00:50 +00:00
Oliver Bolte
211bee536d INTEGRATION: CWS sb31 (1.13.134); FILE MERGED
2005/04/18 13:07:54 sb 1.13.134.1: #121392# Fixed use of OSL_TRACE.
2005-06-17 09:07:27 +00:00
Vladimir Glazounov
ad408fe6f2 INTEGRATION: CWS dbgmacros1 (1.12.46); FILE MERGED
2003/04/10 08:38:19 kso 1.12.46.1: #108413# - debug macro unification.
2003-04-15 16:13:29 +00:00
Daniel Boelzle
8f0762f891 #100075# modifying loaders, using macro expander singleton; service manager review 2002-06-14 12:26:30 +00:00
Jörg Budischewski
a242da96dc #67468# Added unloading and context support 2001-06-22 15:21:02 +00:00
Joachim Lingner
4038b72427 OSL_ENSHURE replaced by OSL_ENSURE 2001-03-12 14:38:06 +00:00
Daniel Boelzle
d596feb51c now uses cppuhelper for loading/ registering 2000-12-19 14:49:47 +00:00
Daniel Boelzle
edd44c19e0 macosX: added assertions 2000-12-15 10:07:34 +00:00
Daniel Boelzle
5a0b59db73 prefixing 2000-12-15 09:20:50 +00:00
Daniel Boelzle
b036f1049b postfixing export symbols 2000-12-15 07:53:10 +00:00
Daniel Boelzle
c5cffd35ac macosX: component exports are prefixed with libname 2000-12-14 15:23:39 +00:00
Daniel Boelzle
3674ddbd0e #80090# check for dir boundary 2000-11-15 16:53:13 +00:00