706 Commits

Author SHA1 Message Date
Mohammed Abdul Azeem
9f9e861c6d Old-to-new mapping of attributes is moved into a Module:
This should make it easy to reuse the mapping code wherever
necessary and restores the loading of writerperfect documents.

Change-Id: I505bffa47fe37270b0430d9ae5afec5072762b4c
Reviewed-on: https://gerrit.libreoffice.org/35263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-03-21 09:24:32 +00:00
dennisroczek
8636e2462d fix typo: savety --> safety
Change-Id: I6fab05c05c8f79607b75429f32be0497b54b3cb7
Reviewed-on: https://gerrit.libreoffice.org/35059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-11 07:49:05 +00:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Andrea Gelmini
d0f99b1b39 Fix typos
Change-Id: Ibc81246e615d7c68c93e01b84584e78a79bece16
Reviewed-on: https://gerrit.libreoffice.org/34779
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-02 10:40:27 +00:00
Julien Nabet
472f92421b xmloff: prefix member nElement of XMLTransformerBase
Change-Id: I83f62ccad47bc10c2a506a6b79a24e3367df5335
Reviewed-on: https://gerrit.libreoffice.org/34769
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-01 22:30:18 +00:00
Julien Nabet
08c49bf075 Typo: decaration->declaration
Change-Id: I743e7f41243ae54b1deece4743b248a002ecfdb8
Reviewed-on: https://gerrit.libreoffice.org/34768
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-01 22:09:10 +00:00
Stephan Bergmann
91cafef7d3 -Werror,-Wunused-private-field
Change-Id: Ibba8f9d1823471cc548220d4de62041151898f12
2017-02-08 10:36:42 +01:00
Noel Grandin
f5245bf483 loplugin:unusedenumconstants read-only constants in xmloff
Change-Id: I88afb3b4b3aa7d823c46062ead894561a66ac275
Reviewed-on: https://gerrit.libreoffice.org/33995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 08:17:46 +00:00
Noel Grandin
78f392f30a loplugin:unusedenumconstants in xmloff
Change-Id: Ie9e6d4aa9dba97d45bf7b8afa2347d34e1651a60
Reviewed-on: https://gerrit.libreoffice.org/33871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 12:55:29 +00:00
Noel Grandin
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
Noel Grandin
1461ebbbb5 expand out ::sax::Converter::convertNumber to OUString::number
which results in much simpler code overall, there is no need to go via
an OUStringBuffer all the time

