Commit Graph

596 Commits

Author SHA1 Message Date
Stephan Bergmann
2cdc693c56 Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13 14:54:14 +00:00
Stephan Bergmann
f541b99855 loplugin:nullptr: Better heuristic to determine code shared between C and C++
Change-Id: I51e1c5fa4639e51fac90f92adf3d87d12960d589
2016-07-11 14:32:07 +02:00
Stephan Bergmann
a2b2b7b07e loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: Ic7827a5bb9afe04e76336e98e66483eabcaa9dde
2016-07-07 18:59:55 +02: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
Noel Grandin
6247ff3fed loplugin:singlevalfields in hwpfilter
Change-Id: I53adaca40f0cce6c155f3e35e92809dc6b2a4ab9
2016-06-24 11:41:00 +02:00
Stephan Bergmann
1f1f26bf0f loplugin:implicitboolconversion
Change-Id: I21aeb9504be38e4a6b55892730131a878234ced3
2016-06-23 13:08:11 +02:00
Gökhan Gurbetoğlu
9b9e5cfd2f tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 09:59:49 +00:00
Gleb Mishchenko
a97b392879 tdf#94698 cleanup Makefiles. Get rid of udkapi and offapi
This patch changes occurences in makefiles
from
$(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \
	udkapi \
	offapi \
))

to
$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config))

(corrected instead of abandon, jani)

Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e
Reviewed-on: https://gerrit.libreoffice.org/23426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 09:47:11 +00:00
Caolán McNamara
8f6ce60fdb cppcheck: noExplicitConstructor
Change-Id: I2bd2fd9c5768128130659213305b7da04686125a
Reviewed-on: https://gerrit.libreoffice.org/26000
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-07 08:16:20 +00:00
Michael Stahl
62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Noel Grandin
f3c1d240bd loplugin:constantparams
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361
Reviewed-on: https://gerrit.libreoffice.org/25769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 09:08:42 +00:00
Noel Grandin
8a2149c105 clang-tidy misc-assign-operator-signature
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f
Reviewed-on: https://gerrit.libreoffice.org/25154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-20 07:55:30 +00:00
Jochen Nitschke
32180be989 remove leftover comment
of commit 2c8fe2e737

Change-Id: Ic3847bf36666de598f79d19c1b28ff0f8a4881f0
Reviewed-on: https://gerrit.libreoffice.org/25123
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-05-19 06:08:11 +00:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Stephan Bergmann
b994589cec Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: I41dec58c163bdd33b71b3519fa0fd6eca72faae6
2016-05-10 17:01:40 +02:00
Stephan Bergmann
b6ecea71be Add SAL_FALLTHROUGH to what looks like flex-generated code
Change-Id: Icd980dbbdc8b55d76b7f8abe4dd1a9d7e475143d
2016-05-10 16:58:44 +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
0f3ac23d73 Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.

Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
Noel Grandin
91adb929d7 clang-tidy modernize-loop-convert in h-l/*
Change-Id: I843528327b25d18476f8959cabba16371213a48a
Reviewed-on: https://gerrit.libreoffice.org/24460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28 09:31:29 +00:00
Noel Grandin
e8fd5a07ec update loplugin stylepolice to check local pointers vars
are actually pointer vars.

Also convert from regex to normal code, so we can enable this
plugin all the time.

Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 10:55:58 +00:00
Stephan Bergmann
07b4791dc8 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Icfa6686ee96e4c9ddf23abc3ece6beae6521473a
2016-04-20 17:25:42 +02:00
Stephan Bergmann
e474c8b86a Get rid of odd _HCHAR_, _UTYPE_, _ZZRECT_ guards
Change-Id: Ic44d1c751319897c55fdd03c912cd670624f928f
2016-04-12 15:50:21 +02:00
Stephan Bergmann
6254b1f70e Get rid of _DATECODE_WEEK_DEFINES_
Change-Id: I1b50fadd64df0a18339410068696a836850e9248
2016-04-12 15:50:21 +02:00
Noel Grandin
6439005484 use SAL_N_ELEMENTS more widely
found using
   git grep -n 'sizeof.*/.*sizeof.*[0]'

Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2016-03-31 11:30:36 +02:00
Stephan Bergmann
60b1c95cc4 Extract Directories from BootstrapFixtureBase
(as some tests derive from the latter only for the Directories part, not for the
setUp/tearDown overrides: those tests will be cleaned up next)

Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f
Reviewed-on: https://gerrit.libreoffice.org/23078
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10 08:04:40 +00:00
Noel Grandin
70f87284c6 improve defaultparams loplugin
to catch calling params with defaults like "= OUSString()"

Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9
Reviewed-on: https://gerrit.libreoffice.org/22932
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07 05:57:17 +00:00
Stephan Bergmann
7a43da0613 -Werror,-Wundef
see c665a1bc0f for __STDC__ not defined under
MSVC/clang-cl.

