Commit Graph

961 Commits

Author SHA1 Message Date
Andrea Gelmini
a55c272845 Fix typos
Change-Id: Idd4b0f7b6c422abd6790185b5d48082b294bae64
Reviewed-on: https://gerrit.libreoffice.org/18968
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 07:06:16 +00:00
Andrea Gelmini
0e5318aa75 Script: better way to detect Windows
Change-Id: I0e99443f3715cde4414d14b2fa507ecab0995c6d
Reviewed-on: https://gerrit.libreoffice.org/18937
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30 06:56:42 +00:00
Caolán McNamara
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
Takeshi Abe
f3c7e69536 scripting: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I2a59d42efbb1aeef5078d0b0744b5a3c0559affa
Reviewed-on: https://gerrit.libreoffice.org/18123
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-09-03 17:53:31 +00:00
Stephan Bergmann
049a665bd8 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I4c29e8b2c86816114ea2566348901710f601fd92
2015-08-31 08:02:13 +02:00
Noel Grandin
368a3e45a3 sc: inline some use-once typedefs
Change-Id: I332e160dda3f167e61f99da1eb0aa6bd72a48b06
2015-08-04 08:55:56 +02:00
Noel Grandin
01075a7274 inline the "old" SbxErr constants
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
2015-07-28 08:35:34 +02:00
Noel Grandin
9072c5c855 convert SbxFlagsBits to scoped enum
Change-Id: I3dd699ca675be2ff4a8bfb7938bd5d43719b304c
2015-07-28 08:35:34 +02:00
Noel Grandin
90e8ad7ab7 loplugin:unusedmethods scripting,sc
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7
Reviewed-on: https://gerrit.libreoffice.org/17263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-22 07:02:34 +00:00
Stephan Bergmann
35279a7e2d loplugin:simplifybool
Change-Id: Ic179c3012ad99a97b11914bf7aefca58829621e0
2015-07-16 14:00:19 +02:00
Andrea Gelmini
e544f449ed Fix typos
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-08 12:21:19 +02:00
Caolán McNamara
7462cfde6d coverity#1308579 Uncaught exception
Change-Id: I6bd1f9cdf69865972de9c22106a95e1ebf9a74f7
2015-06-29 09:43:34 +01:00
Caolán McNamara
9202cab167 coverity#1308598 Uncaught exception
Change-Id: Id65e076641506e128c27cec4f50bc677e808fa95
2015-06-29 09:43:31 +01:00
Caolán McNamara
8a4d61ceec coverity#1308560 Uncaught exception
Change-Id: Ic5a483ae6de5e072430d8198651177788bf86af9
2015-06-28 21:04:25 +01:00
Caolán McNamara
6f823d85f7 coverity#1308548 Uncaught exception
Change-Id: I62d538799a814346df4de00dc232a04376e77ad7
2015-06-28 20:52:35 +01:00
Caolán McNamara
a4fdbaf546 coverity#1308512 Uncaught exception
Change-Id: Iacdf2e25fb041ec7e2bae8a505604ef538ee9dac
2015-06-28 17:55:48 +01:00
Andrea Gelmini
5d5dc059cb Fix typos
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9
Reviewed-on: https://gerrit.libreoffice.org/16523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:35:58 +00:00
Andrea Gelmini
f378e723d2 Fix typos
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56
Reviewed-on: https://gerrit.libreoffice.org/16300
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:14:55 +00:00
Noel Grandin
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
Noel Grandin
776a3f14f2 convert expressions like 'size() == 0' to 'empty()'
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
2015-06-11 10:07:08 +02:00
Stephan Bergmann
4446cdf20b loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I14d1c6f703c83bc4a0259ce68e93a315bbfdde4e
2015-06-08 16:27:44 +02:00
Philippe Jung
1379e2feaa Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like
  ADialog(some params).Execute()
by
  ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute()

Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639
Reviewed-on: https://gerrit.libreoffice.org/15915
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-28 08:44:31 +00:00
Michael Meeks
e4097762dd Audit all PostUserEvent calls and instrument for VclPtr.
Hold a reference on the VclPtr while we're waiting for the UserEvent.

