Commit Graph

361 Commits

Author SHA1 Message Date
Noel Grandin
89ac4f6255 com::sun::star->css in vbahelper/
Change-Id: I7ab89b01cf6817b365a02e73d4635dfdb5b40440
Reviewed-on: https://gerrit.libreoffice.org/20022
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18 06:51:09 +00:00
Noel Grandin
dfb3be7e15 use unique_ptr for pImpl in vcl,vbahelper,uui
Change-Id: Icb7573c24c681a8fc0570d61b6a30dab91378eb8
2015-11-17 10:59:47 +02: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
45979047ab loplugin:nullptr (automatic rewrite)
Change-Id: I6eb8949e3e14d82b52af9a2ba26d67bf1bd8e1a5
2015-11-10 10:31:59 +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
Caolán McNamara
9ca5df186e coverity#1338249 Uncaught exception
Change-Id: Ife52263b250e11720575cec800834f7608f25d6c
2015-11-06 12:15:53 +00:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +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
Douglas Mencken
85b1f91779 vba: convert to variadic InheritedHelperInterfaceImpl&WeakImpl etc
Variadic templates ~-i.e. templates, which can take an arbitrary
number of arguments of any type-~ is new C++11 feature

note that uno::Reference and cppu::UnoType can only take one parameter
thus leave XNamedObjectCollectionHelper non-variadic in vbacollectionimpl.hxx

Change-Id: I22e60fa050ee31d39ae8bb7cac06cf243c4587b1
Reviewed-on: https://gerrit.libreoffice.org/19145
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-10-06 12:13:54 +00:00
Caolán McNamara
31ebd9f475 boost->std
Change-Id: Ic18be8b86727dd1179a7e39c70493d088ed00557
2015-09-16 15:34:23 +01:00
Takeshi Abe
e50bcf0a22 vbahelper: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I8a7f7c81a876b5f1ac987375f8c43bbef89dc087
Reviewed-on: https://gerrit.libreoffice.org/18461
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-10 13:11:11 +00:00
Stephan Bergmann
336d9a01d7 Clean up emptyString
Change-Id: I5350322e5c957127fe125e633b31b2492410995e
2015-08-27 08:00:33 +02:00
Stephan Bergmann
9c8fd7d1c5 Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
2015-08-27 08:00:32 +02: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
Noel Grandin
b1c25a0d8f inline "old" SbERR constants
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
2015-07-28 08:35:34 +02:00
Noel Grandin
564805d6f8 loplugin:unusedmethods vbahelper
Change-Id: Ia04e2682e3bd05591b67b9fe15557ce8c0e7939e
Reviewed-on: https://gerrit.libreoffice.org/17234
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21 06:51:47 +00:00
Stephan Bergmann
8f12dcbf60 loplugin:simplifybool
Change-Id: I06135270e460cd554cca9153292dcc1984d50d43
2015-07-16 14:00:24 +02:00
Andrea Gelmini
462e986e0d Fix typos
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec
Reviewed-on: https://gerrit.libreoffice.org/16712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:18:19 +00:00
Caolán McNamara
5d4d67abd3 coverity#1309054 Uncaught exception
Change-Id: I81c8983a981e1dfeff17f62c852163e6290dceb4
2015-07-02 11:39:30 +01:00
Caolán McNamara
3450054955 coverity#1308448 Uncaught exception
Change-Id: Ib6e994cc89ddfaf504f5b585127d5ea4fb257458
2015-06-27 18:24:58 +01:00
Andrea Gelmini
01532b1ab8 Fix typos
Change-Id: I28cfc629dc3d6ef54128615452667ccce86c1072
Reviewed-on: https://gerrit.libreoffice.org/16297
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:05:58 +00:00
Caolán McNamara
c0fe057827 cppcheck: noExplicitConstructor
Change-Id: Ic323f07196d8a0d106d9ddf73a06db377c23fb98
2015-05-25 15:03:43 +01:00
Noel Grandin
e929194317 convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-22 06:32:35 +00:00
Stephan Bergmann
8cafd08278 Use typed Timer::SetTimeoutHdl Link
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-05-05 10:21:54 +02:00
Noel Grandin
cc7af44abd loplugin:staticmethods
Change-Id: I86e2095bee82a2a6a28b8750e5a328c4d395e2aa
2015-05-05 09:30:40 +02:00
Noel Grandin
6bb742b9cb convert STR_EVENT constants to scoped enum
- also add needed infrastructure to o3tl::enumarray so we can use
std::find on it
- move the Impl inside the .cxx file, no need to expose it in the header

