Commit Graph

666 Commits

Author SHA1 Message Date
Stephan Bergmann
5ef76efb40 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I5896c6b8bf2aa9c7c66ca5f7c50cee1b0738ea0a
2016-04-20 17:27:32 +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
868444c803 loplugin:passstuffbyref in xmloff
Change-Id: I5995510c5c0686e5e69e8853d81dcba83ae96211
2016-04-14 09:21: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
Noel Grandin
78f0d15893 loplugin:constantparam in xmloff/
Change-Id: I376f1d4ac65de584f9caa6ba8e25e43216374112
Reviewed-on: https://gerrit.libreoffice.org/23295
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16 11:35:38 +00:00
Wastack
7a0b8decb7 tdf#97966: Remove 'static' keywords
Change-Id: Id70f9e55fb4ad7d3a501399b055208ea10369c82
Reviewed-on: https://gerrit.libreoffice.org/23131
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11 08:54:33 +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
Miklos Vajna
f2d5d0ac1d xmloff: one more missing include
Change-Id: I92080eefa485dec86c3a10f978831157b04a0c53
2015-12-19 22:50:31 +01:00
Caolán McNamara
8f85595371 coverity#1343637 Double free
and

coverity#1343638 Double free
coverity#1343639 Double free
coverity#1343640 Double free
coverity#1343641 Double free

Change-Id: I8ce42f03d40fe514f73b3a7eabdb4f323b2239e6
2015-12-19 18:10:11 +00:00
Stephan Bergmann
d138573103 Avoid memory leaks
...when exceptions get thrown while a context owns an rewind map

Change-Id: I90d26caa57ef2ff508e6eae05ddbc62cdb3f01ea
2015-12-17 16:51:17 +01:00
Stephan Bergmann
ba3a918404 Remove trivial class XMLTransformerContextVector
Change-Id: I140614895d5727ffd97681ddd06bf7439fe7a443
2015-12-17 16:51:16 +01:00
Stephan Bergmann
21e72c5f1d Hold XMLTransformerContext by rtl::Reference
Change-Id: I60b8d422d53d47537996756aa1b7fb3c26f8383a
2015-12-17 16:51:16 +01:00
Noel Grandin
80735fcbb0 com::sun::star->css in xmloff/
Change-Id: Iee6e21e093fb1383f19a0716dbc1c341f446b8c2
Reviewed-on: https://gerrit.libreoffice.org/20192
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-26 10:47:02 +00:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
51b45df6bb loplugin:nullptr (automatic rewrite)
Change-Id: I8690de2cb68dcfedc9f2239ce66cea06fd94bc16
2015-11-10 10:32:01 +01:00
Stephan Bergmann
41a000b742 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ibb9372bc45a0bc0b9083ad0e405440bbbe5ef678
2015-11-06 09:38:44 +01:00
Noel Grandin
9e8ff13eb2 use uno::Reference::set method instead of assignment
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
2015-11-05 13:32:17 +02:00
Stephan Bergmann
9acfbf8294 loplugin:defaultparams
Change-Id: I4f0a7baa517c2526dcea4d7fb779df6da32bda0f
2015-10-19 17:52:17 +02: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
Andrea Gelmini
4678982056 Fix typos
Change-Id: I2cdfc4e9d8ba1acb7c2548f9394d320c6504207e
Reviewed-on: https://gerrit.libreoffice.org/18997
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-09-29 22:13:57 +00:00
Takeshi Abe
8358eadcba xmloff: tdf#88206 replace cppu::WeakImplHelper*
with the variadic variants.

Change-Id: I47002abab1e025d0683f4cf8ef7b6c99e668d425
Reviewed-on: https://gerrit.libreoffice.org/18479
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-11 17:16:17 +00:00
Noel Grandin
a62129aa63 loplugin:unusedmethods xmloff
Change-Id: I9d15d8edcc6746c055336bf31e5b0c15cb971ffe
Reviewed-on: https://gerrit.libreoffice.org/17061
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15 10:36:25 +00:00
Andrea Gelmini
1c5f07e60c Fix typos
Change-Id: I98b4dfb0f72f315065693335e2f882bb2eed3afe
Reviewed-on: https://gerrit.libreoffice.org/16713
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 09:14:23 +00:00
Andrea Gelmini
1a8915ef83 Fix typos
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
Reviewed-on: https://gerrit.libreoffice.org/16582
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30 15:57:12 +00:00
Noel Grandin
4354341159 remove our custom RTTI from xmloff module
not being used, anyhow

