Commit Graph

35 Commits

Author SHA1 Message Date
Stephan Bergmann
4e42ce3271 Don't call code in UNO object ctor that throws UNO exceptions
...with Context set to this, that leads to refcounting bugs.

Change-Id: I4875dbe4ccb5a7bcfaa8370b14d4eab83c21d0e5
2013-05-08 12:29:53 +02:00
Stephan Bergmann
5275ed805a Revert "Revert "WIP: Experimental new binary type.rdb format""
This reverts commit 67e69a5582, applying a band-
aid fix to cli_ure/source/climaker for now.

Conflicts:
	stoc/inc/bootstrapservices.hxx
	stoc/source/tdmanager/lrucache.hxx
	stoc/source/tdmanager/tdmgr.cxx
	stoc/source/tdmanager/tdmgr_common.hxx
	stoc/source/tdmanager/tdmgr_tdenumeration.cxx
	stoc/source/tdmanager/tdmgr_tdenumeration.hxx

Change-Id: Iae669985d0194f06fa349a4a39f0ebd230bc5d28
2013-04-22 18:25:42 +02:00
Michael Meeks
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01: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
Stephan Bergmann
67e69a5582 Revert "WIP: Experimental new binary type.rdb format"
This reverts commit 892ef8b056,
Windows-only cli_ure needs to be adapted first.
2013-03-09 13:03:49 +01:00
Stephan Bergmann
892ef8b056 WIP: Experimental new binary type.rdb format
Implement theTypeDescriptionManager directly on top of unoidl::Manager and
unoidl::Provider in cppuhelper instead of on top of css.reflection UNO
interfaces in stoc.  Adapt desktop/source/deployment/ accordingly.

There is no longer a com.sun.star.reflection.TypeDescriptionManager service
implementation now, only a com.sun.star.reflection.theTypeDescriptionManager
singleton one, which appears to not cause problems in practice.

Change-Id: I179501272f0712353b7d50d3eba2ec2bb79db373
2013-03-09 12:08:28 +01:00
Stephan Bergmann
36e8d5d137 Insert type rdbs individually into theTypeDescriptionManager
...to make it easier in the future to replace the binary rdb format with
something else, but also keep support for the old format for backwards
compatibility (extensions).

This should have no performance impact, as the type description manager (a)
caches information about requested type descriptions, and (b) has been changed
to process the bootstrap rdbs en bloc without doing costly consistency checks
(which are useful though when inserting an rdb when installing an extension, but
which would exhaustively read all type descriptions from the inserted rdb, so
would negate any benefit of constructing any type descriptions on demand only).

Change-Id: I80b22770bd9a5e0ab686f04d9c70295f2e3d0bf6
2013-01-18 16:55:04 +01:00
Stephan Bergmann
6059652fba Move addSingletonContextEntries to ServiceManager
Change-Id: I2a4c5b1f1f735e2bf5a8670d2f957f84388f0164
2013-01-16 17:27:00 +01:00
Stephan Bergmann
41e2b32020 Register theTypeDescriptionManager normally in services.rdb
...no need to handle it specially during bootstrap.

Change-Id: I666dc9c0040a30a7d81ec1815c338be1407281bb
2013-01-16 11:39:03 +01:00
Stephan Bergmann
dcdda1d610 Unfold remainder of add_access_control_entries at call site
Change-Id: I6e1a5a0223c1ea3e1a8c8800fb4cb032719ecf4f
2013-01-16 11:39:03 +01:00
Stephan Bergmann
e1e308bc45 Remove support for UNO_AC* bootstrap variables
...they had effectively never been used.

Change-Id: I514f2b844661e144cef758eb3ce7c4607ffad635
2013-01-16 11:39:03 +01:00
Stephan Bergmann
fc9d23ff55 Reorganize defaultbootstrap so that typedescriptionprovider can use servicemgr
...instead of having to rely on the odd bootstrapInitialSF and explicit
loadSharedLibComponentFactory.

