383 Commits

Author SHA1 Message Date
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Andrea Gelmini
fba66b325c Fix typos
Change-Id: I19d30a1ef4236dbe0a0053dad67a5ba7b1586fc8
Reviewed-on: https://gerrit.libreoffice.org/35054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Johnny_M <klasse@partyheld.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:04:40 +00:00
Stephan Bergmann
f33f9bb8d3 loplugin:loopvartoosmall
Change-Id: I72cdd1d386db62feff9a42651fc7f0954e76afdf
2017-03-07 19:53:20 +01:00
Noel Grandin
aadf790bbc remove some unnecessary use of OUString constructor
found with
   git grep -nP '<<= OUString\(\w*[A-Za-z]+'

Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67
Reviewed-on: https://gerrit.libreoffice.org/34864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06 05:59:56 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01: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
Jochen Nitschke
8be77aaea1 cppcheck: funcArgOrderDifferent
fixes
> Function 'Writer' argument order different:
> declaration 'nDocWidthInput, nDocHeightInput, nDocWidth,
>              nDocHeight, nJPEGcompressMode'
> definition 'nTWIPWidthOutput, nTWIPHeightOutput, nDocWidthInput,
>             nDocHeightInput, nJPEGcompressMode'

use arguments in initializer list

Change-Id: I746da5ef237b62a983df6745e1704342bcea5f9d
Reviewed-on: https://gerrit.libreoffice.org/33381
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-01-21 22:41:29 +00:00
Stephan Bergmann
4770f54888 New loplugin:dynexcspec: Add @throws documentation, filter
Change-Id: Id465279b54f775ae688d02798c7a67fc50829fc6
2017-01-19 18:03:20 +01:00
Stephan Bergmann
f89aec26a5 New loplugin:externvar: filter
Change-Id: I2f800da9b61f33c801e1bc2809378ac19f22171b
2017-01-09 15:43:32 +01:00
Noel Grandin
a08cb3b52e convert PolyFlags to scoped enum
and remove the XPolyFlags enum, which has the same values and was being
converted to PolyFlags anyhow

Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41
Reviewed-on: https://gerrit.libreoffice.org/31627
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 10:34:17 +00:00
Mark Page
d08db164dc Change Read/Write access to Scoped Read/Write access
Change-Id: Idbe8e393b64f2a151e20c1851d7c14fa161acf97
Reviewed-on: https://gerrit.libreoffice.org/31635
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 18:17:56 +00:00
Noel Grandin
70f05aa69a convert PolyStyle to scoped enum
Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e
Reviewed-on: https://gerrit.libreoffice.org/31633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 05:31:18 +00:00
Noel Grandin
7cca2c7fb3 new loplugin finalprotected
look for final classes, and make sure they don't have protected members

Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 09:10:16 +00:00
Noel Grandin
1ba4bb6397 loplugin:countusersofdefaultparams in editeng..rsc
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-11 12:12:22 +02:00
Takeshi Abe
c498c97f74 The default std::less<sal_uInt16> is fine
Change-Id: I29cd62ef0b687613ed9bda5170511dcae2fc6e7e
Reviewed-on: https://gerrit.libreoffice.org/30282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-26 08:39:09 +00:00
Stephan Bergmann
319a07c4be Simplify code further
...after 9ad0e56be46df46b021109acfd6ece9d17ce84f8 "fixes for >>= with rhs Any"

Change-Id: Idf7b7033bd0ef5501e2884841ba897f8691a5f77
2016-10-24 11:19:19 +02:00
Jochen Nitschke
9ad0e56be4 fixes for >>= with rhs Any
this changes behaviour because >>= always returned true

Change-Id: Ia7bbce1696e5c23f6e1e6f1a7e60b3c462cf0086
Reviewed-on: https://gerrit.libreoffice.org/30141
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-24 07:43:21 +00:00
Caolán McNamara
306add13e1 convert the last two lonely FixedInfos to FixedText
Change-Id: Ia6ed5f71931a6141efb3d5e5eb329149d6850342
2016-10-05 16:02:59 +01:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann
538635e089 Make OGenericUnoDialog::destoryDialog non-virtual
...it is only ever called:

