Commit Graph

8019 Commits

Author SHA1 Message Date
Stephan Bergmann
de93c6260c loplugin:casttovoid: xmloff
Change-Id: I4f9ffd686e8e5a10bdd3f5ad4282dc4776923b62
2017-07-02 22:27:05 +02:00
Noel Grandin
979d58c9a9 loplugin:unusedfields in toolkit..xmloff
Change-Id: I4964ff97e0a1735dc08c6ad204cae0b08e9ffc2c
Reviewed-on: https://gerrit.libreoffice.org/39406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-30 19:50:30 +02:00
Mohammed Abdul Azeem
b3b6ce3feb Added find function to FastAttributeList:
It returns a FastAttributeIter, which can be used to
obtain value in different formats directly. Also, avoids
one unnecessary iteration.

Change-Id: Ic28e0177100738bbd71a3a89634cae9f1f7ee996
Reviewed-on: https://gerrit.libreoffice.org/39380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-29 17:50:12 +02:00
Noel Grandin
497e40ad03 improve refcounting loplugin
to find ref-counted classes being managed via other smart pointer
classes.
Hopefully prevent needing fixes like
642ae256ea
"ChangedUIEventListener is refcounted, mustn't be helt by unique_ptr"

Change-Id: I6b0c5f8f87ce3546a8a1104ce1000470c09459bd
Reviewed-on: https://gerrit.libreoffice.org/39378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-29 09:35:30 +02:00
Mohammed Abdul Azeem
d6da9e495d Using range-for instead of iterator loop:
It's much easier to write and looks cleaner. And
this doesn't affect performance, I think.

Change-Id: Ia946b068979b9cef04ac2479c9179a70b6775dea
Reviewed-on: https://gerrit.libreoffice.org/39370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mohammed Abdul Azeem <azeemmysore@gmail.com>
2017-06-29 06:03:38 +02:00
Noel Grandin
cb96678b3f loplugin:oncevar in xmloff
Change-Id: I0fbd37685a0006e1fbc98d2b432c2b84d13d6cc8
Reviewed-on: https://gerrit.libreoffice.org/39344
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-28 11:17:34 +02:00
Mohammed Abdul Azeem
c44d9f9e62 Using fast tokens directly:
Replacing integer-to-integer mapped tokens with
fast Tokens direcly for branching.
Adding a macro XML_ELEMENT that combines namespace
and element tokens.

Change-Id: I8701c8af9607392843460fe726bffb6556cf9b33
Reviewed-on: https://gerrit.libreoffice.org/39275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-27 17:51:33 +02:00
Michael Stahl
6e427e0bd1 xmloff: remove duplicate XML_NAMESPACE_##prefix##_IDX macros
Why do we need 2 identical constants?

Change-Id: Ib969f9b9583261f26fe65e04f183bdfabcb9eefe
2017-06-27 16:22:38 +02:00
Katarina Behrens
7562c5f37c tdf#107584: Load/save page background transparency
Change-Id: I17bd01dc129f0e530d5e227a5ddc12f11486e85d
Reviewed-on: https://gerrit.libreoffice.org/39206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-25 11:32:59 +02:00
Noel Grandin
528632660b convert ErrCode to strong typedef
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.

Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21 08:42:30 +02:00
Eike Rathke
f6add3f04b Remove useless if() condition
... because we bail out already early for all versions <= SvtSaveOptions::ODFVER_012

Change-Id: I80814be91c777dc03a9c821d706b24c7e1e757c1
2017-06-20 13:22:25 +02:00
Eike Rathke
29f250c428 Resolves: tdf#107438 write <text:sender-initials> for fields
Only in <office:annotation> context write <loext:sender-initials>

Broken since

    commit 5f8476c00f
    Date:   Fri Dec 13 23:21:46 2013 +0100

and

    commit 49f9694e34
    Date:   Fri Dec 13 23:30:34 2013 +0100