Change-Id: I2fb212024c483254da015db3af43d9002051dddc
2013-01-16 11:39:03 +01:00
Stephan Bergmann
aed1f0d5d5 Simplify defaultbootstrap.cxx
Change-Id: Ice206b1dabf8dbcad613f886574e737c039d2119
2013-01-16 11:39:02 +01:00
Stephan Bergmann
3250fad637 Extract servicemanager and typedescriptionprovider from defaultbootstrap
Change-Id: I94fe7e68c5a49e591a625e9bf62108acac69428d
2013-01-16 11:39:02 +01:00
Stephan Bergmann
0373964108 Remove support for XML .rdbs froom SimpleRegistry service again
...this was a transitional hack to get XML-format service.rdbs in.  Now that
registry-based bootstrap_InitialComponentContext is gone, XML-format .rdbs need
only be handled in cppuhelper/source/defaultbootstrap.cxx (so the
textualservices stuff once duplicated to there now effectively moved there).

Change-Id: Ifb93558768095c1b462fe4057ebf8724968cca77
2012-12-21 15:56:45 +01:00
Thorsten Behrens
66a175834c c++ API: use css alias in generated headers, adds global css decl
This changes all generated API headers (.hpp and .hdl) to use a
namespace alias 'css' instead of the pointlessly long com::sun::star

Makes the change in cppumaker & associated tools, adds a global
namespace alias definition in sal/types.h, and removes a kiloton
of local, now pointless-to-harmful versions of that alias from all
over the code.

Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-11-30 14:36:36 +01:00
Tor Lillqvist
faef84abca Do stay backward-compatible also in 4.0 and later for now
Change-Id: Ie8f2de8f11f8fec3a9f014bbcc46a506dfb3058d
2012-11-12 16:37:21 +02:00
Stephan Bergmann
2171077c0c Introduce cppu::supportsService helper, adapt some call-sites
...more to follow (easy hack?)

Change-Id: Icb02626495701a3905c124c7368b98c3258e91b2
2012-09-14 19:32:30 +02:00
Stephan Bergmann
35d474ff8c Fix removeRdbFiles (caused extension update to fail)
removeRdbFiles suffered from a confusion that ImplementationInfo.uri denotes the
corresponding component (.so, .jar, etc.), but not the .rdb file.  So removing
an .rdb file silently failed to remove the corresponding implementations, so re-
installing a similar enough .rdb (as typically happens during extension update)
would fail due to duplicate implementation names.