* either from dtors, where the virtual-ness doesn't acutally help (and would
  trigger loplugin:fragiledestructor if that were enabled)

* or, in module filter, from executeDialog members of (final) classes directly
  derived from OGenericUnODialog without overriding destroyDialog

Change-Id: If9a7370385a27952189423e5632b3f01e18ddbb5
2016-09-15 09:30:05 +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
Noel Grandin
1256980239 convert GradientStyle to scoped enum
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-09-05 08:21:46 +02:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Stephan Bergmann
518d998e47 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I121d77de11705a4314b875374bf9f499a8afff47
2016-07-07 18:59:55 +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
Mark Page
48b7176fc0 Remove the "using namespace std" from filter
Change-Id: Ied355374a0bf662a9be70d83615446cbac9ee0b2
Reviewed-on: https://gerrit.libreoffice.org/26373
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-17 07:41:32 +00:00
Stephan Bergmann
e2574399f7 loplugin:sallogareas
Change-Id: Ib28e76ed6947431c6466d11aaadca8d95abfc275
2016-06-13 08:51:57 +02:00
Noel Grandin
272a8afa60 convert more DBG_ASSERT(false to SAL_WARN
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55
Reviewed-on: https://gerrit.libreoffice.org/26195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12 18:10:44 +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
52225a3b7f Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1
Reviewed-on: https://gerrit.libreoffice.org/25667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 11:34:23 +00:00
Noel Grandin
990082f37c Convert FontRelief to scoped enum
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011
Reviewed-on: https://gerrit.libreoffice.org/25626
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:41:53 +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
42ea4312c0 Include cppumaker-generated .hpp, not .hdl
Change-Id: Ib0451f26edbfbcdfdca78caa97bd09bc65ec2782
2016-05-11 11:31:06 +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
Noel Grandin
43b4903db3 teach stylepolice plugin about ref-counted-pointer naming
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752
Reviewed-on: https://gerrit.libreoffice.org/24459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28 09:31:16 +00:00
Stephan Bergmann
46a795c629 Some more sal_Bool -> bool
Change-Id: I32874fb49b361c14f33810e606ede1e49c1acd30
2016-04-25 16:41:21 +02:00
Stephan Bergmann
07ea0e64f2 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I887a9161107e58c9343d240c2b54e02f4e59567f
2016-04-20 17:25:41 +02:00
Stephan Bergmann
b5758dfd02 Avoid reserved identifiers
Change-Id: I8ee75a8ba2ca579cf945a7ef2a9746a2eb13611a
2016-04-18 15:30:08 +02:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00: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
6a8873c874 clang-tidy performance-unnecessary-value-param in filter
Change-Id: I6818f6c9593bfe7105cc194fcf6f69131046e4f3
2016-04-12 11:25:18 +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
Noel Grandin
f0f973da85 loplugin:constantparams in vcl/
also some improvements to the plugin

Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871
Reviewed-on: https://gerrit.libreoffice.org/23289
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16 08:42:37 +00:00
Noel Grandin
52e438caaf remove unnecessary parentheses in case labels
Change-Id: I987bf68c767709080c67c8b183c036a4109c6caa
2016-03-15 08:52:23 +02:00
Noel Grandin
9b3b0b1ceb loplugin:unuseddefaultparam in filter
Change-Id: Ieaad3145c01dc4ea7b3e7eb7859db89ebd1d7fe1
2016-03-04 14:01:19 +02:00
Noel Grandin
99469ae7b9 loplugin:unuseddefaultparams in filter
Change-Id: Ife21ac3fc2ede30694a1c7e2f9296105aa548218
2016-03-03 11:15:52 +02:00
Noel Grandin
bc9aa454ff loplugin:commaoperator in filter/
Change-Id: I88697862bfb160d4d7d257bf425507567deae837
2016-02-22 16:41:20 +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
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