1274 Commits

Author SHA1 Message Date
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
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
Noel Grandin
5145f60cc9 loplugin: unnecessary destructor: basctl..codemaker
Change-Id: Iadcfa9bc4fe9efb8d24d6d6afaf2b9b3def0bc3c
Reviewed-on: https://gerrit.libreoffice.org/33452
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24 04:59:44 +00:00
Stephan Bergmann
d86f83b6d9 New loplugin:conststringvar: basegfx
Change-Id: Ia298e6a3515de9bde212dfd6159032859a965df1
2017-01-10 08:12:28 +01:00
Caolán McNamara
9e7ff6a7e4 coverity#1398371 Useless call
Change-Id: I3614bb162cec889ee102e0284b6a3a33a98df470
2017-01-07 00:04:51 +00:00
Tibor Móger
d8796f6ef1 cppcheck unreadVariable: curr_Offset
Change-Id: Iffc1d36a0e1921f55f24f5e3f9fc1b063b7c0f16
Reviewed-on: https://gerrit.libreoffice.org/31672
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-12-06 11:50:26 +00:00
Noel Grandin
1517caa433 convert some anonymous enums to scoped
Change-Id: Ia989376c983ff475359e4964abeb1f5a2300ff5b
Reviewed-on: https://gerrit.libreoffice.org/31486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-02 06:36:48 +00:00
Noel Grandin
0a840edcc1 includes should be at the top of the file
not randomly scattered through the code

found with something like:
   git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include"

Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351
Reviewed-on: https://gerrit.libreoffice.org/30952
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18 09:25:06 +00:00
Noel Grandin
292560a957 loplugin:unusedmethods
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4
Reviewed-on: https://gerrit.libreoffice.org/29968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18 06:15:55 +00:00
Noel Grandin
5c84f40ea2 loplugin:constantfunction
update the plugin similarly to
    commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970
    Author: Stephan Bergmann <sbergman@redhat.com>
    Date:   Fri Oct 7 12:05:49 2016 +0200
    loplugin:staticmethods: Don't be fooled by decls starting with macros

Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510
Reviewed-on: https://gerrit.libreoffice.org/29665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-11 06:15:21 +00:00
Eike Rathke
a5442b6966 rtl::math::approxEqual(value,0.0) never yields true for value!=0.0
... so replace with a simple value == 0.0 also in other modules than sc.

Change-Id: Ie7316505a1cf9c15100114b45d300facceb03b7e
Reviewed-on: https://gerrit.libreoffice.org/29575
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-06 20:55:28 +00:00
Stephan Bergmann
187d7f8f52 CPPUNIT_ASSERT[_DOUBLES]_EQUAL
Change-Id: I417cea926abcc511e74a090ee90a851c138ac0c0
2016-10-06 16:35:53 +02:00
Andrea Gelmini
8f9af8dd97 Fix typos
Change-Id: Ie44267e7c9f92eb1920f05235826abff761251f1
Reviewed-on: https://gerrit.libreoffice.org/29430
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-03 13:43:44 +00:00
Caolán McNamara
59097e8d4c coverity#1371281 Missing move assignment operator
Change-Id: I7d0351931b0baa434bd24db05358e096cfa1b6e2
2016-09-23 10:17:30 +01:00
Tor Lillqvist
714de95ec5 Remove nonsense comments: // bitfield
Surely the actual bitfield syntax is enough to tell the code reader
that it is a bitfield.

Change-Id: Ic9552e01b19c8b34b2a17db56b9ff63e7c7de926
2016-09-13 11:09:06 +03:00
Gökhan Gurbetoğlu
f62d222869 tdf#43157 - Clean up OSL_ASSERT, DBG_ASSERT, etc.
Change-Id: I8114e338451b5b2e79b2318f558cbd075f024f08
Reviewed-on: https://gerrit.libreoffice.org/28584
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-05 12:53:19 +00:00
drazil
41ce5e234c tdf#43157 Clean up OSL_ASSERT
Clean up OSL_ASSERT in basegfx/source/tools/b2dclipstate.cxx

