Commit graph

509 commits

Author SHA1 Message Date
Stephan Bergmann
802f2a4208 Don't allow O[U]StringBuffer in string concatenation
...as

  OStringBuffer b("foo"); b = "bar" + b;

doesn't work as one might expect (see the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2016-October/075464.html>
"concat of OUStringBuffer".  That feature was LIBO_INTERNAL_ONLY, anyway.  And
of the affected places, MethodDescriptor::getSignature
(codemaker/source/javamaker/javatype.cxx) was the only one that would actually
have benefitted.

Change-Id: Ib84266f43e40c42c2e428f0c0616db8cfa90adff
2016-10-12 16:05:32 +02:00
Andrea Gelmini
f0249a88fc Fix typos
Change-Id: I6730c6c5eab9157533822e5045e9f86109062580
Reviewed-on: https://gerrit.libreoffice.org/29433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 11:21:52 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "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
Caolán McNamara
107e5981b4 default dtors are fine here
Change-Id: I503f954a2729aa2737d783ed8c72f62d8a68da4c
2016-08-30 19:26:41 +01:00
Stephan Bergmann
1a212efd3a loplugin:stringconstant: adapt to improved OUStringLiteral1 (forms)
Change-Id: I25323e586bb80b833d1b2dace5498de853aa039e
2016-08-30 15:28:09 +02:00
Gökhan Gurbetoğlu
674e0f0b43 tdf#100726 - Improve readability of OUString concatanations
Change-Id: I3099818283a9801976288d0efa67a8711106f376
Reviewed-on: https://gerrit.libreoffice.org/28360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-26 07:15:34 +00:00
Noel Grandin
8806a86c9d loplugin:unusedenumconstants in forms..sot
Change-Id: Ic445e1bdd012c32ef7d84aec9df908467c3296a7
Reviewed-on: https://gerrit.libreoffice.org/28055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-12 06:53:29 +00:00
Noel Grandin
b4e12269e8 loplugin:countusersofdefaultparams in editeng..fpicker
Change-Id: I6356c95296d81736fc6d66e510cd70606ee55f68
Reviewed-on: https://gerrit.libreoffice.org/27897
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 11:54:17 +00:00
Muhammet Kara
41051ebbc4 Localize error message in ODataTypeRepository
Change-Id: I92b5a69daf405d71bf8f72685696c647a64cc9d1
Reviewed-on: https://gerrit.libreoffice.org/26807
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-07-04 06:17:41 +00:00
Noel Grandin
42486dde49 move #includes to top of file
instead of being randomly embedded somewhere deep inside the CXX code.

Found with:
  git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t :

Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a
Reviewed-on: https://gerrit.libreoffice.org/26764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-29 14:49:19 +00:00
Stephan Bergmann
ac265f6210 Further clean-up
Change-Id: I16b8bfe2c4a337acf188ec8ffa2ed084ca437faa
2016-06-29 11:38:22 +02:00
Stephan Bergmann
9503a69514 Remove unused template parameter
Change-Id: I3b1f54f88351512cbe2e555f9ca9c1c0dcc2c098
2016-06-29 09:41:35 +02:00
Noel Grandin
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00: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
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Stephan Bergmann
715d4d803a Avoid reserved identifiers
Change-Id: Icc658a3adce2e93c3cc4e8a88689f462b1c7c8a1
2016-04-22 10:22:00 +02:00
Stephan Bergmann
be48e04b5b Elide const vars
Change-Id: I1b2a7b071f9740e8c848f543e32fd47f054c8318
2016-04-22 09:32:55 +02:00
Stephan Bergmann
bfb185c408 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I74cf43df85a878ee9af69901b2535f63461cb61e
2016-04-20 17:25:41 +02:00
Stephan Bergmann
e2baeba6e2 loplugin:simplifybool
Change-Id: I6e8c06c28d710709d4a6b240e634d0216823cbe4
2016-04-20 17:25:32 +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
Noel Grandin
62633dfe02 clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14 11:37:19 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +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
Wastack
20ba5d464a tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: I8bcd7e8a492ee4dbfa5141416c7c038a1391cf20
Reviewed-on: https://gerrit.libreoffice.org/23673
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:45:36 +00:00
Rohan Kumar
b430ec96e3 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals and in some
places i replaced OSL_ENSURE(..) with assert()

