Commit Graph

120 Commits

Author SHA1 Message Date
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
Luboš Luňák
2c17beb796 Wundef, fix various more or less broken debug code
Change-Id: I347495f7960da099afdfbf3db608e0347b832f99
2013-03-18 17:15:57 +01:00
Michael Stahl
113a927341 cppuhelper: log failures from osl_loadModule calls
Change-Id: I37099d15cd403f48ca1716414f2e79cc1213d8c8
2013-02-25 14:27:06 +01: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
Tor Lillqvist
392510d7e4 UNO components have the "lib" prefix only on Android
That they do is a leftover hack from before we started using the
DISABLE_DYNLOADING thing on Android, it isn't actually necessary any
more. Earlier when the UNO components were actually dynamic libraries
on Android (too, as on desktop OSes), they *had* to have names
starting with "lib" or they would be silently skipped when
packaging.

Change-Id: I11a4689f316e1ffb640a5c3110c63296d2833a84
2013-01-06 16:01:07 +02:00
Michael Meeks
9d7c1dcbbb re-base on ALv2 code. Includes:
Patches contributed by Ocke Janssen
   converted reportdesign.
   http://svn.apache.org/viewvc?view=revision&revision=1396797
   http://svn.apache.org/viewvc?view=revision&revision=1394326

   Patch contributed by Oliver Rainer-Wittmann
   sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
   apply print settings to new printing routines
   http://svn.apache.org/viewvc?view=revision&revision=1172115
2012-12-06 09:12:57 +00:00
Tor Lillqvist
d1006596f2 Update library names for DISABLE_DYNLOADING
Change-Id: I2b5e4abdceea25180c9caafabc49c22077016a05
2012-10-11 10:07:08 +03:00
Tor Lillqvist
97f27e2cda Include android-bootstrap.h for Android
Change-Id: I022f7d450f66e1ff0fb4e4aedfebc16b83ad32b9
2012-10-11 10:07:04 +03:00
Tor Lillqvist
3c4c117008 I want to see what unknown library is required always
Change-Id: I7e0eb7ba3be8ac2b70e6a56d84c1a890be0ba396
2012-10-09 11:41:31 +03:00
Tor Lillqvist
97593ae24a Handle lack of module loading/unloading API when DISABLE_DYNLOADING
There are basicically two classes of cases:

1) Where the code is for obscure historical reasons or what I see as
misguided "optimization" split into a more libraries than necessary,
and these then are loaded at run-time. Instead, just use direct
linking.

2) Where dynamic loading is part of the functionality offered to some
upper (scripting etc) layer, or where some system-specific non-LO
library is loaded dynamically, as it is not necessarily present on
end-user machines. Can't have such in the DISABLE_DYNLOADING case.

Change-Id: I9eceac5fb635245def2f4f3320821447bb7cd8c0
2012-10-07 07:59:15 +03:00