Change-Id: I4107980aa079b0e0e8605de34ecfd01587647af6
Reviewed-on: https://gerrit.libreoffice.org/28417
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-08-29 09:15:44 +00:00
Noel Grandin
45d4b2945c cid#1371223 Missing move assignment operator
and cid#1371216, cid#1371179

Change-Id: I64faaada85cc92a8b47c2a665488f07050be6fc3
2016-08-29 09:23:46 +02:00
Noel Grandin
b9ab0dd3e5 cid#1371276 Missing move assignment operator
also cid#1371234, cid#1371249, cid#1371208,
cid#1371250, cid#1371258, cid#1371266, cid#1371257,
cid#1371221

Change-Id: I18d952887b684e1999d003cec0f668789c851b52
2016-08-25 13:34:46 +02:00
Noel Grandin
69a5e1e562 cid#1371281 Missing move assignment operator
Change-Id: I29e1b042d2550bbe909ea432b161bdcb418d8976
2016-08-25 13:10:29 +02:00
Noel Grandin
781fdb676f cid#1371285 Missing move assignment operator
Change-Id: Ia822a01caec28f8137e30c05b6904c9fac367ce4
2016-08-25 13:01:25 +02:00
Noel Grandin
d5de00cc73 loplugin:unusedenumconstants in basctl..editeng
Change-Id: I49a23a197969d58a3a2d6b2be1fbe4a647c7fa08
2016-08-17 09:43:52 +02:00
Noel Grandin
e5e7475feb loplugin:countusersofdefaultparams in basctl..basic
Change-Id: I16fac3317ebf55581cb9aaef676a9759de51d695
Reviewed-on: https://gerrit.libreoffice.org/27793
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-04 05:46:22 +00:00
Muhammet Kara
0bd4154b17 tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in basctl, basegfx, canvas

Change-Id: I59383d2599793b99b560333387e163a3d80eecec
Reviewed-on: https://gerrit.libreoffice.org/27778
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-04 05:40:11 +00:00
Asela Dasanayaka
cf0fea5546 tdf#96505 get rid of "long" integer literals 'L'
Remove L from integer literals in module basegfx all 0L, 1L, and 2L

Change-Id: Ia8a0d660033651f6d0a35392b74b67358b639fb3
Reviewed-on: https://gerrit.libreoffice.org/27717
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-30 23:28:50 +00: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
Tomaž Vajngerl
5b5f66c672 basegfx: use polygon initializer_list in some places
Change-Id: Ibb83476376e1c46aedf67c9455292405219a45c1
Reviewed-on: https://gerrit.libreoffice.org/27476
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25 15:20:56 +00:00
Tomaž Vajngerl
eb09e512ae basegfx: initializer_list from polygon
Change-Id: I2d6cdb7189217e1fadb1ecf4e11cf4dd04043ec6
Reviewed-on: https://gerrit.libreoffice.org/27475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25 14:32:09 +00:00
Caolán McNamara
e11e73ff02 simplify code now
Change-Id: Ic9fed523c9077f3e9efa2af00ac5f9e9071a0dc9
2016-07-19 14:26:51 +01:00
Caolán McNamara
d074b2728a Resolves: tdf#100909 artifacts in hole of polypolygon shape
regression from...

commit 1ca06ce59b7d3cea873d2dc109a2acaec0a80759
Date:   Tue Aug 5 16:11:21 2014 +0000

    Related: #i125349# moved clip enhancements to base clipping functionality

The "reversed" clipPolyPolygonOnRange path is the problem apparently. The case
in #i125349# uses the other clipPolyPolygonOnRange path. So for simplicity just
remove the branch that's causing trouble here.