Change-Id: I0eb0d6377efe324d9a442a70fc2046a58ed2f3c4
2015-06-25 11:50:10 +02:00
Andrea Gelmini
ae150c6a54 Fix typos
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
Reviewed-on: https://gerrit.libreoffice.org/16314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-18 11:44:56 +00:00
Stephan Bergmann
689a4a6973 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I6fa6ee6d9eaf98a00624ad353dc6d2c5687b0547
2015-06-08 16:30:03 +02:00
Caolán McNamara
e50698c0ce cppcheck: noExplicitConstructor
Change-Id: I8c9e970d5c5931de1a7526cbff3de626ef30bd74
2015-05-24 20:58:24 +01:00
Stephan Bergmann
338358b0ca XMLTransformerActionInit parameters are generically of type sal_uInt32
Change-Id: Ic36339fbb78a6ac3233f3d75a1309cf1b0642fe0
2015-05-08 09:49:04 +02:00
Stephan Bergmann
2049e3ec22 XMLTransformerActionInit parameters are generically of type sal_uInt32
Change-Id: I8a013c8ca8938ef2d8e1786cda3dba61fe3038a5
2015-04-28 13:44:19 +02:00
Stephan Bergmann
ba15d30e8d loplugin:simplifybool
Change-Id: I4a7ba9192956941f05e68ae8df3263d609a7c4dc
2015-04-24 12:36:31 +02:00
Stephan Bergmann
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +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
Noel Grandin
d1b27a1d9a loplugin:staticmethods
Change-Id: Id3d6b50e07ea0850af18ab9bdadfffe0e4602aab
2015-04-07 10:24:54 +02:00
Stephan Bergmann
c0755c8ee0 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: Ie25a2b8a84a146a5b988c6ef77127896d126e488
2015-03-31 13:17:54 +02:00
Julien Nabet
41c99ab630 Typos
Change-Id: Ie08a26a569b83bfe3ef4351dbb7b6e928745b95d
2015-03-23 20:08:36 +01:00
David Tardon
7a1e6d73dc i assume this is what is wanted
Change-Id: I619c57b07ccde25257f7848bd2bdf55ac78c9171
2015-03-01 17:33:56 +01:00
Stephan Bergmann
598d8194b0 Visible function type RTTI for Clang -fsanitize=function
...by adding some further SAL_DLLPUBLIC_RTTI type annotations (cf.
b4f6b26b5a "SAL_DLLPUBLIC_RTTI for proper RTTI
visibility for LLVM") and by making sure relevant function types do not use
incomplete types in their parameter and return types (which would make the RTTI
hidden).

Change-Id: Id7aadcbc0704b9759968ae36266fc9ce11a2e340
2015-01-26 15:17:28 +01:00
Caolán McNamara
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
Stephan Bergmann
513108bd57 xmloff: Use appropriate OUString functions on string constants
Change-Id: Idbe6ac27a4125bd9d9acb01ac42b60396abf0c81
2014-12-12 12:25:35 +01:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Brij Mohan Lal Srivastava
d32be3ace8 fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.

Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14 09:20:38 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Andrea Gelmini
a44163ada4 Removed #includes including themselves
Change-Id: I3fe3227967e07b6b0c82dccf3c9400bfe6e1d729
Reviewed-on: https://gerrit.libreoffice.org/12292
Reviewed-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-11-07 11:47:01 +00:00
Caolán McNamara
12bcfec04f markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
Michael Stahl
76dce95eed coverity#705391: xmloff: XMLMergeElemTransformerContext misuse of enum
The enum types XMLElemTransformerAction and XMLAttrTransformerAction
use the same integer values so a mixture of values from these 2 in one
switch is very suspicious.  In the various *ActionTable arrays in
OOo2Oasis/Oasis2OOo there is just one such array that mixes values from
the 2 enums, and that is just the values that coverity complains about.

The XML_ETACTION_EXTRACT_CHARACTERS was added at a later date in commits
8d374c039e7d349141befe3c9ef97f82f42bfa7
2685b93a6a
7d2405a54d
c276550e07

...but it turns out that the XMLAttrTransformerAction ones are handled
in StartElement() and ProcessAttrs() methods but the
XMLElemTransformerAction ones are handled in CreateChildContext()
methods so probably the XML_ATACTION_MOVE_FROM_ELEM* values are in
the wrong enum.

Change-Id: Ib1791f6eafac4fb1e99334f41c17a90cfb076359
2014-11-03 21:42:26 +01:00
Eike Rathke
4f93d6960c coverity#705348 Missing break in switch
Change-Id: I23e03e45ba4f6d259128bc5e4c2fd5952be05c2f
2014-10-31 14:43:20 +01:00
Michael Stahl
24a0129274 assert that XMLTransformerBase::m_xHandler is initialized
Just seen a test with a null m_xHandler, no idea how that happened.

Change-Id: I2e5ff9d3c799284beea5fdca37fa8a825f8a4756
2014-09-25 20:58:52 +02:00
Stephan Bergmann
7480948d87 xmloff: sal_Bool -> bool
Change-Id: Ic1e599568ece7e6bba354845a6cf85fa090e67bd
2014-09-15 14:32:39 +02:00
Stephan Bergmann
525d784796 -Werror,-Wundefined-bool-conversion
Change-Id: Icf4a55f7e76a723014a7b8b5f6b9350db7370dd9
2014-08-11 16:08:32 +02:00