Change-Id: I25d4ff72656c99a3af509eef09e89c18cfd0aabe
2012-08-24 17:18:28 +02:00
Stephan Bergmann
8caf1164ee Missing mutex lock
Change-Id: Ifddd6131c2e62057561d4b17eeda88568f6ccf7c
2012-08-10 14:35:04 +02:00
Stephan Bergmann
142d3ec875 Related fdo#52639: Do not destroy Implementations with mutex locked
Erasing from data_ member maps can destroy contained Implementations, which in
turn releases the UNO objects referenced from there, which in turn can cause
XComponents to dispose, which in turn can call arbitrary code, so must not be
done with rMutex locked.  Witness the backtrace at
<https://bugs.freedesktop.org/attachment.cgi?id=65142> linked from fdo#52639
(where this fix appears otherwise unrelated to that issue's main topic).

Change-Id: If55a3841b761ec1d9a0ef61fe54784426c4ee442
2012-08-09 17:44:14 +02:00
Stephan Bergmann
9fc870fc33 ServiceManager::createInstanceWithContext needs to honor given Context
...in loadImplementation (instead of using the context the ServiceManager itself
was created with).  Otherwise, the handcrafted context containing a fake
theJavaVirtualMachine singleton in install_vm_singleton
(javaunohelper/source/vm.cxx) would not be honored, so that if a Java process
bootstraps native (binary) UNO and from there tries to obtain that singleton, it
would erroneously try to instantiate another JVM instead of using the existing
one.  This was a regression introduced with the new ServiceManager and could be
witnessed by test-javanative in ure/source/uretest/Makefile failing.

Change-Id: I58cfbc8cdaea7ee4ab80fac728ea3e85676d69e1
2012-08-08 18:36:40 +02:00
Stephan Bergmann
2e7702fb70 fdo#51143 Do not wrap CannotActivateFactoryException as DeploymentException
...as some client code catches just the former and thus fails now.  (This was a
regression introduced with the recent cppuhelper/source/defaultbootstrap.cxx.)

Change-Id: I8306797f8331d894ab4e7695478e3824e9f79197
2012-07-13 12:12:41 +02:00
Tor Lillqvist
f79d5b9116 Unbreak stuff on iOS a bit after bootstrapping changes
Change-Id: I0d2ebfc9aa78a9fed057b853d54797a88218c587
2012-06-04 11:41:50 +03:00
Stephan Bergmann
5fd78feebe Revert "bootstrapping should elide duplicate .rdb paths in the configuration"
This reverts commit b162aec625, which increased
code complexity for no benefit (the dubious scenario it was introduced for
concerned duplicate service rdbs rather than type rdbs, anyway).
2012-06-01 10:10:07 +02:00
Stephan Bergmann
0951b76a00 Add "virtual" for consistency
Change-Id: I8ecc2edde553edbd80ca04e2f3d541c31f516211
2012-06-01 10:09:18 +02:00
Stephan Bergmann
c16d0dd846 fdo#49291 Postpone actual factory instantiation as long as possible
...see comment in ServiceManager::createContentEnumeration for a rationale.

Splitting ImplementationInfo out of Implementation has become necessary to avoid
circular references.

Change-Id: I29aef81ce78b9ab71e18663f8c7e6ca913c6a650
2012-06-01 09:59:49 +02:00
Michael Meeks
b162aec625 bootstrapping should elide duplicate .rdb paths in the configuration 2012-05-22 11:35:36 +01:00
Stephan Bergmann
d8ade3ccf6 Added link to LanguageTool.oxt issue
Change-Id: Ifab63273b12963e748c9b937648b2079fcd0c796
2012-05-14 18:48:22 +02:00
Stephan Bergmann
3b1798a55b Work around extension factories not implementing XServiceInfo
...that would otherwise lead to "Bad insert element" failure during live-insertion.

Change-Id: I74f883c9b613f03256abb7be7657f25b418f821d
2012-05-14 18:20:30 +02:00
Caolán McNamara
f5a414d242 WaE: simple minded MSVC2008 thinks s could be used uninitialized 2012-04-24 11:56:49 +01:00
Stephan Bergmann
015283bb50 Trying to parse legacy rdb as XML can cause InvalidRegistryException, too 2012-04-23 18:41:29 +02:00
Stephan Bergmann
0bbf79005a Do not fail for legacy rdb that only contains root key 2012-04-23 11:47:45 +02:00
Stephan Bergmann
18a9e9e844 Various clean up of previous commit 2012-04-20 23:37:14 +02:00
Stephan Bergmann
c2fd9b533c New cppu::defaultBootstrap_InitialComponentContext implementation
...that no longer uses XSimpleRegistry structures for the service data and thus
is potentially more performant.

* Registry-based functions from cppuhelper/bootstrap are deprecated now, client
  code should always use defaultBootstrap_InitialComponentContext.

* References to the obsolete UNO_WRITERDB have been removed.

* Some of the functions in cppuhelper/source that are used from multiple .cxx
  but had not been properly placed into .hxx have been cleaned up.

* css.lang.ServiceManager XSet insert/remove now support special
  sequence<NamedValue> to improve live deployment/removal of XML-based extension
  components data.

* 09524d410b "stoc: accelerate opening of multiple
  XML .rdb files in a directory" and its follow-up
  cb5c881a7f "avoid using the new rdb reading
  logic for empty/non-existent directories" have been obsoleted by this change
  and have been reverted again.
2012-04-20 22:57:32 +02:00