Commit Graph

412 Commits

Author SHA1 Message Date
Noel Grandin
2f7ccd102a extend unusedfields loplugin to find fields that can be private
and apply the results in xmlscript

Change-Id: Ib126f6e1576639abfd171e99d9561be9715ece2f
2016-11-17 08:40:27 +02: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
702496391b loplugin:constantparam in vcl..xmlscript
Change-Id: Icf66c08071b154259c9e551342d30331caf2b15a
Reviewed-on: https://gerrit.libreoffice.org/28685
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-07 06:48:56 +00:00
Eike Rathke
6d4f2dcc7c Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendar
... implementing signed years with year 0 gap.
Date(31,12,-1) last day BCE
Date(1,1,1) first day CE

New class Date member functions:
* AddYears(sal_Int16) to be used instead of
  aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap.
* convenience GetNextYear() to be used insted of GetYear()+1
* convenience GetPrevYear() to be used insted of GetYear()-1
* AddMonths(sal_Int32)
* operator=(const css::util::Date&)

New class DateTime member functions:
* operator=(const css::util::DateTime&)

Made some conversion ctors explicit, specifically Date(sal_Int32)

Adapted hopefully all places that used a sal_uInt16 year to use
sal_Int16 where appropriate.

Eliminated some quirks in date handling found on the fly.

Added era handling to i18npool icu calendar setting interface, which
missing was responsible for 0001-01-01 entered in Calc being set as
-0001-01-01, hence subtracting one day resulted in -0002-12-31.

Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f
Reviewed-on: https://gerrit.libreoffice.org/27049
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-08 20:41:02 +00:00
Stephan Bergmann
7e781aa15a Clean up uses of Any::getValue() in xmlscript
Change-Id: I863ce5cdf53aee40c12cfe1b8ae4399b7cf006ce
2016-06-27 15:41:42 +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
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
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
11b3262dd1 loplugin:nullptr
Change-Id: I2eb28f3408967d9de4143f6b9212056ac8614d1c
2016-05-12 14:37:32 +02:00
Stephan Bergmann
2894df68fe sal_Bool -> bool
Change-Id: I770a8507cdc1ee56456642b1f878381d6cf9d0b3
2016-05-04 12:53:44 +02:00
Yeliz Taneroğlu
d46bfe1367 tdf#74608 Constructor function for XMLBasicExporter
Change-Id: Ib4721b3f67956a8da48851841ef86bb7b79df1e7
Reviewed-on: https://gerrit.libreoffice.org/24553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-02 09:56:22 +00:00
Yeliz Taneroğlu
955ca134fd tdf#74608 Constructor function for XMLBasicImporter
Change-Id: I0a2c74c71d1633427598e793d7c211e5283c7a33
Reviewed-on: https://gerrit.libreoffice.org/24559
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-02 09:56:10 +00:00
Yeliz Taneroğlu
2dc8f1b25c tdf#74608 Constructor function for XMLOasisBasicImporter
Change-Id: Iec1c875f6aa34c37ac26a5dac008db547e8965ca
Reviewed-on: https://gerrit.libreoffice.org/24551
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-02 08:37:09 +00:00
Yeliz Taneroğlu
b8c04ea449 tdf#74608 Constructor function for XMLOasisBasicExporter
Change-Id: If5409621f515918e715e3c0b71ec1b3d6fd1ef92
Reviewed-on: https://gerrit.libreoffice.org/24518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-02 08:35:19 +00:00
Stephan Bergmann
ef0161b649 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I2f5c4c341c4c38e1603748fb7c1f50e42547d005
2016-04-20 17:27:32 +02:00
Stephan Bergmann
a3858ed3a7 Use cast to bool to normalize sal_Bool values
Change-Id: I8a886f752d2a16ec4c10656bcd0b3631647971b2
2016-04-20 17:25:31 +02:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Vasily Melenchuk
bef802a7bf tdf#99172 support for vertical align import/export property for text boxes
Change-Id: I1cf8d8d57a7245800e2b28b674301ebcb5470348
Reviewed-on: https://gerrit.libreoffice.org/23927
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-09 09:51:07 +00:00
Stephan Bergmann
5b32ba4217 -fsanitize=nonnull-attribute
Change-Id: Ice9fef5bdfd3e993b1b2ba035cbc971b8dacbe3a
2016-04-05 16:19:50 +02:00
Noel Grandin
db43ef00c1 sequence->vector in xmlscript
Change-Id: I4f99cd9dc659f54bd4818559dd3e0dbce1e8f5d4
Reviewed-on: https://gerrit.libreoffice.org/23795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05 06:25:39 +00:00
Stephan Bergmann
8988d1a744 Avoid reserved identifier
Change-Id: I69e8a6b2d449aff92e7bd8d0d4c39b0d1c71c97c
2016-03-10 18:32:13 +01:00
Rohan Kumar
0a8c9fde3b tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals and left SAL_INFO()s
statements alone. I also removed OUStringToOString(..) calls that were
used by SAL_INFO(..)

