705 Commits

Author SHA1 Message Date
Stephan Bergmann
3aac1ebd02 Missing initialization
Change-Id: I177da4fbe87eacfb86b6196df3d023218b1c9012
2013-12-19 11:00:13 +01:00
Stephan Bergmann
023e49921e Legacy cppu::loadSharedLibComponentFactory isn't DISABLE_DYNLOADING cond.
Change-Id: I020d4fc382470d7bc08df9b88e42ac62c97cb47e
2013-12-19 10:56:58 +01:00
Stephan Bergmann
0506c3a1f0 FactoryWrapper is a misnomer now
Change-Id: I59d77b4712e273318409a326c835861dc467596c
2013-12-19 09:57:10 +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
d8bbae2fd6 Get more --disable-dynamic-loading code out of shlib.cxx.
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-18 07:15:49 +01:00
Matúš Kukan
e20f27f0a0 bootstrap component: Split into implementation functions.
Change-Id: I91cb0177edd79485eab885e995e79b1a19a769d5
2013-12-18 07:15:49 +01:00
Matúš Kukan
562b21949f Deduplicate some foo_component_getFactory declarations.
Change-Id: I9304b62134bab375b721399ae078bf66e01191d8
2013-12-18 07:15:47 +01:00
Matúš Kukan
b6cebf4a3e Allow UNO component libraries to have each implementation in its own function.
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-18 07:15:46 +01:00
Stephan Bergmann
b1d65c9f15 Allow setting environment value directly in .component files
...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-16 21:43:12 +01:00
Stephan Bergmann
9630b97355 Parser::attrImplementation_ can be a local var
Change-Id: I402040a4b747d457b1b7a3695d0b3567fa7bf478
2013-12-16 21:43:12 +01:00
Stephan Bergmann
a83b2af9ab Clean-up uno/lbnames.h
Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
2013-12-16 21:43:12 +01:00
Stephan Bergmann
698158655a Clean-up: The "_" delimiter is logically not part of the prefix
Change-Id: I60329aabe465da48aac11ad76dd72e9a0ae4d078
2013-12-16 21:43:12 +01:00
Julien Nabet
332a317ea5 cppcheck: fix same expression, ')' = 29 not 28 in ascii'
Change-Id: I90e22a5532f59b190c59d267256b5e889e82da74
2013-12-13 23:30:29 +01:00
Stephan Bergmann
a4ed79bbf6 Shortcut common case of calling same-env component_getFactory fn
Change-Id: I7f5d31c3b3e128b2df4d83c915673bf7b5d2ab8c
2013-12-13 16:18:52 +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
eebc1e9a8a fdo#60698: Merge fastsax and sax_shared into expwrap
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-11 20:45:30 +00:00
Matúš Kukan
9386576139 Let's have a static variable for getenv("UNO_ENV_LOG").
Change-Id: Id382726b86726515a9ae3017c11fad0420136a4c
2013-12-11 17:54:55 +01:00
Stephan Bergmann
49fa300703 Don't call Manager::addProvider(null) upon optional NoSuchFileException
Change-Id: I62e953c886886158f227362fef7048459192217b
2013-11-11 13:18:49 +01:00
Noel Grandin
fcd1637d51 convert OUString compareToAscii == 0 to equalsAscii
Convert code like
   aStr.compareToAscii("XXX") == 0
to
  aStr.equalsAscii("XXX")
which is both easier to read and faster.

Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11 12:58:13 +02:00
Noel Grandin
0a9ef5a18e convert OUString 0==compareToAscii to equalsAscii
Convert code like:
   0 == aStr.compareToAscii("XXX")
to
   aStr.equalsAscii("XXX")
