Commit Graph

129 Commits

Author SHA1 Message Date
Stephan Bergmann
7f063b77da Revert "Print the important failure messages on iOS even in a non-debug build"
This reverts commit ab07f81d0b.

> Jan 12 10:21:35 <sberg> tml_, is ab07f81d0b
>  still relevant? (one could imagine that if one wants such debug output during
> development in a non-debug build, one could build with --enable-sal-log?)
> Jan 12 10:22:01 <tml_> I have no idea what's relevant on iOS any longer
> Jan 12 10:22:26 <tml_> ... but my gut feeling would be no, can be removed
> Jan 12 10:23:14 <tml_> the rationale in the commit message sounds a bit thin
> Jan 12 10:24:02 <tml_> surely one should test an ap well enough before
>  submitting, to verify that it isn't possible to get it to try to invoke a
>  constructor that isn't included

Change-Id: I20ce8aa40a00205c1cae9d6ed4a87a6093745dc4
Reviewed-on: https://gerrit.libreoffice.org/47791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-12 16:52:36 +01:00
Noel Grandin
992a333130 clang-tidy: readability-else-after-return
run it against sal,cppu,cppuhelper

I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.

Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12 10:11:34 +02:00
Stephan Bergmann
cbc0b5e1f3 -Werror=unused-function (DISABLE_DYNLOADING)
Change-Id: I2d70946423c6b1fe56d1630d6982e91bd5c7d81a
2017-01-18 08:39:37 +01:00
Michael Stahl
6ef0336697 cppuhelper: implement environment mapping for constructor functions
ae3a0c8da5 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>
2017-01-17 22:03:11 +00:00
Stephan Bergmann
d1c0a77ed1 getFactory only called with nullptr "key" argument
Change-Id: I5148e1902cb3c1d2bb87b623dfd843ccadf6c430
2016-07-11 17:27:23 +02:00
Stephan Bergmann
97464be980 Bogus assert
implementation can indeed be empty when cppu::writeSharedLibComponentInfo calls
getEnvironmentFromModule(mod, curEnv, "", ""), which in the final if-branch
calls getEnvironment with implementation = "".  Happens when adding desktop/qa's
test-active.oxt.  Regression introduced with
ae3a0c8da5 "Add .component <implementation
constructor='...' feature."

Change-Id: Ia70958e4aa18d378ff35063bdf6187f6e073b765
2015-11-13 15:59:33 +01:00
Stephan Bergmann
bf3f840302 loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-11-10 10:31:21 +01:00
Jan Holesovsky
78f3ae6554 cppuhelper: Allow logging the used services / constructors.
Change-Id: I9090561032e2f6e97eb74b8f1e8cd1698171e6ea
2015-05-02 12:29:09 +02:00
Stephan Bergmann
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
Michael Stahl
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
Stephan Bergmann
e50ef195bc New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-07-01 15:45:52 +02:00
Noel Grandin
da906ab937 cppuhelper: remove SAL_THROW macro
Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2
2014-06-05 08:17:46 +02:00
Thomas Arnhold
530899ba18 cppuhelper: fix includes
Change-Id: I0e6bc822d19cf266dea716fe92f2ccd08d87c51f
2014-06-04 21:18:39 +02:00
Tor Lillqvist
ab07f81d0b Print the important failure messages on iOS even in a non-debug build
It might be that having fprintfs leftover in an app submitted to the
App Store is a no-go, but will fix that then if/when it happens.

Change-Id: Ic671fcce567c655a06fd4ed139100dc9b6f435be
2014-04-25 12:52:59 +03:00
Tor Lillqvist
24386ce4e3 Log what we are about to "load" in the DISABLE_DYNLOADING case
Change-Id: I75b9511e82d57da453527e7bc497ec1523ab2216
2014-01-24 17:58:22 +02:00
Tor Lillqvist
88e9329265 Use SAL_WARN, too, to increase chance of actually seeing the message
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-14 19:02:18 +02:00
Matúš Kukan
202ea1975c Only component-mapping.h is needed here.
Change-Id: I09fc944d7d19e8a2804d8530ba2a98b5719d8b37
2014-01-01 20:13:42 +01:00
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
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
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
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
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
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
b16ab7a751 "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
3fb51feb1c [API CHANGE] Remove unused CPLD_ACCESS feature from C++/Java component loaders
...introduced in 2000 with 38974aeef6 "added
library loading limitation by using env variable CPLD_ACCESSPATH=path1;path2;
etc." and 9be3c618e0 "#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
1d3164df95 "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
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
Stephan Bergmann
e89e7cded7 Prefer using declarations over using directives
Change-Id: I1316fc4ae1d4dab91684bdc059f5c69c5e0c401a
2013-08-19 12:52:36 +02:00
Tor Lillqvist
802a87e181 Adapt to library name changes for Android, too
Change-Id: I6da1f38c5a9693c13ef841442cbef017d388416a
2013-05-02 11:58:41 +03:00
Tor Lillqvist
7f7799948e Library names have changed thanks to the "layer" changes
Change-Id: I764702510b612da478959f457f95e6040c22f998
2013-05-01 20:50:42 +03:00
Tor Lillqvist
6f44df16df Avoid (harmless) duplicate entry
Change-Id: Ice43ab89b57f6ddb6b06d2fc5784d438031e864b
2013-04-24 10:37:55 +03:00
Tor Lillqvist
8ada6e3320 libcomphelpgcc3 got renamed to libcomphelper
Change-Id: I8853c5102a7271e95adf7d420bb3ed719f5b96c6
2013-04-23 19:33:04 +03:00
Matúš Kukan
65be07720b do not use deprecated rtl_registerModuleForUnloading
Change-Id: I59014906c8409fc7ac0f155c9562613c309b8b06
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-04-16 17:52:36 +02:00
Tor Lillqvist
5ef3e4ca5b Do support the deployment component unconditionally, and add ucpexpand1
Change-Id: I8a3749be43efc77317f7f10c7fd6eadaf79f99c7
2013-03-28 00:17:37 +02:00
Tor Lillqvist
3fcf0008d3 Need deployment component too when HAVE_FEATURE_EXTENSIONS
Don't look just at DESKTOP or not when deciding whether to compile that stuff.

Change-Id: Ic9961ba27eb4a1e9360c67dd844c9243f1eff00e
2013-03-28 00:17:36 +02:00
Stephan Bergmann
2d9ce9191d Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)
...which is a confusing overload with unexpectedly different semantics from the
one-parameter form.  In preparation of marking it as deprecated.

Change-Id: I4f176995546ae583fc570d770647ffc315eecc75
2013-03-20 13:05:35 +01: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