Change-Id: I01cce00265531d7f0ad0a6f564fef6262d3d1205
Reviewed-on: https://gerrit.libreoffice.org/23036
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-09 07:55:48 +00:00
Noel Grandin
4fbf95deba new loplugin:unuseddefaultparams
Change-Id: I2c3e7d66be9e3883ea2801ff394948cc580d1e44
2016-02-25 11:42:35 +02:00
Noel Grandin
778e9a65bf new loplugin: find write-only fields
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717
Reviewed-on: https://gerrit.libreoffice.org/22498
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19 11:23:57 +00:00
Noel Grandin
91a5acfb0e loplugin:unusedmethods unused return value in xmlscript/
Change-Id: I076b589686302a9093eae934533e823f12e003b9
2016-01-13 12:16:23 +02:00
Caolán McNamara
bea8a7ad63 cppcheck: noExplicitConstructor
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
Noel Grandin
a218039d2a loplugin:unusedfields in xmlscript,xmlsecurity
Change-Id: I5239766f2105fb1a7823215a4ffe48891e000c3d
2015-12-21 12:45:49 +02:00
Oliver Specht
ffdd3c6820 tdf#80047: load&save align and valign attributes of NumericField
Change-Id: Iff92f050210c112f355803d4d4bcec6b9d289a84
Reviewed-on: https://gerrit.libreoffice.org/20788
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-12-18 10:42:09 +00:00
Noel Grandin
93ca224721 com::sun::star->css in xmlscript/
Change-Id: I8ead2862ef429a0ac3fc16fe6ca5dfc9e5f549bc
Reviewed-on: https://gerrit.libreoffice.org/20193
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-26 12:21:24 +00:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann
6de82da0c1 loplugin:nullptr (automatic rewrite)
Change-Id: Ie91fbfc9369fe9f2de1cf12c746598a80c2233c1
2015-11-10 10:32:02 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Stephan Bergmann
28d63935b2 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I8aedb690380d407dcbc290a44d21afa6604b8f95
2015-11-06 09:38:49 +01: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
Caolán McNamara
31ebd9f475 boost->std
Change-Id: Ic18be8b86727dd1179a7e39c70493d088ed00557
2015-09-16 15:34:23 +01:00
Takeshi Abe
06962719b1 xmlscript: tdf#88206 replace cppu::WeakImplHelper*
with the variadic variants.

Change-Id: Ic05094dea12c0aa66dc97a7e403a3abec9e25785
Reviewed-on: https://gerrit.libreoffice.org/18556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-14 06:25:52 +00:00
Noel Grandin
a4fd6c4f9e inline some use-once typedefs
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d
Reviewed-on: https://gerrit.libreoffice.org/17495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:33 +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
Noel Grandin
afcf1ecee1 loplugin:loopvartoosmall
Change-Id: I1e9768c08af0bc7caac6a39c13842ee9d8ad962c
2015-05-29 08:48:41 +02:00
Caolán McNamara
dcee23b7f8 cppcheck: noExplicitConstructor
Change-Id: Idcf5460ec59cfb6f13055652c094d460c15da5ed
2015-05-20 20:40:54 +01:00
Caolán McNamara
869e477484 cppcheck: noExplicitConstructor
Change-Id: Iea5bb0504518b380c3fe7c238d376dc26be8a7ef
2015-05-04 20:13:52 +01:00
Stephan Bergmann
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
Noel Grandin
e4688a3d41 loplugin:staticmethods
Change-Id: Ibaad2adabecb878411fdd66383bca91f034477af
2015-04-07 10:24:54 +02:00
Stephan Bergmann
42c848c506 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Ida0a4cced7d35be6f9da16447ae4e23ded5e415a
2015-04-01 08:43:42 +02:00
Stephan Bergmann
6485183373 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I8af2e7c7bb5e750c13dd9f7ef1fd3033ec9cdf9c
2015-03-31 13:17:59 +02:00
Stephan Bergmann
b51252247e Clean up C-style casts from pointers to void
Change-Id: Id64d800ccebab274e5bb7ad2667c0e270e745bdf
2015-03-28 19:09:29 +01:00
Lionel Elie Mamane
f1ffba8921 constify
Change-Id: Id319c001b399a3105d6c9f87a58168f956ad46c3
2015-02-05 21:45:28 +01:00