Change-Id: I7758a6175849f46723d97b1e657f846524c3b7cd
2015-04-29 10:41:40 +02:00
Noel Grandin
12ba9e3cad loplugin:staticmethods
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
2015-04-23 13:08:48 +02:00
Stephan Bergmann
9222f5d065 A UNO Any can't contain an Any
...and css::uno::makeAny<css::uno::Any>() was never meant to be used.  Introduce
css::uno::toAny for the (template-code) cases that shall return an Any for both
Any and non-Any inputs.

Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
2015-04-08 17:45:08 +02:00
Noel Grandin
fcaad6576d fix shadow error
introduced by my commit 216fdcbdb4
"convert RECALCMODE_ constants to scoped enum"

Change-Id: Ie7db053741205faeac70e3d21757774567f43ce0
2015-04-08 11:40:16 +02:00
Stephan Bergmann
54e87df11f Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE

Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
2015-04-02 18:33:37 +02:00
Stephan Bergmann
44b3e56bb4 Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload

Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02 16:30:34 +02:00
Stephan Bergmann
0ca607e067 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I5be2bed2203cd3807d3d9659e09e5f60f7a3257c
2015-04-01 08:43:13 +02:00
Noel Grandin
858e455634 loplugin:constantfunction: various
Change-Id: I6eddda9f4b31c7ce413c328b6a857a81bd222eed
2015-03-24 10:51:22 +02:00
Stephan Bergmann
3099c70b11 Fix various XServiceInfo implementations
...to match what is recorded in the .component files

Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-17 12:25:11 +01:00
Caolán McNamara
567f511924 V801: Decreased performance
Change-Id: I97c7977fdfea57b5d1c45ce0c5902b74cc719db9
2015-03-06 17:08:55 +00:00
Caolán McNamara
c622304965 V813: Decreased performance
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
2015-03-04 00:51:57 +00:00
Stephan Bergmann
2cebd4d086 loplugin:deletedspecial
Change-Id: Id3f938a5794e29b14c6adca0065465f3412c5fe2
2015-02-07 12:36:04 +01: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
Stephan Bergmann
ea0bb58d98 Drop unused comphelper::service_decl::component_getFactoryHelper params
Change-Id: Ia47c0bc3539ddf8f925cd053a2431c742c46d337
2015-01-20 11:06:01 +01:00
Stephan Bergmann
f6cfe99d22 Some more loplugin:cstylecast: vbahelper
Change-Id: I0b09119d0084ac4eed8d805c4fbca0afc013080d
2015-01-20 09:06:53 +01:00
Andrea Gelmini
83e8d0166d Fix typo code Resouce->Resource
Change-Id: I6e68c13e4513c2f8cc38e237646db7dffc88fe3b
Reviewed-on: https://gerrit.libreoffice.org/13986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 08:46:05 +00:00
Michael Weghorn
5901827bd4 fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I1cd8b118e2598b8b18fb445851a3bb41e554267b
Reviewed-on: https://gerrit.libreoffice.org/13967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 06:18:37 +00:00
Andrea Gelmini
07e84cae98 Fix typo comments Resouce->Resource
Change-Id: Ia3195a21ad46b4c9830ee6293135dfe5945986a2
Reviewed-on: https://gerrit.libreoffice.org/13985
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 06:13:25 +00: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
14c1ffe5bd vbahelper: Use appropriate OUString functions on string constants
Change-Id: Iabe3deccf77a79db03909b8ae6ab70322cf0ffba
2014-12-15 10:19:57 +01:00
Caolán McNamara
131762b16d coverity#738950 Structurally dead code
Change-Id: If481c3dfd2c7c9b13bb7fa756156693fd02b8916
2014-12-11 11:02:06 +00:00
Noel Grandin
2979ff295c fdo#38835 strip out OUString globals
Change-Id: I1a435214af102461e02217f7d95248dac14e5f1a
2014-12-08 14:13:17 +02:00
Noel Grandin
705c48d32e fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.

Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00
Noel Grandin
229eed079c loplugin: cstylecast
Change-Id: If991c0efe1ded6ef6d32b3a722ee87bbe36bf0bf
2014-10-23 12:36:16 +02:00
Stephan Bergmann
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00