1408 Commits

Author SHA1 Message Date
Noel Grandin
7b4ca582fc convert RegError to scoped enum
Change-Id: I55977c38578cb59deb195d91f8948da2e0905b6a
2015-04-09 08:41:11 +02:00
Noel Grandin
95600edeaf convert RegValueType to scoped enum
Change-Id: Ic672e75db4d7323760577b19490ffa28d38965b6
2015-04-09 08:41:11 +02:00
Noel Grandin
1bdbe0b475 convert REG_ constants to scoped enum
Change-Id: I11d92218c5e0678d497f8964723033e2bd8b3300
2015-04-09 08:41:11 +02:00
Stephan Bergmann
2fc4a8c811 Add support for cppu::UnoType<void>
Change-Id: I88259ffaffc73979c240721d2db166c79d3085f1
2015-04-01 12:48:44 +02:00
Stephan Bergmann
ead3062336 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I620bf5d46c19f0182e822265eadf8eb11001855e
2015-04-01 08:38:16 +02:00
Stephan Bergmann
caaf1436d7 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I0392b2fc9e48aab4a20849d8203cae96b1ef2d2c
2015-03-31 13:13:09 +02:00
Stephan Bergmann
e97b327266 Clean up C-style casts from pointers to void
Change-Id: I92c0a6c602e473b796df43b88c98b823de8d9399
2015-03-28 19:09:19 +01:00
Noel Grandin
aa7a829e7d loplugin:staticfunction
Change-Id: Id796b799f8e2fcc3eae98d43800c5e31fec27fef
2015-03-27 10:51:08 +02:00
Julien Nabet
b33788cb6b Typos
Change-Id: I665a56fcad10e136e949a10497f6ab8813af9968
2015-03-25 21:19:59 +01:00
Julien Nabet
6baf24c4d2 Typo: constarined->constrained
Change-Id: I3326843195e6a3b030409ac3b20bbea55e739366
2015-03-15 15:28:37 +01:00
Michaël Lefèvre
c3cd100556 CppCheck cleanlyness : reduce variable's scope
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f
Reviewed-on: https://gerrit.libreoffice.org/14843
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-03-12 22:28:38 +00:00
Julien Nabet
48f0a5ed35 Typos
Change-Id: I845a85e1aad4a0708f2b43f7d94606b4b5513ee4
2015-02-18 21:59:02 +01:00
Ashod Nakashian
de68bb8514 Updated all precompiled headers.
Change-Id: I955c8ac4dbe002d23531df7eb10fb4444d6b5157
Reviewed-on: https://gerrit.libreoffice.org/14292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-05 10:46:33 +00:00
Stephan Bergmann
cead54b6e5 Use vector::data
...in some places where it is obvious that it does not hurt that for an empty
vector the obtained pointer is not necessarily a nullptr.

Change-Id: Id5d66b1559ca8b8955d379bcdbfae6986ef46a51
2015-01-28 17:56:18 +01:00
Stephan Bergmann
0866023faf Get rid of std::auto_ptr in stable URE interface
...the deprecation-warning noise is getting ever louder, and eventually auto_ptr
will just disappear.  Just surrender and use good-old plain pointer and deletion
in dtor---it's probably the best to do in this stable interface.