Change-Id: I55c2671ca12eb14761c6a7dffd551af71547ecbd
2015-05-25 21:38:08 +01:00
Julien Nabet
3aebc670e1 Remove include stdio (part2)
Change-Id: Iae58d107d8df1c543a165086fb2b7c288e7121dd
Reviewed-on: https://gerrit.libreoffice.org/15775
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-18 05:33:52 +00:00
Noel Grandin
12ba9e3cad loplugin:staticmethods
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
2015-04-23 13:08:48 +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
ee094bd46f loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02:00
Stephan Bergmann
bbe2923961 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I936ae26f8d5d7cdd32c15e937b7cae6668b6192c
2015-04-01 08:40:47 +02:00
Stephan Bergmann
6b97231ba3 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I7d6106bda60f8cae3e110e6757b3bf267ce15ec5
2015-03-31 13:16:12 +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
Stephan Bergmann
d1c9e5ee53 tdf#43157: Fix format string violations in OSL_TRACE etc.
...for a 32-bit build, similar to what ee11e221d2
"tdf#43157: Fix format string violations in OSL_TRACE etc." did for a 64-bit
build

Change-Id: I05dd79ede3e66cb9ab7a33792319eb34b34c82dd
2015-03-13 18:21:36 +01:00
Stephan Bergmann
2358dfc602 Clean up previous commit
...and add missing XServiceInfo implementations

Change-Id: I719cd10b6202d94e751805e1b838eb3f193e24d1
2015-03-12 10:48:03 +01:00
Chris Sherlock
6f7b0a1fad scripting: use constructor syntax in vbaevents.component
Change-Id: Ie27ec9ca92137e9f8666d2080fd1bc028417e337
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-03-12 10:48:03 +01:00
Michael Stahl
e557b160fd pyuno, scripting: remove executable bits from python, js, bsh files
Change-Id: Id108693d84fbca7764614e126ee1b3b045baec17
2015-03-02 13:26:28 +01:00
Stephan Bergmann
0e882b6513 loplugin:deletedspecial
Change-Id: I862b29974c770aea7396f2d650208b1f3e1f4e4b
2015-02-07 12:36:01 +01:00
Michael Stahl
74df327e1e scripting: remove unnecessary SAL_CALL
Change-Id: Ic1fbb36a509ec1dce63f1c7fa4a8955a4780517d
2015-01-29 21:48:11 +01:00
Stephan Bergmann
3f5ccf572a Fix types of functions called via pointer (-fsanitze=function)
Change-Id: Ife0151a04477ce30bb132e6dfae9f4d3a74bf4b0
2015-01-26 15:17:31 +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
Julien Nabet
7da92fdcb0 cppcheck: Possible inefficient checking for <var> emptiness
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04 19:11:13 +01:00
Caolán McNamara
ca8787a981 boost::unordered_map->std::unordered_map
Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
2015-01-04 12:51:09 +00:00
Michael Weghorn
17fc7aa3b8 fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058
2014-12-21 20:18:17 +01:00
Stephan Bergmann
b9def20cea scripting: Use appropriate OUString functions on string constants
Change-Id: Iacb434225e779de4911e9acc8431662f5eabcee3
2014-12-18 14:12:30 +01:00
Stephan Bergmann
fe17eb9448 scripting: Use appropriate OUString functions on string constants
Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
2014-12-15 10:15:16 +01:00
Michael Stahl
8eb37e74ff pyuno: move "officehelper.py" from scripting to pyuno
... because at least in Fedora packages with system python it's a pain
to use officehelper.bootstrap() because unlike pyuno it is not installed
in the standard python directories but in libreoffice/program.

You might think that bootstrap() is not appropriate functionality for a
UNO langauge binding, but then why does ::cppu::bootstrap() exist?

Change-Id: I5fd4b344a811c087d32fb6304e55105ab3cb137e
Reviewed-on: https://gerrit.libreoffice.org/12968
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-12-02 13:47:26 +00: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
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
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
Caolán McNamara
5652f529b5 coverity#1237350 use our double-locking templates for this
Change-Id: I589468e9663ffd01a237a1684345985396bc4eac
2014-10-24 13:43:09 +01: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
Norbert Thiebaud
39c8834d21 coverity#1209004 Unchecked return value
Change-Id: I8749a5d6f176406e181312d94a1e643974d87617
2014-10-05 13:26:10 -05:00