Change-Id: I65d8a3b33ff40fc80c52b294b0c5bc75d9f5cf2f
2016-03-04 10:11:07 +01:00
Noel Grandin
5adde1bf69 loplugin:unuseddefaultparams various
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546
Reviewed-on: https://gerrit.libreoffice.org/22852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-03 11:39:56 +00:00
Noel Grandin
db8067145f loplugin:write only fields
Change-Id: I44f249a17d0a510ec63a488b656d57a1a392f821
2016-02-22 14:34:21 +02:00
Noel Grandin
ce43d0ae92 use consistent #define checks for the Windows platform
stage 1 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f
Reviewed-on: https://gerrit.libreoffice.org/22390
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-16 10:37:55 +00: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
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Caolán McNamara
2af991dc23 coverity#1349757 Unchecked return value
Change-Id: Ia2286fa9e1c351c4e4c9579b31b94ce1eac3b841
2016-01-21 14:07:45 +00:00
Noel Grandin
4ff5a55584 loplugin:unusedmethods
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e
Reviewed-on: https://gerrit.libreoffice.org/21603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20 08:13:51 +00:00
Noel Grandin
a7f6efc68b loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af
Reviewed-on: https://gerrit.libreoffice.org/21571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18 12:50:09 +00:00
Noel Grandin
bdeb15881f loplugin:unusedmethods unused return value in hwpfilter
Change-Id: Ib225db89e60708f6b55b3cb86f8e881386fab86f
2016-01-11 13:49:59 +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
Caolán McNamara
e488bc443b cppcheck: duplInheritedMember
Change-Id: I451a7a04fd1578d3095e5931f0792a32870a647e
2016-01-04 20:27:22 +00:00
Caolán McNamara
aa330a9ddc cppcheck: allocaCalled
Change-Id: I253f71f851621d8a3d1244468b9da63ba2d10b09
2016-01-02 20:32:43 +00:00
Caolán McNamara
bea8a7ad63 cppcheck: noExplicitConstructor
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
Stephan Bergmann
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
Juergen Funk
a27f2397f0 unused Picture::Type()
and removed unused TxtBox::Type(), too

Change-Id: I4a1d7f1cbbc5bb4d929fe7420db8f827dd8b142d
Reviewed-on: https://gerrit.libreoffice.org/20424
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2015-12-07 14:15:49 +00:00
Stephan Bergmann
bc2fe2249b Adapt to true wchar_t in clang-cl
Change-Id: Id127668e6786665b819b7c0b1c0cd424ebff96bf
2015-11-28 08:44:52 +01:00
Stephan Bergmann
708ef6a08d '#pragma setlocale("C")' is probably no longer necessary
...as in both files the direct use of non-ASCII characters in ordinary string
literals has since been changed to use \xXX escapes instead

Change-Id: Ic3e17a9849288a02dc69d7702782fefccb7026ee
Reviewed-on: https://gerrit.libreoffice.org/20148
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-24 15:44:26 +00:00
Stephan Bergmann
295c7827e0 Translate Korean comments
...via translate.google.com, to make file plain ASCII

Change-Id: Icbf25074bd92eb1f0fb453f9887b1f1f1ca82b57
2015-11-24 13:05:52 +01:00
Stephan Bergmann
41dbbdcc8b Remove non-ASCII U+0086 PARAGRAPH SIGN from comment
Change-Id: Ifcbb2a61c662f135badc01b7beaef10fa3d75515
2015-11-24 13:02:40 +01:00
Stephan Bergmann
f42d03f3e9 Replace non-ASCII content in ordinary string literals with UTF-8 bytes
Change-Id: Ib92221527550beb35e2263b150a509b3ef68545f
2015-11-24 13:01:10 +01:00
Caolán McNamara
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00:00
Noel Grandin
21c5ff1287 use unique_ptr for pImpl in extensions,hwpfilter/
Change-Id: I476ba7ec2ebee8c61bf9bb6ff0309cc40affb275
2015-11-18 08:35:35 +02:00
Stephan Bergmann
1acbdc6bbd Don't assume sal_Unicode is unsigned short
Change-Id: I72b0f9956e866afd22f7335a57d7dca0297e3b8a
2015-11-17 10:37:39 +01:00