Age | Commit message (Collapse) | Author |
|
shaves 5% off startup time
Change-Id: I901e1112727eb7a50f70d1853386e0696fee7e5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167000
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I0f141398effbd2673c02f9d1f4378fd4e67af655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151580
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I231b84cd973d730fe301045cb7442af2d1ddc5d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135311
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2d30fb3c81e791eb554780b5abf4923a33cc884e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134029
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I846a1201b1b4fb8ca694a0b78b7d4cc2973dfbd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133258
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
for which we have o3tl:: equivalents
Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It's faster and I do not see any reason for the map to be sorted.
cppuhelper::ServiceManager::findServiceImplementation() may be called
quite often e.g. during text layout by i18npool::BreakIterator.
Change-Id: If8c77c506b88a0a3eac29e0d20d43d2110eed4ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112280
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...to ease the implementation in C++ code of constructor-based <implementation>s
that shall be single-instance (and which would have been implemented with e.g.
cppu::creaetOneInstanceFactory for non--constructor-based <implementation>s).
See e.g. 6e35794cad555485955c3b43593497dcdbf29840 "terminate XDesktop properly
in unit tests" and 6362ebab298549e8616c32cafd75cb3959ba7d65 "dbaccess: create
instances with uno constructors" for the clumsy approach used until now, where
the C++ constructor function uses a static instance that is cleared in
dispose(), adding fake <singleton> entries to <implementation>s where necessary
so that the ServiceManager will call those XComponent::dispose() functions when
it itself gets disposed.
For every <implementation>, the ServiceManager already holds an Implementation
data structure, so it can easily hold a singleInstance there and clear it when
the ServiceManager gets disposed. (One consequence is that single-instance
implementations are now created with their Instance.mutex locked, but that
should not cause problems in practice, given that the construction of a single-
instance implementation should not recursively request its own construction
anyway.)
The new single-instance="true" attribute is mostly useful in combination with
the constructor attribute (see above), but it can also be used for non--
constructor-based <implementation>s, at least in theory.
(The single-instance="true" attribute is orthogonal to <singleton> elements.
There are existing single-instance services---even if those should arguably have
been defined as singletons in the first place---that can benefit from
single-instance="true". And there are <implementation>s that support one or
more <singleton>s alongside one or more <service>s, where the latter are not
single-instance.)
This new single-instance="true" attribute in *.component files should not
interfere with the lo_get_constructor_map machinery in the DISABLE_DYNLOADING
branch of cppuhelper::detail::loadSharedLibComponentFactory
(cppuhelper/source/shlib.cxx) used by Android, iOS and some fuzzer code.
AFAIU, the lo_get_constructor_map machinery should only ever come into play
after the ServiceManager has decided whether or not to create a new instance
based on the single-instance attributes in the *.component files.
This commit only provides the new single-instance="true" attribute. Actual
changes of <implementation>s and their C++ constructor functions are delegated
to a series of follow-up commits. (So that they can easily be reverted
individually should the need arise.)
Change-Id: Iea6c0fc539d74477b7a536dc771b198df6b0510e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103734
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This commit was carried out by a Python script, source of which
is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97.
Change-Id: I0b7c5bec8e56bd21e719c8889fe263e377f3b8ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102547
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...and rename constructor members to constructorName/constructorFn for
disambiguation.
"Splitting ImplementationInfo out of Implementation has become necessary to
avoid circular references" in c16d0dd846e25df56feffe868a15eb33bb55e42a
"fdo#49291 Postpone actual factory instantiation as long as possible", but was
no longer necessary since 997d21183322a0a94b96868073808841d2773902 "Support for
singleton constructor functions" (which also removed the need to hold
ImplemenationInfo by shared_ptr, which has already been cleaned up with
fc11bce4917aae7e8324f2c721ce50a88d231b0c "ImplementationInfo can be inlined").
Change-Id: I51467aa7b1fce56d6549738efd1f34f91925dac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86013
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
no need to hold by shared_ptr, it is never shared
Change-Id: I4818c08e4beab57d777e90d181d92a3edddffbf5
Reviewed-on: https://gerrit.libreoffice.org/85772
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I0eebd82b96d630da0597166cf87d398072607c13
Reviewed-on: https://gerrit.libreoffice.org/67473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...than 25313923b08018bd837cfe3fc99a5e141602cafc "Fix CppunitTest_services for
constructor-based implementations..." (which this commit reverts again). My
claim that "the 'factory' would be the object itself" is nonsense, it would
rather be an ImplementationWrapper (but one that was freshly created for each
ServiceManager::createContentEnumeration).
Change-Id: I85c683cff6f9ba78d0f8567a53f8fcbc56fe55cf
|
|
Change-Id: I9138b7e5d53c30488f99e9f9b9fe3f98c8d6858b
Reviewed-on: https://gerrit.libreoffice.org/43583
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
ae3a0c8da50b36db395984637f5ad74d3b4887bc unfortunately forgot to
implement mapping between UNO environments for constructor functions
in the UNO service manager, and due to the many componennt conversions
to constructor functions since then, the log UNO purpose environment
has become mostly useless.
Save the environment, create a closure today!
https://wiki.openoffice.org/wiki/Uno/Spec/Log_Environment
Change-Id: Idc03b5ed9529da8e81cd91efe50cbeceffa2b247
Reviewed-on: https://gerrit.libreoffice.org/33060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d
Reviewed-on: https://gerrit.libreoffice.org/30717
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.
(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to
OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)
Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
|
|
Change-Id: I5a98cea6402b0a02c0e7c329d07d05759a74ec95
|
|
and related modules.
Replace with C++11 delete copy-constructur
and copy-assignment.
Change-Id: I18aa9fe4ff696f9b5472cbe4cd0097cb174618b7
Reviewed-on: https://gerrit.libreoffice.org/23904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
...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>
|
|
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
|
|
"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
|
|
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
|
|
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
|
|
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>
|
|
Change-Id: I0e6bc822d19cf266dea716fe92f2ccd08d87c51f
|
|
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.
Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
|
|
Change-Id: Id169891e60eb0a19899586fd3c9a9325ef9d1236
|
|
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
|
|
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
|
|
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
|
|
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
|
|
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
|
|
Change-Id: I661eb69551eae3d888d156c6bd4291a532d0b6ab
|
|
... cppuhelper::ServcieManager::Data::Implementation::dispose
Change-Id: I70a96e608f17eb6630326bbf32fff5fb5d7d4569
|
|
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
|
|
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
|
|
...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
|
|
...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
|
|
...with Context set to this, that leads to refcounting bugs.
Change-Id: I4875dbe4ccb5a7bcfaa8370b14d4eab83c21d0e5
|
|
Change-Id: I2a4c5b1f1f735e2bf5a8670d2f957f84388f0164
|
|
Change-Id: I037ed9899873e614e9e10c89f1f8a74efa73d737
|
|
Change-Id: I94fe7e68c5a49e591a625e9bf62108acac69428d
|