1401 Commits

Author SHA1 Message Date
Stephan Bergmann
3b53a4cdb5 Blind fix for apparently buggy GCC 4.8
cf. <http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/10952/console>

Change-Id: If947e338be0ab17f41f74f8e70e6281f46a7f57c
2017-02-08 11:10:30 +01:00
Stephan Bergmann
3c5c11bf63 Use OUStringLiteral
Change-Id: I20685c733b12ef2a7efc894091a6e40d1347ac84
2017-02-08 10:14:21 +01:00
Noel Grandin
dce867e8c4 loplugin:stringconstant handle calls to constructors with one arg
Change-Id: Ide9148a908bef46ba14640dfa6f556beaf6e3f60
Reviewed-on: https://gerrit.libreoffice.org/33772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 07:57:16 +00:00
Noel Grandin
2670ca3fc5 a whole bunch of SAL_WARN_UNUSED
Change-Id: Iea28debc7d3abc58cca21bd3856cb65b321dc1e6
Reviewed-on: https://gerrit.libreoffice.org/33693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 05:32:03 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Stephan Bergmann
0d5e1cd497 New loplugin:dynexcspec: Add @throws documentation, cppuhelper
Change-Id: I20b40d0d465cfe130e03f7a8f8da6f4dab404848
2017-01-19 18:03:23 +01:00
Caolán McNamara
ef30635585 these used to OSL_TRACE, quiten them to SAL_INFO
Change-Id: Iec429b986a55a847baceb2e84752a380c6db831a
2017-01-19 15:13:37 +00: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
ae3a0c8da50b36db395984637f5ad74d3b4887bc 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
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
Stephan Bergmann
0816ec33c8 Remove dead test code
Change-Id: Iea40cee7dab736ffd954b0eae2b1dca2d9f5463b
2016-12-07 22:17:24 +01:00
Jochen Nitschke
61b00192cd tdf#88206 replace cppu::WeakImplHelper* in cppuhelper
Change-Id: I3130a3fe28c00bd83cade9667a6e3b3abcb719f7
Reviewed-on: https://gerrit.libreoffice.org/31714
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 13:25:50 +00:00
Stephan Bergmann
7a10def632 loplugin:unnecessaryoverride (dtors) in cppuhelper
Change-Id: Ia23b1fdf126fc57ce929feef60e57b64c782fb50
2016-11-28 14:15:09 +01:00
Noel Grandin
5c2c2d8dc4 loplugin:expandablemethods in comphelper..cppuhelper
Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d
Reviewed-on: https://gerrit.libreoffice.org/30717
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10 06:51:53 +00:00
Stephan Bergmann
d2615f96ac Improve some error reporting
Change-Id: Ibfdb0eeebec785438d46a0e8e6e9f4c847bfb807
2016-11-02 10:33:49 +01:00
Jochen Nitschke
d1ea6ecda6 replace <<= with assign for <<= with rhs Any
found by deleting specialization of '<<=' template

Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c
Reviewed-on: https://gerrit.libreoffice.org/29956
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-18 19:16:44 +00:00
Stephan Bergmann
2b32603793 clang-cl loplugin: cppuhelper
Change-Id: I03d082bb6e403bda0028286d89e22006578da4a8
Reviewed-on: https://gerrit.libreoffice.org/29873
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:23 +00:00
Stephan Bergmann
f255c3e96e [API CHANGE] Remove HAVE_GCC_VISIBILITY_FEATURE, always true
* GCC documents -fvisibility at least as far back as the GCC 4.0 online
  documentation at
  <https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Code-Gen-Options.html>.

* For external code, odk/settings/settings.mk unconditionally set
  HAVE_GCC_VISIBILITY_FEATURE for all platforms other than Windows.

Make this a fatal configure error for now.  The check should be removed
completely after LO 5.3 branch-off.

Change-Id: I1de415b6ed1591e0a7b6640ece861b6f0ef74112
Reviewed-on: https://gerrit.libreoffice.org/29073
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-20 07:34:27 +00:00
Stephan Bergmann
4f86b7a86c cid#1371142: Move semantics for css::uno::WeakReferenceHelper
Change-Id: I442b2d8061bd7d50cbf832b345a7a63461e26224
2016-09-19 12:40:51 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Miklos Vajna
b3c72c7340 cppuhelper: fix loplugin:cppunitassertequals warnings
Change-Id: Ia7c3de84b8001a30dbe1863be58a9639167cfa11
Reviewed-on: https://gerrit.libreoffice.org/28760
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-09-09 08:23:44 +00:00
Stephan Bergmann
d1c0a77ed1 getFactory only called with nullptr "key" argument
Change-Id: I5148e1902cb3c1d2bb87b623dfd843ccadf6c430
2016-07-11 17:27:23 +02:00
Otto Kekäläinen
428e23f4f7 Fix some spelling errors in comments and strings
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e
Reviewed-on: https://gerrit.libreoffice.org/26883
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-07-04 06:11:36 +00:00
Michael Stahl
131e604073 cppuhelper: fix use-after-free race in OWeakConnectionPoint
OWeakObject::m_pWeakConnectionPoint is returned from
OWeakObject::queryAdapter(), and stored in
OWeakRefListener::m_xWeakConnectionPoint.

This is cleared in OWeakRefListener::dispose(), called from
OWeakConnectionPoint::dispose(), called from
OWeakObject::disposeWeakConnectionPoint(), but it can happen that
another thread is in WeakReferenceHelper::get() and has copied
m_xWeakConnectionPoint onto the stack before the OWeakObject is
released and deleted, then calls OWeakConnectionPoint::queryAdapted()
after it is released, accessing the dead m_pObject.