Change-Id: I48b146b779878bf0faa5830a721559d8e864dd33
2017-06-20 12:59:55 +02:00
Andrea Gelmini
b9ec99ba26 Fix typos
Change-Id: If28e198b8e1a26660e07dce49db66a651de43d3f
Reviewed-on: https://gerrit.libreoffice.org/38850
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-18 21:11:57 +02:00
Jochen Nitschke
a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Noel Grandin
83f9325f0d loplugin:unusedfields xmlhelp..xmlsecurity
Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3
Reviewed-on: https://gerrit.libreoffice.org/38821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16 08:24:49 +02:00
Noel Grandin
b70fa47aec use more SAL_N_ELEMENTS part 1
- teach comphelper::containerToSequence to handle sized arrays
- also use range based for-loop where appropriate.

Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99
Reviewed-on: https://gerrit.libreoffice.org/38769
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14 14:17:14 +02:00
Troy Rollo
a5b4cb3f83 tdf#103091 conditional style conditions not saved
Change-Id: Iccf3eb531ee3382d27105e5ccce6013707a646b6
Reviewed-on: https://gerrit.libreoffice.org/38451
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-13 18:55:15 +02:00
Mohammed Abdul Azeem
ffc2e936c6 Reverse mapping fastToken to NamespaceURI:
Made those methods static, so that it is easy
to use them outside the module.
Also updated the Namespace-constants list.