Change-Id: Ia4c60ebc44a8c239c1a7d5c84e9b970c2885ff05
2016-07-19 14:26:51 +01:00
Armin Le Grand
4609380bb0 tdf#82214 optimize performance for primitives
See svg bug doc, which is processed quite slowly. Beyond needing faster
renderers, there is also demand to improve the handling of primitives
created by SVG import.

Conflicts:
	drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
	vcl/win/gdi/gdiimpl.cxx

Change-Id: I10992a5746b8b2d6b50e3ee3fe415a035685c9ba
2016-07-07 22:32:39 +02:00
Armin Le Grand
cb382034b0 tdf#50613 speedup fat line drawing on linux using cairo
Drawing fat lines is slow on linux due to X11 having no direct
support for it. This leads to creating the PolyPolygon geometry
for each fat line, then tesselate and draw as trapezoids. This
is not buffered in any way and is done at each paint.
As a side effect, fat lines composed of multiple anti-aliased
lines also show errors since AA-ed edges do not add up graphically.
Since we have cairo now available it makes sense to use it
for fat line drawing, it is markedly faster despite being a software
renderer. No such gains for PolyPolygons though.

Change-Id: If4001556e2dd4c15ecf2587cad6ce1e864558f2d
2016-07-07 22:32:38 +02:00
Christian Lohmaier
39979c8f38 "it is working properly", not "it is working property"
Change-Id: Ief34f2e110060dc9d6200e8533c64b1e12bfb37b
2016-07-04 12:13:51 +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
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
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
Tomaž Vajngerl
37ed508022 tdf#99130 use subdivision on B2DPolygon, angle based subdivision
Remove the subdivider we used until now as there is a better
way to subdivide a polygon with getDefaultAdaptiveSubdivision,
which in additiona also caches the result. The subdivider used in
getDefaultAdaptiveSubdivision was a limited count based subdivider
so this exchanges that with an angle based one which gives much
better results.

Change-Id: I95c009ccf3d54305df0d8eef177cab0df0a23bea
Reviewed-on: https://gerrit.libreoffice.org/25033
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-05-17 11:31:43 +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
Michael Stahl
58080e8f78 basegfx,oox,slideshow: replace boost::next/prior with std::next/prev
Change-Id: I38fde54d0fdbb9c61e3df004242a70e14429f52f
2016-05-06 23:37:10 +02:00
Andrea Gelmini
9793d761cb Fix typos
Change-Id: I38b5e720af67d0bfb1be72ff82a7f5c595a94c14
Reviewed-on: https://gerrit.libreoffice.org/24535
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-02 07:11:30 +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
Noel Grandin
8762aa986d clang-tidy modernize-loop-convert in b*
Change-Id: I8ac6eb59e213eafa78e3dc4578738b53e8adef5b
2016-04-21 10:27:17 +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
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
2d72addff2 loplugin:passstuffbyref in basegfx
Change-Id: Ia7fc22152af2facf3134d9e0975cfb9608b2e931
2016-04-13 13:27:50 +02:00
slideon
75092faa82 tdf#96505 Remove 0L occurences from avmedia and basegfx modules
No compiler warnings on my machine

Change-Id: Ibd303c64f04f6f52272ac19c3069da2f14cb4e9a
Reviewed-on: https://gerrit.libreoffice.org/23558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-31 20:42:05 +00:00
Stephan Bergmann
d2f9f27774 loplugin:nullptr: Find some more cases in templates
Change-Id: I1f127d56e40b04f2b4df85c0afbcfd424d68a8cc
2016-03-30 18:59:54 +02:00
Stephan Bergmann
06895bd2c7 loplugin:nullptr
Change-Id: I7f6d030317fc7910e69c742b3160b0156e9f9200
2016-03-30 13:15:55 +02:00
Stephan Bergmann
317118c1c8 Avoid reserved identifiers
Change-Id: I036cb407c29ee375e1893b7418c7fa63bf1d592a
2016-03-10 18:32:02 +01:00