Commit Graph

93 Commits

Author SHA1 Message Date
Stephan Bergmann
38ef960bf7 loplugin:includeform: editeng
Change-Id: If2aa2cbbfabe164ccf0f68522fa18fa3bae2225d
2017-10-23 22:46:09 +02:00
Noel Grandin
2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Caolán McNamara
442df6cf83 ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 11:01:53 +02:00
Noel Grandin
7aa7f4d9e4 loplugin:unnecessaryparen include c++ casts
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb
Reviewed-on: https://gerrit.libreoffice.org/41874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04 10:52:41 +02:00
Noel Grandin
18f80da7a6 loplugin:checkunusedparams more part2
Change-Id: Ibb940c2a7098313dfa282734894b1abc1ac40bc2
Reviewed-on: https://gerrit.libreoffice.org/40489
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 07:18:23 +02:00
Stephan Bergmann
aa371639ee loplugin:oncevar: empty strings: editeng
Change-Id: I3b60b918277b408038a99f2c4801a454e6aa7b4a
2017-07-13 11:46:41 +02:00
Varun Dhall
45fdb40085 EditEngine: Added SvxSimpleUnoModel in import filter
Change-Id: I65e30853517e1ad7164dd50c290ef3f35c8a61a5
Reviewed-on: https://gerrit.libreoffice.org/39788
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-11 14:15:41 +02:00
Varun Dhall
9479171a09 EditEngine: Added para break/connect during ODF paste
Change-Id: I6ff7fb81425b7788da27ca297d5f08b80b96f795
Reviewed-on: https://gerrit.libreoffice.org/39662
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-07-07 10:34:28 +02:00
Varun Dhall
a62c9ecfc2 EditEngine: Added warning for xml export exception
Change-Id: I8709e6656ff753cdd833ee3622a922126161fc2d
Reviewed-on: https://gerrit.libreoffice.org/39660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-06 23:18:38 +02:00
Stephan Bergmann
2a468fff56 loplugin:casttovoid: editeng
Change-Id: If389b63fce54a5504d3e25804148038e7c4d4ca9
2017-07-02 22:32:35 +02:00
Varun Dhall
65f98346c2 EditEngine Creating SvXMLImportContext for ODF
Change-Id: I4083658db6068122b423fe5ec7a568fa222b4e80
Reviewed-on: https://gerrit.libreoffice.org/38358
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07 14:50:04 +02:00
Varun Dhall
0703af9e78 Exporting EditEngine document into a buffer with ODF Filter
Change-Id: Ib0304de5d873ac833dcc121235b8de494a1bb3bf
Reviewed-on: https://gerrit.libreoffice.org/37999
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07 14:48:28 +02:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02: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
cd8fdb46fd new loplugin: useuniqueptr: editeng
Change-Id: I6df65eab882780d996ee996b5fef8020186b6d98
Reviewed-on: https://gerrit.libreoffice.org/32958
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-13 13:08:52 +00:00
Stephan Bergmann
b1dd9a631a loplugin:unnecessaryoverride (dtors) in editeng
Change-Id: I7a268a1e991e84304e5435e0f7b633873f6829eb
2016-12-05 09:04:59 +01: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
Noel Grandin
0323253a7c remove some manual ref-counting
triggered when I noticed a class doing acquire() in the
constructor and then release() in the destructor.

found mostly by
    git grep -n -B5 -e '->release()'

Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f
Reviewed-on: https://gerrit.libreoffice.org/25806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:34 +00: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
Noel Grandin
95d20a3799 Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.

This reverts commit 111de438ea.
2016-05-24 11:02:42 +02:00
Noel Grandin
111de438ea remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and
then release() in the destructor.