Change-Id: Ide7e4b633e85a699f680f47caac5bff36bf180a2
Reviewed-on: https://gerrit.libreoffice.org/23076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-11 23:36:55 +00:00
Noel Grandin
b0e18a68c8 loplugin:unuseddefaultparam in forms
Change-Id: I5a2b50163acfda3878fe5625a605e3437a7cc700
2016-03-02 07:57:38 +02:00
Eike Rathke
c094049173 use SearchOptions2
Change-Id: I58d39616dc15fc973e1377ed205452a683baf080
2016-02-25 17:33:37 +01:00
Noel Grandin
db8067145f loplugin:write only fields
Change-Id: I44f249a17d0a510ec63a488b656d57a1a392f821
2016-02-22 14:34:21 +02:00
Chris Sherlock
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
Eike Rathke
599f0cbe1d interface to new XTextSearch2 with SearchOptions2, tdf#72196
Places that had utl::TextSearch::UpgradeToSearchOptions2() introduced
are worth an inspection if the new SearchAlgorithms2::WILDCARD search
should be supported or at least use SearchOptions2 instead of
SearchOptions to eliminate the small performance penalty that conversion
involves.

Change-Id: I565f73af2b551ae9ad0f488e672823dc6c5c1109
2016-02-05 17:02:47 +01:00
Andrea Gelmini
534b2a4b58 Fix typos
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3
Reviewed-on: https://gerrit.libreoffice.org/21797
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-05 06:48:38 +00:00
Stephan Bergmann
608dee4f5f loplugin:privatebase: Make various derivations public
...assuming they were implicitly made private by accident rather than by design.
(And private derivation can cause unexpected failure of dynamic_cast, cf.
63b67ab5ca "Use public derivation, and remove
then-unnecessary downcasts.")

Change-Id: Id821afba34fd2f155e30fac903567707e46d1fde
2016-01-11 13:17:10 +01:00
Noel Grandin
aa4dc89352 loplugin:unusedmethods unused return value in forms
Change-Id: I9da3e72ca12e040e7fb5bea7ccaa071edfd34f27
2016-01-11 13:14:08 +02:00
Andrea Gelmini
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
Noel Grandin
5b339db1ab loplugin:unusedfields in forms
Change-Id: I875c07dcfc9fd9537ced1facd88ac712a7dacbbd
2015-12-23 08:13:53 +02:00
Caolán McNamara
e2ed122ff3 coverity#1343619 Unchecked return value
Change-Id: Icc27e275d376b3ff66d0e44eb23e62f57f9cc470
2015-12-19 18:10:14 +00:00
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Noel Grandin
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
Noel Grandin
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
Stephan Bergmann
11d3652418 loplugin:nullptr (automatic rewrite)
Change-Id: Ic67c3138ca66c6b6d6fcf76b09d4581e23f51f8d
2015-11-10 10:31:26 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Noel Grandin
1b41208608 use uno::Reference::set method instead of assignment
Change-Id: I3d94c94a9829161663a7ed18421ace38ce95a659
Reviewed-on: https://gerrit.libreoffice.org/19733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02 06:17:21 +00:00
Noel Grandin
644487a115 loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27 08:20:43 +00:00
Noel Grandin
a673713bb3 more removal of com::sun::star typedefs
Change-Id: Ia73f1b4f1dcfa3f0936359e744afe76e02dcd2eb
2015-10-21 15:10:24 +02:00
Noel Grandin
2f3ea8dfbc refactor out some com::sun::star typedefs
which mostly serve to make the code harder to read

Change-Id: Ia2a83fee9f850ab6f0bea6305ce8600d6b785fe8
2015-10-21 14:17:56 +02:00
Stephan Bergmann
10e1562565 loplugin:defaultparams
Change-Id: I0a64398f49c8823327263aad0c79b182161177ea
2015-10-20 11:45:39 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Caolán McNamara
7ba7a974f6 cppcheck: noExplicitConstructor
Change-Id: I32c6728ce7423fd997cdbec66feb8a6ba39948d2
2015-10-07 15:11:03 +01:00