Commit Graph

112 Commits

Author SHA1 Message Date
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
bcb402298f Fix typos
Change-Id: I5e3c9683741ddc66283008c20794be5c2b2bc53f
Reviewed-on: https://gerrit.libreoffice.org/34804
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 06:56:42 +00:00
8646ab97dc Remove MinGW support
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW.  Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux.  That attempt can be considered abandoned, and
the relevant code rotting.

Due to this heritage, there are now three kinds of MinGW-specific code in LO:

* Code from the original OOo native Windows effort that is no longer relevant
  for the LO cross-compilation effort, but has never been removed properly.

* Code from the original OOo native Windows effort that is re-purposed for the
  LO cross-compilation effort.

* Code that has been added specifially for the LO cross-compilation effort.

All three kinds of code are removed.

(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)

Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10 18:01:27 +00:00
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
ca1cb1b4ac tdf#44502 cppuhelper: fix doxygen warning
Change-Id: If1bb3d7cc37449fc6be5467dc5d4380083d66211
2017-01-30 22:38:33 +01:00
b61214c91d Remove dynamic exception specifications from !LIBO_INTERNAL_ONLY
...only odk/examples/ remains to be clean up

Change-Id: I875a1e8d6750b6b007bd75126b8010273e1f32d5
2017-01-27 10:40:41 +01:00
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
0d5e1cd497 New loplugin:dynexcspec: Add @throws documentation, cppuhelper
Change-Id: I20b40d0d465cfe130e03f7a8f8da6f4dab404848
2017-01-19 18:03:23 +01:00
ad9cfbcf02 Don't exclude a var from loplugin:salbool merely because of use in >>=
Change-Id: I1b8a3dfa1dc6b351ab0903a74eae19dfa6d0888d
2017-01-05 09:17:47 +01:00
136f5a209e Prefer prefix ++/-- operators for non-primitive types.
Change-Id: I9be657cd0b5ed964db8db2ca28fd2874ae5406aa
cppcheck: performance
Reviewed-on: https://gerrit.libreoffice.org/32431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-02 10:36:33 +00:00
18f1965834 Remove convertPropertyValue overload for OUString
...it never did anything different than the generic template overload.

Strictly speaking, removing that inline function overload could be considered an
API change, but it shouldn't cause any issues in practice even when recompiling
all code against the new include files.

Change-Id: Icb0942f56ee0888f09d3478f34d568d44651c838
2016-10-21 08:58:37 +02:00
2e7b806711 Some clean-up
Change-Id: I6a46af4e6ba42f1c104662e7a035b7ecfc404752
Reviewed-on: https://gerrit.libreoffice.org/30111
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-21 06:56:16 +00:00
c48cd497b2 Revert "Some clean-up"
This reverts commit 0b04e8f80ea1b0ae0603d79b2c80d669f16375d3, shuffling the code
around started to cause some builds to complain with -Werror=maybe-uninitialized
in places where they did not before.  Needs a better fix.
2016-10-20 17:03:27 +02:00
0b04e8f80e Some clean-up
Change-Id: Ifd36b0f364dd1d5d38095d32409f8587b0662ace
2016-10-20 16:46:50 +02:00
f486329a03 TDE fix some clang plugin based warnings
Change-Id: I3b44038e8a889e4c13126fd8d721e53e71ea9ec6
2016-09-23 23:25:47 +02:00
f6766271b3 Mark new exported function as SAL_CALL
...for consistency with existing exported functions

Change-Id: Ib513dc8ce4dbf4e614f5453f2bbd32dcac4b8666
2016-09-20 11:02:24 +02:00
4f86b7a86c cid#1371142: Move semantics for css::uno::WeakReferenceHelper
Change-Id: I442b2d8061bd7d50cbf832b345a7a63461e26224
2016-09-19 12:40:51 +02:00
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
6f8d047519 loplugin:salbool: Better heuristic to determine code shared between C and C++
Change-Id: I09c9c57d5adeb665cc2508fad9727085a3289bfb
2016-07-11 16:32:28 +02:00
0ac092ed0b Clean up uses of Any::getValue() in cppuhelper
Change-Id: Ibe25c23a273db957905af972dcae64e3a0d3be8a
2016-06-20 17:20:02 +02:00
8f56d40872 improper use of this/that just bugs me
Change-Id: Ie05062cfe384971f5c358769ab16461a76f911cf
2016-06-20 08:55:29 +02:00
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
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
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
eda7d3cc45 Add covertPropertyValue bool overload
...as the behavior of the generic covertPropertyValue template instantiated for
bool would be quite different from the behavior of the convertPropertyValue
sal_Bool overload, leading to potential surprises.  (Though it seems there were
no uses yet of covertPropertyValue with bool, only with sal_Bool.)

Change-Id: I107a0608fc4271e95464a7f9bdc340a9e6dc1336
2016-05-04 17:39:06 +02:00
92a2bb9649 Declaration of sal_Bool overload of convertPropertyValue had been missing
...ever since b525a3115f54576017a576ff842dede5e2e3545d "initial import"