which is both clearer and faster.

Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11 12:58:12 +02:00
Noel Grandin
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
Noel Grandin
0e6a2601b3 Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds.

Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-11-04 08:06:10 +02:00
Michael Stahl
d8be8a9c17 cppuhelper: remove obsolete Package_unorc
Change-Id: I4d513b69527ac21949f03b847a4638b92aef0a3e
2013-10-24 17:56:06 +02:00
Chr. Rossmanith
1ed2c24a6e remove RTL_CONSTASCII_(U)STRINGPARAM
Change-Id: I0bce921bfc7102b9a33b1c87eee3ddec0ebaed7b
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, with one little typo fix
2013-10-23 10:44:09 +02:00
Noel Grandin
7a06928bcf convert code to use OUString::endsWith
Convert places that call
   aStr[aStr.getLength()-1] == 'x'
to use the shorter form
   aStr.endsWith("x")

Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
2013-10-23 08:29:15 +02:00
Stephan Bergmann
04fe0cae20 Some clean-up
Change-Id: I8ab23a4b09f9d31ed49c98cdbbf1abc0e684358a
2013-10-20 18:49:48 +02:00
Stephan Bergmann
615a69e33f Clean-up std::bad_alloc handling
...post 0bc89aac4c64bb833e387657f680e194c26aef97 "cppumaker: Allow UNO interface functions to throw std::exception."

Change-Id: I232a1b266a45d39856d44a2f4e012b5df10fa880
2013-10-20 18:24:57 +02:00
Tor Lillqvist
e9f260b380 Minor refactoring of iOS code
Rename functions so that functions called by the UI layer for actions
to happen in the LO layer and functions called by the LO layer for
things to happen in the UI layer use different prefixes. Move
declarations to the generic <touch/touch.h> and avoid iOS-specific
types in the API.