Change-Id: I69eba92c93f471fa9a45f97c29c56dcf3cd1ebf8
Reviewed-on: https://gerrit.libreoffice.org/33773
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02 08:00:10 +00:00
Caolán McNamara
ce2238a7bd coverity#1399595 Uninitialized scalar field
Change-Id: I6e6a1e114ee9abf8826dda19e0b7bc3b573e2edf
2017-01-28 12:29:02 +00:00
Caolán McNamara
a5233e5112 Resolves: coverity#1399594 Unchecked dynamic_cast
Change-Id: I6aae2d451db218a53931df1982a5412923dd42c1
2017-01-28 12:27:07 +00:00
Noel Grandin
4142e0a0c0 loplugin: unnecessary destructor writerfilter..xmloff
Change-Id: I511822dc874101ed3b9850b015b746a86d26c3b5
Reviewed-on: https://gerrit.libreoffice.org/33578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:51:11 +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
Mohammed Abdul Azeem
8154953add ScXMLTableRowCellContext implements fast interfaces:
Implementation of fast interfaces for contexts in path from
ScXMLImport::CreateFastContext to ScXMLTableRowCellContext.
FastParser is enabled and duplicates are avoided at all
possible places.
OOoXML filters still need those legacy paths we removed,
so I had to temporarily map them to fast elements, which
would increase their load time, but hopefully it should
help us in the long run.

Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670
Reviewed-on: https://gerrit.libreoffice.org/28648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-25 11:20:48 +00:00
Caolán McNamara
aac6bb5bb3 ditch some empty dtors which match the default dtor
Change-Id: Id2450b03e6c8c5461e92d995ea8c33d5dfd55a45
2017-01-23 10:11:59 +00:00
Stephan Bergmann
7fca732554 New loplugin:dynexcspec: Add @throws documentation, xmloff
Change-Id: Idf9db7108514e91fb4fe3abeca55fbab844c770a
2017-01-19 18:03:08 +01:00
Stephan Bergmann
76f894f248 New loplugin:externvar: xmloff
Change-Id: I3fe731a535fe67b4cf260f9c6a36e32732695a7c
2017-01-09 15:39:25 +01:00
Caolán McNamara
c962f16292 coverity#705098 Explicit null dereferenced
Change-Id: Icf32bbe9ce259048219ba88aa7e4dc51592f7cb5
2017-01-07 21:57:02 +00:00
Caolán McNamara
d126ce58c2 coverity#705097 Explicit null dereferenced
Change-Id: I0c2163f91b86d2b48b7bc58b173438d2aa11377d
2017-01-07 21:57:01 +00:00
Stephan Bergmann
182dfdd00e loplugin:unnecessaryoverride (dtors) in xmloff
Change-Id: I351ff5955d766118e3a6b2234181774af0d1f522
2016-12-01 08:53:50 +01:00
Noel Grandin
1b36f23b51 loplugin:oncevar in xmloff..xmlsecurity
Change-Id: I2353d3c73130ed9420e8d803a9a96a06549bb6bd
Reviewed-on: https://gerrit.libreoffice.org/30429
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 10:32:27 +00:00
Noel Grandin
a41ecf9227 loplugin:expandablemethods in xmloff
Change-Id: I995a4167ac4df5ca35d963dcf68ae802a997e1e1
2016-10-24 13:35:36 +02:00
Noel Grandin
7477ab1391 loplugin:inlineablemethods in xmloff
Change-Id: I22202f85c65a862ccdafe1d521e2945e3d99252a
2016-10-18 08:51:07 +02:00
Noel Grandin
e592877844 loplugin:unusedenumvalues
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b
Reviewed-on: https://gerrit.libreoffice.org/28942
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-18 11:02:45 +00:00
Noel Grandin
0ea50b5b43 loplugin:countusersofdefaultparams in xmloff
Change-Id: Ia92a878ac97b3cc668594946e77a718f27a3e3ed
Reviewed-on: https://gerrit.libreoffice.org/28890
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 08:47:48 +00: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
Caolán McNamara
9b181fa48f coverity#1371368 Resource leak
Change-Id: I5c35b3eaa6e9afe10096bf5013f83ff51cb870a4
2016-08-18 21:08:40 +01:00
Noel Grandin
500a3be0ea loplugin:countusersofdefaultparams in vcl..xmlsecurity
Change-Id: I538596a99e632178d928ff7e66ad45c71b73c6fd
Reviewed-on: https://gerrit.libreoffice.org/28018
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-12 06:54:08 +00:00
Noel Grandin
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Stephan Bergmann
2cdc693c56 Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13 14:54:14 +00: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
Stephan Bergmann
25dafb5f83 -Werror,-Wunused-private-field
Change-Id: I23caef822107596c9c04a8d4c28b30f32b7095ba
2016-06-24 09:33:34 +02:00
Noel Grandin
6a5e30d52c loplugin:singlevalfields in xmlhelp,xmloff
Change-Id: Ia40d1c9a153b5237c46d5a2b807dceff30775f4a
Reviewed-on: https://gerrit.libreoffice.org/26589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24 06:46:01 +00:00
Noel Grandin
e9af29ba83 loplugin:unusedmethods in writerfilter to xmloff
Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099
Reviewed-on: https://gerrit.libreoffice.org/25148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19 10:01:23 +00:00
Noel Grandin
96fab05132 clang-tidy modernize-loop-convert in writerfilter to xmlsecurity
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3
Reviewed-on: https://gerrit.libreoffice.org/24923
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13 08:09:03 +00:00
Stephan Bergmann
2ea7fe2522 Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: I646abf83b4dce8c92a3ba1c136d968bb9291dd83
2016-05-10 17:04:20 +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
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