Change-Id: I7782e6fb7e07f5a48cf7064115217376714ba8e8
2016-06-17 22:13:24 +02:00
Michael Stahl
debe788bcf cppuhelper: WeakReference isn't thread-safe
... but its documentation claims that it is, which is partially
misleading, so fix both the documentation and the data race in
WeakReferenceHelper::clear().

This actually crashed in clear() in the multi-threaded ZipPackage code
on exporting the bugdoc from tdf#94212, presumably because clear()
races against OWeakRefListener::dispose().

Change-Id: I85665c11b8157e90d15e8263758e24e66efeb86c
2016-06-17 15:10:37 +02:00
Noel Grandin
80c874dc87 remove "object is disposed" warning in OBroadcastHelperVar::removeListener
doesn't add anything of value.

Change-Id: Ie2dea7c43570640284771c992d0072ab61de425e
Reviewed-on: https://gerrit.libreoffice.org/25871
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-08 06:40:25 +00:00
Noel Grandin
4722192098 Convert XmlReader::Result to scoped enum
Change-Id: I6a0d1dcf5ae51d2ac08aacdfec50865f93e51c21
Reviewed-on: https://gerrit.libreoffice.org/25365
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 11:59:08 +00:00
Noel Grandin
6c419129f2 optimise references list handling in OWeakConnectionPoint some more
After my commit	1e063e8b "optimise references list handling in
OWeakConnectionPoint"

Reduce scope of locking, and copy a the performance trick from
OInterfaceContainerHelper.

Change-Id: Idc218e9d4edf45f8c37c7e517d1a26821800448b
Reviewed-on: https://gerrit.libreoffice.org/25406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-24 19:46:06 +00:00
Noel Grandin
6bda2bf6fe Convert XmlReader::Text to scoped enum
Change-Id: I4741b13fcf887a95b85886cb41f8236e128e81a2
Reviewed-on: https://gerrit.libreoffice.org/25364
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:19 +00:00
Markus Mohrhard
389d8db4d9 add some spaces to make it easier to read
Change-Id: I2eb1c74bc0d91d3a12a66989b696fccbf1d2825e
Reviewed-on: https://gerrit.libreoffice.org/25117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-18 22:46:49 +00:00
Noel Grandin
1e063e8b7e optimise references list handling in OWeakConnectionPoint
avoid the expensive sequence copying and deleting in
OInterfaceContainerHelper.

Change-Id: I00867b8a25b27d2a0b0babdf41a082c014e0e07d
Reviewed-on: https://gerrit.libreoffice.org/24949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-16 08:20:05 +00:00
Stephan Bergmann
9ea219dc5a loplugin:passstuffbyref
Change-Id: I5a98cea6402b0a02c0e7c329d07d05759a74ec95
2016-05-12 14:23:23 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
0c2d6574c6 Remove ancient, dead CONTEXT_DIAG code
Change-Id: I24123a54fe847b35f6b3674e2caa9bfb4b339d4a
2016-04-27 14:28:59 +02:00
Stephan Bergmann
11ba28a47d Remove ancient OSL_DEBUG_LEVEL printf
...alerting about something that is not too exciting anyway

Change-Id: I7596f14e52a0272762f923882f5f92fc3ac1ddf4
2016-04-27 14:26:51 +02:00
Noel Grandin
e1af7f0c43 clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
Stephan Bergmann
918faa4a16 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
2016-04-20 17:25:38 +02:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Jochen Nitschke
c664b27505 tdf#94306 remove unused boost dependencies
remove <boost/noncopyable.hpp> in pch and
remove boost from makefile if it was the only boost entry.

Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831
Reviewed-on: https://gerrit.libreoffice.org/24061
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13 19:47:09 +00:00
Stephan Bergmann
5c36205847 Fix indentation
Change-Id: Ia043e0a5b7ec9623f6575a83374720be1f3b6b83
2016-04-11 11:03:48 +02:00
Julien Nabet
297fd836b7 Typo: multible->multiple
Change-Id: I1c61841be58d49132ac3c69a6b227d75e829f769
Reviewed-on: https://gerrit.libreoffice.org/23972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-10 22:01:01 +00:00
Julien Nabet
efa2698299 Typo: rubust->robust
Change-Id: Icc6bef40a66d5616667d55bf02f10e19153457a7
Reviewed-on: https://gerrit.libreoffice.org/23971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-10 21:25:13 +00:00
Jochen Nitschke
98d7b02f2b tdf#94306 replace boost::noncopyable in cppuhelper
and related modules.
Replace with C++11 delete copy-constructur
and copy-assignment.

Change-Id: I18aa9fe4ff696f9b5472cbe4cd0097cb174618b7
Reviewed-on: https://gerrit.libreoffice.org/23904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-08 09:32:48 +00:00
Rohan Kumar
d6411207bd tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals to SAL_INFO
statements

Change-Id: I6f74f5146473464758f35629877a76bb2bc39b4e
Reviewed-on: https://gerrit.libreoffice.org/23071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-05 10:03:42 +00:00
Jochen Nitschke
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
Julien Nabet
1151fec7a8 Let's use the iterator return by erase method (final)
Change-Id: I1934b0c2a9ae9fa089d7e9ded4a289908fb2709a
Reviewed-on: https://gerrit.libreoffice.org/23173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-12 14:30:32 +00:00
Wastack
83452dd083 tdf#97966 redundant static keywords removed 6
Change-Id: Iaf034f3b2282a973f6503edea41cb3184543fb11
Reviewed-on: https://gerrit.libreoffice.org/23133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11 08:38:11 +00:00
Stephan Bergmann
daa6a98549 Avoid reserved identifiers
Change-Id: I6add6c03c92576127c3e3f93892bcc00c1f51424
2016-03-10 18:32:03 +01:00