106 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
Noel Grandin
a34b33d2b9 convert SvxDateType to scoped enum
Change-Id: I5ce04f252642cb3a6c1b08ee22255f6c7b97f0f8
Reviewed-on: https://gerrit.libreoffice.org/35842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30 06:26:12 +00:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Julien Nabet
2b21ac16c2 Various typos on accessible
Change-Id: Id28a4a2cbbcec10a7cc9cb40ad208d575352039b
Reviewed-on: https://gerrit.libreoffice.org/34161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-12 07:43:23 +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
Noel Grandin
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
Noel Grandin
30e39e4793 loplugin:expandablemethods in drawinglayer..editeng
Change-Id: Ic7fe13651e18b4eec90ef3fd8d7aab81197e0f39
Reviewed-on: https://gerrit.libreoffice.org/30707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 10:34:31 +00:00
Caolán McNamara
c484c353ef rework to avoid coverity#1371205 Missing move assignment operator
Change-Id: I117fa0891e8cd1bf339bded93a7ee19d799caf9f
2016-10-26 21:34:33 +01:00
Caolán McNamara
424c7fb6ca we don't need ree after the loop here
Change-Id: Ib288ab3a7abf8f45c1175c36dcd4349dc4ad019f
2016-10-26 21:24:01 +01:00
Jochen Nitschke
7aa10d2be1 fix out of bounds error
there are 22 entries, but Sequence was allocated with 21 fields

Change-Id: I6af71e2ece99b643843b4d82e0c6be332be361fa
Reviewed-on: https://gerrit.libreoffice.org/28852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-13 13:09:44 +00:00
Caolán McNamara
0d174c9748 Resolves: tdf#101003 don't give paras in editeng accessible names
change since...

commit c23ab5eaed57cc3fb5860e26c591c73c5b22687b
Author: Steve Yin <steve_y@apache.org>
Date:   Tue Nov 26 14:25:22 2013 +0000

    Integrate branch of IAccessible2

keep the accessible description, but drop thea accessible name which
is reportedly an undesirable change.

Change-Id: I8f9c53ef967c4e566fde1829832aa035efce4f23
2016-07-27 13:19:03 +01: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
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
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:25:45 +00: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
Stephan Bergmann
9ad66e5ae9 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I626b79e1450d78aec96c206db82bf64a47305d08
2016-04-20 17:25:39 +02:00
Stephan Bergmann
de907bf54d Simplify code
Change-Id: I2ac0564a5a6714111abdcff48edff070d75892b7
2016-02-10 08:04:22 +01:00
Stephan Bergmann
5a5dbb31d5 Use rtl::Reference<CppType> instead of HardCppRef<UnoType,CppType>
Change-Id: I089b5caca5e05726105f78aeb00db1869d0a17f4
2016-02-09 18:30:54 +01: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
Julien Nabet
1570957ff9 cppcheck: fix 2 variableScope reports in editeng
Change-Id: Ic87c5b1d8f96b7f25ce323a49455d1ac16d1bf86
Reviewed-on: https://gerrit.libreoffice.org/21533
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-01-17 13:53:44 +00:00
Noel Grandin
1f9a610de1 loplugin:unusedmethods unused return value in include/editeng
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970
Reviewed-on: https://gerrit.libreoffice.org/21361
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12 07:39:42 +00: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
Stephan Bergmann
217f7f236f loplugin:nullptr (automatic rewrite)
Change-Id: I9fe00eef7ddcd4a3c87e497a8d62f98e71a0d6d8
2015-11-10 10:31:24 +01:00
Noel Grandin
addb63fa8a convert Sequence<XInterface> constructions to use initializer lists
Change-Id: I66475190cc0f18465c56b94af7bc0d5a1ca81242
2015-10-30 08:10:22 +02:00
Noel Grandin
39e63bfac5 convert remaing DBG_WARNING to SAL_INFO
and drop the macro

Change-Id: I452ca373d0c277166e94928c1bce78bf37e39d7c
2015-10-19 13:08:29 +02:00
Andrea Gelmini
f891d8cf6b Fix typos
Change-Id: I9dbe1e05cf73af20c25392e639a807854e87fc6e
Reviewed-on: https://gerrit.libreoffice.org/18946
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 12:38:37 +00:00
Oliver Specht
ac9671f948 tdf#94559: second step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
    chart2, connectivity, editeng, extensions, filter, forms, framework, idl

Change-Id: I6a2f9d8bbccb07088413f7552af4b5af8f0cad99
Reviewed-on: https://gerrit.libreoffice.org/18920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 06:07:57 +00:00
Noel Grandin
eb012bf0a8 editeng: com::sun::star->css
Change-Id: Ied65d2de394ce54cb2c35abb152cf58ac3139395
Reviewed-on: https://gerrit.libreoffice.org/18503
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-13 06:21:03 +00:00
Caolán McNamara
267f401e2a cppcheck: noExplicitConstructor
Change-Id: I2a1add8cf526cdb305ad99ccb138454a88f2fdbd
2015-09-07 09:56:07 +01:00
Noel Grandin
2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Stephan Bergmann
bfa4494560 loplugin:simplifybool
Change-Id: I0d41417b964f7f43b413a7b29fb1cf930f363427
2015-04-24 12:36:21 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Caolán McNamara
3c3a53b3d2 coverity#1267693 Uncaught exception
Change-Id: Id6ed00e9c23cf0cd48ead203e772450680687762
2015-02-01 22:10:37 +00:00
Caolán McNamara
90ec1a6077 coverity#1266455 Explicit null dereferenced
Change-Id: If772142b776d2365cbd2b7f0927975c2739c1316
2015-01-25 20:55:56 +00:00
Caolán McNamara
54d8dbdcb4 coverity#1266454 Explicit null dereferenced
Change-Id: Ic8f13e9bd3755c9ccb59d173ac0a36be1d06a2f4
2015-01-25 20:54:51 +00:00
Caolán McNamara
383a5f2ef1 coverity#1266453 Explicit null dereferenced
Change-Id: Ia03fdd3d854574ba19b028334e2397ad544fe20a
2015-01-25 20:53:34 +00:00
Stephan Bergmann
eb0f855f8c editeng: Use appropriate OUString functions on string constants
Change-Id: Iab879390c18a3ce2c5bfc49548ca273ce0b907da
2014-12-18 14:12:25 +01:00
David Tardon
f141ef6bcf coverity#982160 unchecked return value
Change-Id: I94117e9f53f1929906b88b2a31d0fcfdf2e40c8d
2014-11-03 18:50:59 +01:00
Noel Grandin
4923ac72aa loplugin: cstylecast
Change-Id: I58582059495f7c50880038e2174ea2de026aa1c9
2014-10-01 13:08:42 +02:00
Caolán McNamara
d2a3b21ade coverity#1132709 Uncaught exception
Change-Id: If828f82e36d12ceca7e6392de5757a131c99462c
2014-08-17 16:39:20 +01:00
Caolán McNamara
6db415b150 coverity#706504 Uncaught exception
Change-Id: I727779317672fe58c440aee76762d0a9ae28d8ca
2014-07-06 15:15:11 +01:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Caolán McNamara
eb4cd7e74d some remaining sal_uInt16 to sal_Int32 editeng ESelection bounds
Change-Id: Ib47dea5c2d965cf613c465e624a1bdd81becb1c2
2014-06-09 12:27:56 +01:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Noel Grandin
5ceded62aa editeng: remove SAL_THROW macro
Change-Id: I8e36112a10cdef6250dba4b4cf75e5eba443e0b9
2014-06-05 08:17:47 +02:00
Julien Nabet
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
Noel Grandin
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00