found mostly by
   git grep -n -B5 -e '->release()'

Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f
Reviewed-on: https://gerrit.libreoffice.org/25363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:06 +00: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
9b1307f790 Avoid reserved identifiers
Change-Id: I759939aa74570be63f5d41814c22aad1851d65c4
Reviewed-on: https://gerrit.libreoffice.org/23587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-29 07:11:31 +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
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Stephan Bergmann
217f7f236f loplugin:nullptr (automatic rewrite)
Change-Id: I9fe00eef7ddcd4a3c87e497a8d62f98e71a0d6d8
2015-11-10 10:31:24 +01:00
Noel Grandin
609b227873 fix tdf#95488, crash in report wizard
This reverts commit bb76b8f106
"loplugin:mergeclasses"

Change-Id: Ib65459ab45cd4cefa859ed75f9ddc4f070879b1d
2015-11-05 12:02:00 +02:00
Noel Grandin
3c971162b5 use uno::Reference::set method instead of assignment
Change-Id: I150f213ab033f5fc1b50abe4e1529292206c9feb
Reviewed-on: https://gerrit.libreoffice.org/19689
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-31 12:56:38 +00: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
Noel Grandin
bb76b8f106 loplugin:mergeclasses
Change-Id: I8f5c2ae658f8784233db98f752b6f9fa53110195
2015-10-07 12:32:23 +02: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
Stephan Bergmann
cec7d0a908 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I0d15a14209768ef0292d9abdf00e8fa571cf90da
2015-06-08 16:24:44 +02:00
Stephan Bergmann
c047451f8a Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I13a85e13b22559a9f1571ef5771b26d70a5cd4fb
2015-04-01 08:38:49 +02:00
Caolán McNamara
5a308b1239 V801: Decreased performance
Change-Id: Iba139ede7bd72e23c0b7a28a8a4ff38ea816725a
2015-03-09 12:41:09 +00:00
Noel Grandin
b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
Noel Grandin
006e59a25e fix windows build
and a handful of other currently uncompiled spots,
after my commit 7f8f277b94
"fdo#84938: convert STREAM_ #defines to 'enum class'"

Change-Id: I550f6fb850e1d71a6f08767eeb222a18071b89d5
2015-01-07 11:48:55 +02:00
Noel Grandin
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
Noel Grandin
c29657e0d6 fdo#84938: convert EXPORT_ #defines to 'enum class'
Change-Id: I2ed239fa073b5fa8fb56c1af9d4b0bac89acfacf
2015-01-06 10:59:42 +02:00
Noel Grandin
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00:00
Caolán McNamara
6832d9f0f0 coverity#735333 flush out pointless calls to IsRemote and IsOpen
etc.

Change-Id: I588d4486071b1e31897d4e6468a2c634d6856832
2014-10-15 16:56:57 +01:00
Noel Grandin
4923ac72aa loplugin: cstylecast
Change-Id: I58582059495f7c50880038e2174ea2de026aa1c9
2014-10-01 13:08:42 +02:00
Noel Grandin
65803ad94c fix some dodgy FieldUnit conversions
the FieldUnit enum was being converted in some dodgy ways and
in some places the MapUnit enum values were being used.

Change-Id: Ic9aacb84058d1c14c3a4a79ef6676082df9a7270
2014-07-31 11:38:47 +02:00
Tobias Lippert
6a873638fa Renamed brdcst.[hc]xx to SfxBroadcaster.[hc]xx
- Remove includes from files where they are not needed.
- Update pch files

Change-Id: I0188e3934ef429008c1ef495ab1d5b27f38664d5
Reviewed-on: https://gerrit.libreoffice.org/10342
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-07-17 08:47:58 +00:00
Noel Grandin
4ff115b3e7 drop UniReference in favour of rtl::Reference
since they're doing the same thing.

Change-Id: I76134b6b848db8628f315fe5bd9eb972a6bf0cb6
2014-07-02 15:23:52 +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
Julien Nabet
5ec7a589be Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
2014-05-10 06:19:42 +02:00
Stephan Bergmann
b4fd20fc6b Clean up function declarations and some unused functions
Change-Id: Id9e29dcaab64b0244b5c53abb48ac27253a11917
2014-04-09 14:42:51 +02:00
Stephan Bergmann
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00