Change-Id: Ieb8979065e02a87c4a415c934163265f2790d011
2013-10-13 23:17:38 +03:00
Stephan Bergmann
284347b764 Not being able to honor a "prefix" is a rather hard error
It happens when an extension has just been live-deployed into the running
soffice process and then trying to instantiate out-of-process in an additional
uno process one of that extension's shared library components and that component
---erroneously---uses the "prefix" feature.  (Which can be reproduced with the
mysql-connector-ooo.oxt extension, --enable-ext-mariadb-connector: "rm -rf
instdir/*/share/extensions/mysql-connector-ooo", "instdir/*/program/soffice
workdir/*/Extension/mysql-connector.oxt", install the per-user, then "File - New
- Database - Connect to an existing database: MySQL - Next >> - Connect directly
- Next >> - Database name: foo - Server / Port - Server: bar - Next >> - Test
Connection", crash.)

Change-Id: Ibab2ad31199eec5dc26ffa337a5e3e7490f782d7
2013-10-11 15:03:11 +02:00
Tor Lillqvist
01e1a2465e URE folder path fixes for the HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE case
Change-Id: I5019cce2172db7b3ac74e25f5ea9dc62e9fd03f8
2013-10-05 21:10:42 +03:00
Tor Lillqvist
ecbe980c60 WaE: 'rPath' : unreferenced formal parameter
Change-Id: I35aee7a1f8c2d79ac275262ba0cd002e4d034c95
2013-10-01 20:48:18 +03:00
Markus Mohrhard
f189b1ab9b prevent WaE with unused parameters 2013-10-01 02:48:53 +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
c91f5851d0 [API CHANGE] Remove unused cppu::invokeStaticComponentFactory again
...that has neither been intended for external use anyway, nor has it ever been
used internally since its dead-on-arrival inception in
b16ab7a751c04049b4171df412f1ef0f4f9b02f2 "Add invokeStaticComponentFactory() for
statically linked components: Will be used for iOS at least."  Sigh.

Change-Id: I17795b2a1945809688deba0a5492415fbe877400
2013-10-01 00:56:18 +02:00
Stephan Bergmann
69f1846f40 All the content of cppuhelper/source/compat.cxx must be in namespace cppu
Change-Id: I30dde10d1c299dbd9c0b2cb2fa025ce432df6cce
2013-10-01 00:56:18 +02:00
Stephan Bergmann
3fb51feb1c [API CHANGE] Remove unused CPLD_ACCESS feature from C++/Java component loaders
...introduced in 2000 with 38974aeef6dfaa1c625cf5498ec553489dd08c87 "added
library loading limitation by using env variable CPLD_ACCESSPATH=path1;path2;
etc." and 9be3c618e0b1d2b2635bd7b134693ed5ff3021bc "#80090# restrict jar file
access to java system property com.sun.star.comp.loader.CPLD_ACCESSPATH" but
already in 2004 considered "a hack [that] seems to be unused nowadays" in
1d3164df959b31ba9f50ddc108569f3adec32ff7 "CWS sb20: #i29119# Replaced
sandbox.jar-based class loader with an own one."

Change-Id: I637afd5daeb4ca097edd17f834c81af892dcfc6a
2013-10-01 00:56:17 +02:00
Stephan Bergmann
43c47af018 Special-case Mac OS X .jnilib
Change-Id: I824e83271997888712f126f4197252d7beefccc1
2013-09-30 22:09:42 +02:00
Andrzej J.R. Hunt
6eb840cc54 Set URE_INTERNAL_JAVA_DIR for unorc to allow jvm in unit tests.
Currently unit tests run in solver, the unorc in solver is simply
copied from cppuhelper/source/unorc, which doesn't set
URE_INTERNAL_JAVA_DIR, hence the jvm cannot be loaded in Unit tests.

(For comparison the URE unorc in instdir is copied from ure/source/uno{rc,.ini}
and contains the appropriate java paths.)

(URE_INTERNAL_JAVA_CLASSPATH is not needed, at least currently.)

Change-Id: I5911c9a22c92e0e20c98d0e51d5b14e020c8ec10
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, slightly modified
2013-09-16 11:39:47 +02:00
Stephan Bergmann
d1dad0cf53 Use OUString::startsWith where possible
Change-Id: I3f3b7b3600aa097187b05e21c375d087a2fa92bb
2013-09-12 13:18:19 +02:00
Stephan Bergmann
905e862c80 Pass by const ref
Change-Id: Iacbb07d6478901be77feb253f526614800564c0f
2013-09-12 13:15:08 +02:00
Matúš Kukan
b469cd235b gbuild: use xml .rdb files directly from workdir
Change-Id: I876a41dc77a59841c39b2c1fa43f22c20940dbf2
2013-09-10 22:58:04 +02:00
Stephan Bergmann
2618ff4734 UNO interface UIKs are unused for a very long time
...so mark them as @deprecated more thoroughly and always force them to zero.

Change-Id: I5db2dab924fc5a4145a0e5dd055b654985ce2ef9
2013-09-04 14:37:54 +02:00
Tor Lillqvist
ecb1850b2d Can unify this now it seems
Change-Id: I2fd0e1967028ad6632b39dfaaf377c7186a89229
2013-09-03 18:54:58 +03:00
Tor Lillqvist
1bf008c67f Update a few library names
Change-Id: I17c575ce0d4ba55a47a97d86c69a00ef7f822838
2013-09-03 00:41:07 +03:00
Caolán McNamara
b9fa1e20f3 build on higher debug levels
Change-Id: I7f4d85f3e26ab8b19dae05c6907840b97a8af1d6
2013-08-24 14:02:48 +01:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Caolán McNamara
30a96caa93 OString’ was not declared in this scope
Change-Id: I753d725963c6f617e4c2d2bd775152a7369fd977
2013-08-21 08:45:16 +01:00
Stephan Bergmann
e89e7cded7 Prefer using declarations over using directives
Change-Id: I1316fc4ae1d4dab91684bdc059f5c69c5e0c401a
2013-08-19 12:52:36 +02:00
Stephan Bergmann
477e7ad9d0 Use upcasting Reference copy ctor
Change-Id: Iab00310e2e6fcf8a43617363cf095a1bccfd9751
2013-08-19 12:52:36 +02:00
Tor Lillqvist
9a031cf705 Adapt for HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE
Change-Id: I598efffda7be77171cdff9d3d5b8705972cfba18
2013-08-18 21:11:15 +03:00