The change is backwards compatible.  For one, in all relevant standard libraries
(libstdc++, even in debug mode; libc++; msvcrt) sizeof(auto_ptr<T>) equals
sizeof(T*).  And for another, the removed UnoUrlDescriptor ctor was only called
from within cppuhelper and had deliberately been left out of
cppuhelper/source/gcc3.map (so isn't exported at least on Linux)---marking it
SAL_DLLPRIVATE had probably just been forgotten when retrofitting cppuhelper
with CPPUHELPER_DLLPUBLIC annotations.

Change-Id: Ic8bce29d93938f2b2e0a264baee85132668e1294
2015-01-27 10:03:01 +01:00
Caolán McNamara
ede590128f coverity#1266445 Explicit null dereferenced
Change-Id: I2d62d6972d085fe818ec6767a0660afb010bece8
2015-01-25 20:49:55 +00:00
Stephan Bergmann
dbdb819501 Some more loplugin:cstylecast: cppuhelper
Change-Id: Ifc11a0ea20a4eec40544cd931d0f94e0db3e3288
2015-01-20 09:06:46 +01:00
Stephan Bergmann
619b13f054 Variadic cppu::WeakComponentImplHelper
Change-Id: I79371b4ad9d29a5ab8fd01244c3f80db92b07f97
2015-01-16 15:17:05 +01:00
Stephan Bergmann
d3ce5b298e Fix getTypes() of OPropertySetHelper and derived
...broken with 60d60caf99a40ca0c3891bf230c5a1fdbae5f49c "Renamed XPropertySet2
to XPropertySetOption" et al

Change-Id: I684736ffafc4642548b7c24171cc52c1acb32252
2015-01-16 10:19:36 +01:00
Stephan Bergmann
d4019c97c5 -Werror=array-bounds
Change-Id: I6766ccc5e760b34a4e276c1322745533a00131fa
2015-01-07 15:20:52 +01:00
Caolán McNamara
8ab4d2f29f drop crashrep unused since start of LibreOffice
Change-Id: I3df1216054c133314b2317849744a0a37e9fbc8f
Reviewed-on: https://gerrit.libreoffice.org/13733
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-07 11:41:32 +00:00
Stephan Bergmann
0d44e98d6a Variadic cppu::WeakImplHelper
Change-Id: Ia02a7c94ca282f28fa3c191dd65a71b6bf031792
2015-01-07 12:20:54 +01:00
Caolán McNamara
7f476fea47 boost::unordered_map -> c++11 std::unordered_map
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00:00
Stephan Bergmann
9598e9061f -Werror,-Winfinite-recursion
Change-Id: I483cd3f3a3ba87c416985fd86b9d5b711a2a18fb
2014-12-22 11:09:57 +01:00
Stephan Bergmann
d269b9ab6a Remove unused */qa/checkapi/
...superseded by CppunitTest_odk_checkapi

Change-Id: I5df89a1a12f496984deab153f0ba2734323c1293
2014-12-19 10:06:45 +01:00
Stephan Bergmann
f137353904 cppuhelper: Use appropriate OUString functions on string constants
Change-Id: I52a38a07982801087903817ec5b65e992a1d58d1
2014-12-16 17:27:57 +01:00
Stephan Bergmann
1be14f1a00 cppuhelper: Use appropriate OUString functions on string constants
Change-Id: I7957898ed3172e79888bdb793e304359b10d75d7
2014-12-12 10:22:33 +01:00
Stephan Bergmann
6ddde10b40 rhbz#1036877: Join Java AsynchronousFinalizer thread well before exit
AsynchronousFinalizer was originally added as
870a4401c05beec3d31c1f6055a64591edd0a9d9 "INTEGRATION: CWS mtg1: #i57753# Avoid
long-running finalize methods" referring to
<https://issues.apache.org/ooo/show_bug.cgi?id=57753> " Fix JNI-UNO bridge so
that the JVM doesn't run out of memory when a destructor locks the SolarMutex."

It is unclear to me how relevant "If JVMs are getting more mature and should no
longer have problems with long-running finalize methods, this class could be
removed again" really is in practice.  After all, advice on hotspot-gc-devel is
to avoid finalize() if possible
(<http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2014-June/010215.html>
"Re: History of finalizer execution and gc progress?").  So stick with this
approach of home-grown draining for now (where a home-grown approach using
PhantomReferencens would need a dedicated draining thread, too, so would not
have much benefit over the existing code in practice).

Timely termination of AsynchronousFinalizer threads is achieved by using a
dedicated thread per bridge and joining it in the remote bridge's dispose()
resp. the JNI environment's new java_env_dispose.

Change-Id: Idcef2dbf361a1de22f60db73828f59e85711aea7
2014-12-09 13:17:03 +01: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
11b0ce9bab cid#706201: No need to call access prior to realpath here
...and thus silence a TOCTOU warning

Change-Id: I17f36181946616747d84aca6d43e44d180dc8741
2014-11-18 12:17:18 +01:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Andrea Gelmini
c70f1545e2 Removed duplicated includes
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6
Reviewed-on: https://gerrit.libreoffice.org/12160
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-31 16:18:30 +00:00
Noel Grandin
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00:00
Matúš Kukan
98bb53a560 fdo#80927: css.office.Quickstart should be single-instance service.
Incorrectly converted in a384b21cc40818bf3c918951a086a30b5d9d8022
where SFX_IMPL_ONEINSTANCEFACTORY was used.

AFAICS it's the first converted single-instance service which implements
css::lang::XInitialization. That's kind of strange but can do its job.

sbergman@redhat.com:  Three things were necessary in order to not call the
~ShutdownIcon code too late during exit now:

* Move the relevant code from ~ShutdownIcon to ShutdownIcon::disposing.

* Add a dummy <singleton name="com.sun.star.office.theQuickstart"/> so the
  service manager will eventually dispose the (single) instance.

* In
  cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments
  do not shortcut updateDisposeSingleton in that odd case of calling
  createInstanceWithArguments on an implementation that (effectively) is a
  singleton (as otherwise the service manager would still not dispose it).  It
  looks to me like that "return inst;" was an inadvertent leftover in
  874c481801434d4fac3c50f076bff0fe3a3988b6 "Simplify service manager's tracking
  of singletons" and wasn't intended to serve some subtle purpose.

Change-Id: Icd4d3168ec0bbb820b17ac321fe897ac9f9ce7fc
2014-10-08 14:45:54 +02:00
Stephan Bergmann
05dfa2f6bf cppuhelper: std::auto_ptr -> std::unique_ptr
Change-Id: I601fac44b272671b2763b45c5ef284cdd44d5066
2014-09-30 10:33:25 +02:00
Stephan Bergmann
18539f46e9 Adapt cppu::bootstrap to new Mac OS X LibreOffice.app layout
Change-Id: I60db70c38d138455230ee56a26d840aa68885b44
2014-09-29 22:53:14 +02:00
Matthew J. Francis
0af1c09b3a Eliminate memory leak due to circular shared_ptr
Without this, a Data::Implementation can have a circular reference of
shared_ptr to itself through .factory1

Change-Id: Ie05545e7ecc0ae85256d2c374fe79f0c678ccf64

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-25 10:45:31 +02:00
Noel Grandin
9685276b97 cppu and cppuhelper: loplugin: cstylecast
Add a macro in include/cppuhelper/implbase_ex.hxx
to make initialising the type_entry classes a little less verbose.

Change-Id: I0904b5b9db269c92bc89e7ce3d6c8b09350c9897
2014-09-17 07:08:23 +02:00
Norbert Thiebaud
0cac63da23 fix access to potentiellement empty string
Change-Id: I84fc6b7e5528b677411163ee3c9d05d4f2e6feb2
2014-09-12 01:45:28 +02:00
Tor Lillqvist
6492c8576e Make the "Mac-like" or "canonical" app bundle structure always used on OS X
In other words, only executable files go in the MacOS folder. Dynamic
libraries and bundled frameworks (i.e., LibreOfficePython), and
nothing else, go in the Frameworks folder, and all other files go in
the Resources folder.

Especially, note that Java class files and rc (.ini) files also go in
Resources.

Such an app bundle structure is what Apple strongly suggests one
should use, and it has been hinted that future versions of code
signing and/or Gatekeeper will require such a structure.

There is still some ugliness thanks to traces of the historical
separation of URE from "the office". Like there are two separate
"unorc" files, one for URE, one for the LibreOffice application. IMHO,
this should be cleaned up, but is probably controversial.

(Eek! I now see there are actually *three* unorc files in the app
bundle. Not intentional. Need to fix that later.)

Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
2014-09-09 13:55:23 +03:00
Stephan Bergmann
2d73a9d7e8 Remove unnecessary #include
Change-Id: I7064bfd29f5ce4da2cb46d5b7e9984bc21b16f41
2014-08-18 14:11:25 +02:00
Michael Stahl
83dbae1da7 warning C4702: unreachable code
Change-Id: I8a1e67d3ec1ef0c94b41e46a29a40280468d5e76
2014-08-08 16:23:35 +02:00
Matthew Pottage
608ebc6f01 Remove redundant inclusions of header "cppuhelper/shlib.h"
Change-Id: Iab402035613a6cc96b7b4ebd2981a1fd0f8bed23
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-08-08 12:02:16 +02:00
Matthew Pottage
03e0bd6b3b [API CHANGE] Removed two cppuhelper deprecated headers.
The headers cppuheader/compbase.hxx and implbase.hxx. They have been deprecated
since 2001. Moved the definitions of the deprecated functions to
cppuhelper/source/compat.cxx.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, adding fixes and clean-up
in cppuhelper/source/compat.cxx and odk/Package_odk_headers.mk

Change-Id: I48b3cbf551b59d72614737a883a96aab55fc2090
2014-08-08 11:25:55 +02:00
Takeshi Abe
ef9449cd04 Avoid possible memory leaks in case of exceptions
Change-Id: I5e302cf7ac784e1413c0539d0c967a3523f04ba0
2014-07-12 07:57:32 +09:00
Noel Grandin
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
Stephan Bergmann
e50ef195bc New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-07-01 15:45:52 +02:00
Stephan Bergmann
a15715c343 -Wstrict-prototypes
...no reason to not have it enabled for URE C include files and what
little real C code is still left.  (But note that Clang ignores that
warning.)

Change-Id: Ia6940f9f940a0c226e9b724331d65c9862ce32e6
2014-06-17 15:51:54 +02:00
Noel Grandin
da906ab937 cppuhelper: remove SAL_THROW macro
Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2
2014-06-05 08:17:46 +02:00