Change-Id: I0824b673d222b6376ca199ad37f916ccaf80aa58
2016-05-04 17:39:05 +02:00
1376eddaf7 Remove leftover declaration of convertPropertyValue overload
...that had originally been introduced with a comment

  // This template is needed at least for msci4 compiler

in b525a3115f54576017a576ff842dede5e2e3545d "initial import", and whose
corresponding definition had been removed in
6231a9b4e926d5dc213f94ddf35b14bab411d77d "visual studio version 4 is long gone"

Change-Id: I0cf4913a2c2c4701d41cf24d2f89c1de0bd86323
2016-05-04 17:39:05 +02:00
918faa4a16 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
2016-04-20 17:25:38 +02:00
4b5efd9308 Silence -Werror,-Wnon-virtual-dtor (clang-cl)
Change-Id: Icac0f029461c886ebb03aedcd54189116b66d8a3
2016-03-04 08:49:44 +01:00
79c11bb56e Use an XInitialization-based channel to request service mgr pre-init
...instead of private cppu::preInitBootstrap function

Change-Id: Id0e6fcf721b697c993e5acffaf7836452cfa9750
Reviewed-on: https://gerrit.libreoffice.org/22699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-26 12:37:04 +00:00
8d7f29a933 Re-work cppu::preInitBootstrap()
In the preinit stage, the preInitBootstrap is called to load
implementations for each service registered by the service manager.

All service requests are: initial Component Context and the process
service factory is set.

However, some services require that VCL is properly initialized.

Change-Id: Ib116e3da172b860f2df4d672f6181b5de0b7e6b2
2016-02-15 22:23:19 +02:00
df5f7c6aba Introduce lok_preinit() to preload all registered UNO implementations
Intended to be used from an application like the LibreOffice On-Line
server so that it can be called in a process that then will call
fork() several times, and much space consuming data will end up being
shared.

Change-Id: I65341c57d00308d246ec90deab8050b2c4bb3e61
2016-02-15 16:17:53 +02:00
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
0b5a5210b1 cppuhelper: remove invalid doxygen markup
Change-Id: I97e8757c1f5006bb1320b4a65da34745cc563e58
Reviewed-on: https://gerrit.libreoffice.org/21456
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13 20:05:42 +00:00
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
c18c50cda3 add SAL_WARN_UNUSED to css::uno::WeakReference and SvCompatWeakRef
Change-Id: Idb784d398ed22f2291f1beaffb82f68642d68bcd
2015-11-24 11:04:33 +02:00
5f8aaeae51 Fix typo
Change-Id: I691e655196d271661fe3ae9aa64c6c61c02d8855
2015-11-13 18:02:28 +09:00
0813839682 Missing includes (for NULL)
Change-Id: Id2359f6ff4bddb2afbc0b346e17cd858f00179e3
2015-11-10 13:14:21 +01:00
bf3f840302 loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-11-10 10:31:21 +01:00
a0be15e5d4 Note why certain replacements of odd functionality are not there by design
Change-Id: Iaa3110eaea5e295a193642555b7e14ab3fb6ff96
2015-11-06 16:32:27 +01:00
4444068070 attempt to placate Doxygen
Change-Id: Ia29a9aa59c234a92366113e176931bc286ec8abb
2015-10-21 13:14:53 +02:00
6231a9b4e9 visual studio version 4 is long gone
Change-Id: Icf0b4153d07d9c412889d6a7364d4282bba33032
2015-10-21 11:54:57 +02:00
08233bd258 com::sun::star->css in include/cppuhelper
Change-Id: I3d9dcd4cd756a3f0d9cedd894377a117c9dbeecc
Reviewed-on: https://gerrit.libreoffice.org/19486
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-21 06:36:39 +00:00
b3ebda451f Fix typos
Change-Id: Ia8b2176a439742769e61fb6a981000f316033071
Reviewed-on: https://gerrit.libreoffice.org/18954
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 12:36:37 +00:00
b55166d266 Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
2015-06-29 10:11:53 +02:00
e57314f61f return and use std::vector from OInterfaceContainerHelper
since most of the time we don’t need a heavyweight uno::Sequence.
Adds a new method getElementsAsVector().

Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a
Reviewed-on: https://gerrit.libreoffice.org/15747
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-29 07:25:22 +00:00
2a65bf32ec Revert "Typo: iff->if"
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d.

iff can mean "if and only if" so not a typo
2015-06-23 20:42:27 +02:00
cf92da3d6e Typo: iff->if
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-23 20:30:11 +02:00
a51ac4d2bb Add variadic PartialWeakComponentImplHelper, remove need for implbase_var.hxx
Change-Id: Iad3417822b2ab3afb75da09c311a0bf07af5e2e4
2015-06-22 21:48:36 +02:00
592ba8776b comment the element_alias union
Change-Id: I0467b2e3d124e71da7df150da31e3936615e098b
Reviewed-on: https://gerrit.libreoffice.org/15746
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-16 18:02:03 +00:00