Change-Id: Id0bf501457c53d1420a00ce58c9bcedfcba17908
Reviewed-on: https://gerrit.libreoffice.org/38708
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-13 12:30:16 +02:00
Andrea Gelmini
d4d737d561 Fix typos
Change-Id: Ib2ba32d48d3df16b0b20deea84416fe15a2d7176
Reviewed-on: https://gerrit.libreoffice.org/38650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-12 13:47:06 +02:00
Jochen Nitschke
febbad7263 cleanup unused css/frame/* includes
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65
Reviewed-on: https://gerrit.libreoffice.org/38633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 13:05:38 +02:00
Noel Grandin
0e2a6e8ea2 remove some unnecessary use of OUStringBuffer
Change-Id: Ia4e02589d2fe79a27b83200a0e7a528a2c806519
Reviewed-on: https://gerrit.libreoffice.org/38508
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08 08:45:56 +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
Julien Nabet
f60603a2d7 typos
Change-Id: I3a28b5ce7464de724799997234925533d45f6121
Reviewed-on: https://gerrit.libreoffice.org/38420
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-05 21:29:27 +02:00
Stephan Bergmann
f9efb261dd Improved loplugin:cstylecast to reference types: xmloff
Change-Id: Iff207fb9dfbe5cc354abdeb5833786a52bedbb3c
2017-06-05 21:17:59 +02:00
Noel Grandin
17a2c9e8e2 clang-tidy performance-unnecessary-value-param
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192
Reviewed-on: https://gerrit.libreoffice.org/38400
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05 09:22:51 +02:00
Stephan Bergmann
903bd0db09 Improved loplugin:redundantcast const_cast handling: xmloff
Change-Id: I61873d1a1d26db0b757b242c395f9bf96702b055
2017-06-02 13:31:00 +02:00
Noel Grandin
064a01527e use std::vector in OListAndComboImport
Change-Id: Ie0c0e68512e92879774c754c89354e2c83cd149b
Reviewed-on: https://gerrit.libreoffice.org/38300
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01 13:16:27 +02:00
Noel Grandin
307be8c9ce clang-tidy readability-redundant-control-flow
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04
Reviewed-on: https://gerrit.libreoffice.org/38215
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-31 08:33:40 +02:00
Jochen Nitschke
709040e0ad remove duplicate 'using namespace'
Change-Id: I7f8828f677cfb588135ff75c03ffb75895773440
Reviewed-on: https://gerrit.libreoffice.org/38201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 21:15:03 +02:00
Michael Stahl
db38e3f201 tdf#108231 tdf#108109 xmloff: SvxUnoDrawingModel doesn't implement...
... XStyleFamiliesSupplier, so try to do without.  This is called from
sw in case SWTRANSFER_OBJECTTYPE_DRAWMODEL.

(regression from 9835a5823e)

Change-Id: Ic99ad4bf0c8e6e24fc10da173ec480c9d29c0363
2017-05-30 13:30:51 +02:00
Miklos Vajna
22c6554c98 xmloff: move in xmlmultiimagehelper.hxx from include/
Since it's not used outside xmloff.

Change-Id: Ibec67db2106300b6d4a91ce07d779e16e028eb2a
Reviewed-on: https://gerrit.libreoffice.org/38144
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-05-29 16:38:08 +02:00
Noel Grandin
1094fedfac getUtf8TokenName can return by const ref
and avoid some reference-counting in a hot path

Change-Id: I7f5fd7f8f5f9076eb5f8d60118afa8e3ac8a5e6c
Reviewed-on: https://gerrit.libreoffice.org/38129
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29 12:57:47 +02:00
Noel Grandin
ef513fd4b0 remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28 19:44:08 +02:00
Noel Grandin
4a340e36e8 loplugin:constantparam
add the results files so I can just see the diff in future

Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1
Reviewed-on: https://gerrit.libreoffice.org/37988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-25 08:12:17 +02:00
Mohammed Abdul Azeem
a7bfced28c Optimizations:
This avoids a lot of repeated allocation and freeing
of memory for AttributeList.

Change-Id: I97e44e633ed9880f37665f71e4dec3e74085cb09
Reviewed-on: https://gerrit.libreoffice.org/34134
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-05-22 14:00:00 +02:00
Jochen Nitschke
8f999d656a cleanup unused css/animations/ and css/presentation/ includes
Change-Id: Iafd106d431869d80f664bd540092bee4f10e14b5
Reviewed-on: https://gerrit.libreoffice.org/37862
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-21 21:05:05 +02:00
Jochen Nitschke
a0b93fe081 cleanup unused css/script/ includes
but keep exception includes in headers for now

Change-Id: I826828675a2d14b906e57068cbced2e790e12bce
Reviewed-on: https://gerrit.libreoffice.org/37846
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20 10:23:38 +02:00
Stephan Bergmann
ba9c7c92d6 loplugin:stringcopy: xmloff
Change-Id: Iec7feb114088357e8f87619ceb5dbfb228e8b5c7
2017-05-19 17:15:54 +02:00
Stephan Bergmann
52ef15cbdb Revert "Fix typos"
This reverts commit 26a67002fc.  "Iff" is not a
typo, see 2a65bf32ec "Revert 'Typo: iff->if'".
2017-05-18 21:58:31 +02:00
Andrea Gelmini
26a67002fc Fix typos
Only replaced "iff" with "if"

Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581
Reviewed-on: https://gerrit.libreoffice.org/37782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-18 18:55:17 +02:00
Stephan Bergmann
c345299186 Remove parentheses around some comparisons
...where Clang would otherwise start to emit -Wparentheses-equality as soon as
the order of arguments were switched by loplugin:comparisonwithconstant

Change-Id: If064c2c6e2f81478154395137138b71f2d1c6534
2017-05-18 18:06:54 +02:00
Tamás Zolnai
c7c5a96ee3 Use is() method for checkin reference validity
Change-Id: Ib294a2555a8512d1ca31cf1edc92659b9d7638ed
2017-05-17 16:08:40 +02:00
Tamás Zolnai
6952d69643 tdf#100033: Frames with the same name are removed
Allow to have frames with the same name. For removing
real duplicated frames (generated by LO earlier)
check other things also next to the frame name:
position, size or whether the two frames are anchored
to the same position.

Change-Id: I191ae5128d0228eb85f78f065b44b1f0b3ba6dcf
Reviewed-on: https://gerrit.libreoffice.org/37702
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-05-17 12:55:51 +02:00
Kohei Yoshida
034be10413 tdf#43535: support additional sheet protection options.
New options are:

* insert columns.
* insert rows.
* delete columns.
* delete rows.

Change-Id: I076b0d01bee0fff0623e2f1137c09938a6110939
Reviewed-on: https://gerrit.libreoffice.org/37695
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-05-17 05:16:44 +02:00
Noel Grandin
98c4cd372b loplugin:unusedfields improve write-only analysis
by whitelisting a couple of methods we know only write to their
parameters

Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c
Reviewed-on: https://gerrit.libreoffice.org/37647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16 08:45:17 +02:00
Noel Grandin
389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00
Noel Grandin
2962ceec4b remove some unnecessary temporary OUStrings
found with:
git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return

Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02
Reviewed-on: https://gerrit.libreoffice.org/37463
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-11 09:26:28 +02:00
Jochen Nitschke
959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Noel Grandin
12191a4f30 make loplugin constantparam smarter about string params
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294
Reviewed-on: https://gerrit.libreoffice.org/37426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09 13:52:30 +02:00
Noel Grandin
719a2adfbd remove unnecessary empty OUString fields and vars
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
Reviewed-on: https://gerrit.libreoffice.org/37394
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09 08:28:56 +02:00