Commit Graph

323 Commits

Author SHA1 Message Date
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
Noel Grandin
8044acf2db convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was
being passed to the hints parameter by accident

Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58
Reviewed-on: https://gerrit.libreoffice.org/11916
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:52 +00:00
Noel Grandin
71540e1e47 cid#1244949 Uncaught exception
Change-Id: Ic33d60a435ee875e8e342420046aae436739c123
2014-10-10 10:14:17 +02:00
Caolán McNamara
8f436d3de7 use comphelper::rng::uniform_*_distribution everywhere
and automatically seed from time on first use

coverity#1242393 Don't call rand
coverity#1242404 Don't call rand
coverity#1242410 Don't call rand and additionally allow 0xFF as a value
coverity#1242409 Don't call rand
coverity#1242399 Don't call rand
coverity#1242372 Don't call rand
coverity#1242377 Don't call rand
coverity#1242378 Don't call rand
coverity#1242379 Don't call rand
coverity#1242382 Don't call rand
coverity#1242383 Don't call rand
coverity#1242402 Don't call rand
coverity#1242397 Don't call rand
coverity#1242390 Don't call rand
coverity#1242389 Don't call rand
coverity#1242388 Don't call rand
coverity#1242386 Don't call rand
coverity#1242384 Don't call rand
coverity#1242394 Don't call rand

Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-06 14:13:27 +01:00
Noel Grandin
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
Stephan Bergmann
0b23ac2c9d vbahelper: std::auto_ptr -> std::unique_ptr
Change-Id: Ic1b28e7f79cc7dad6a045eb64e5191991533990d
2014-09-29 18:37:51 +02:00
Noel Grandin
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
Stephan Bergmann
82a72bb848 VbaNewFont apparently does not inherit XHelperInterface
...and thus should simply derive from WeakImplHelper1 instead of
InheritedHelperInterfaceImpl1?

Change-Id: I0cb023a905e93bf9c223676c964f039ac7eee7e0
2014-09-15 10:06:16 +02:00
Takeshi Abe
ea5ef0a72e Drop unused #includes
Change-Id: I77ca957204bacee95e32a7f2a54c9311002aeef9
2014-07-24 01:06:15 +09:00
Caolán McNamara
c1dd91a93c callcatcher: update unused code
Change-Id: I1dd1b40d807c7c9d9b145aca9f69a67d786ec5ff
2014-07-22 09:54:38 +01:00
Takeshi Abe
f31a9abfd2 Remove unused #includes
Change-Id: I96775ac9a8624e12974c78c6abb93ddd80eed567
2014-07-22 00:13:11 +09:00
Caolán McNamara
7f55c89470 some other coverity foo
Change-Id: Ide5a10d7f9c45970c3cc5c78213c151c85ff4570
2014-07-18 15:36:20 +01:00
Caolán McNamara
243e9ab761 fix indent
Change-Id: I799d7a7989209e9fab03fbc79439b64e6c689499
2014-07-18 15:36:16 +01:00
Caolán McNamara
e0ec561059 coverity#707480 Uncaught exception
Change-Id: I27732316c42face6750ffb7eccc238f66519e4e6
2014-07-10 13:39:18 +01:00
Caolán McNamara
92fe8838f7 coverity#707382 Uncaught exception
and

coverity#707383 Uncaught exception
coverity#707384 Uncaught exception
coverity#707385 Uncaught exception
coverity#707386 Uncaught exception
coverity#707387 Uncaught exception
coverity#707388 Uncaught exception
coverity#707389 Uncaught exception
coverity#707390 Uncaught exception
coverity#707391 Uncaught exception
coverity#707409 Uncaught exception
coverity#707411 Uncaught exception
coverity#707413 Uncaught exception
coverity#707414 Uncaught exception
coverity#706919 Uncaught exception
coverity#706920 Uncaught exception
coverity#706933 Uncaught exception
coverity#706935 Uncaught exception
coverity#706968 Uncaught exception
coverity#706970 Uncaught exception
coverity#706973 Uncaught exception
coverity#706974 Uncaught exception
coverity#707032 Uncaught exception
coverity#707044 Uncaught exception
coverity#738455 Uncaught exception
coverity#738456 Uncaught exception

Change-Id: Ifd4c0a2b6b4ddcb5df01a951b8d56435ee32d754
2014-07-09 09:59:02 +01:00
Norbert Thiebaud
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
Julien Nabet
ac76cc7e60 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23 22:11:52 +02:00
Noel Grandin
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Julien Nabet
a362f15f85 Typo: shoud -> should
Change-Id: I44f4fb9682a56af6654e1f7462dc37557d60e735
2014-05-13 23:26:20 +02:00
Noel Grandin
79cf53cb3b vbahelper: sal_Bool->bool
Change-Id: I9fd549bd4ad8f67f83db6a864aa86d0c7310d43e
2014-05-08 11:48:13 +02:00
Noel Grandin
17dcf76ef8 vbahelper: sal_Bool->bool
Change-Id: Ibf21ce17a8e743701f1011e1620f26b93f952991
2014-05-02 08:49:23 +02:00
Caolán McNamara
833067c870 coverity#707469 Uncaught exception
Change-Id: I93bb55b339dcc6a177d7403760703a895cebc805
2014-04-24 17:16:36 +01:00
Caolán McNamara
76e998d7dd coverity#707474 Uncaught exception
Change-Id: I42b3dd934f7aadd2cd7d71e7e22242b504af8825
2014-04-24 17:16:36 +01:00
Caolán McNamara
d8fa21bd11 hmm, need a rethink on these exceptions
Change-Id: I0d91e142d719b946f65ed704b06371d00534ad78
2014-04-24 13:26:57 +01:00
Caolán McNamara
cf058da1e5 coverity#707475 Uncaught exception
Change-Id: I4c9da1bb21e55578fc81e4c5b3133cbd639711cc
2014-04-24 11:10:00 +01:00
Caolán McNamara
6b260f17e9 coverity#707476 Uncaught exception
Change-Id: I667867d0333d9d82db3218e2645741a2327cd8fe
2014-04-24 11:10:00 +01:00
Caolán McNamara
4d225d3e7f coverity#707477 Uncaught exception
Change-Id: Ie91515b0cd0fcf5a1b3bc7b2d394927dafa851ea
2014-04-24 11:10:00 +01:00
Caolán McNamara
b6804259c5 coverity#707478 Uncaught exception
Change-Id: Ib967053b7d306d18c69843da39646d69540f081f
2014-04-24 11:10:00 +01:00
Caolán McNamara
cc44da64b1 coverity#707479 Uncaught exception
Change-Id: I4a1c43dab2814ed66f1785b91ead76407e32de46
2014-04-24 11:09:59 +01:00
Caolán McNamara
c27fb22432 coverity#707461 Uncaught exception
Change-Id: I73d469744605e788c3b5710b38ef846a444cff68
2014-04-23 09:40:04 +01:00
Thomas Arnhold
2dfd639916 fixincludeguards.sh: sc
sorry, huge one...
2014-04-19 11:10:10 +02:00
Thomas Arnhold
618a0f8c03 whitespace for include statements
Change-Id: I76bd0ef07a2fa134e948724cecdf539ffe6ccb8a
2014-04-15 13:43:13 +02:00
Stephan Bergmann
e04c36b459 Clean up function declarations
Change-Id: I0602166c8e6485b68e06bbcc9f0064938facd3fa
2014-04-14 14:23:33 +02:00
Thomas Arnhold
18c7992d7f no need for those static strings 2014-04-14 12:31:54 +02:00
Julien Nabet
091f4f14c5 cppcheck: multiCondition, remove 2 duplicate "else if" blocks
Change-Id: I538bacd0e52a5e7d5df9847ad4632e02124aeb95
2014-04-12 23:25:20 +02:00
Caolán McNamara
2a14903786 fix colon
Change-Id: Ibeaa20a99d7b027dee26e591bb19bd61a3aed8a2
2014-04-05 21:15:16 +01:00
Caolán McNamara
0825c92c0b coverity#708570 Uninitialized scalar field
Change-Id: I0b5a12181d67db6b096807b7b32836214c71ebc8
2014-04-05 21:11:46 +01:00
Noel Grandin
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
Noel Grandin
ba73873ea7 vbahelper: sal_Bool->bool
Change-Id: Ic4bcc2fa02426e1995d08a6992cc5b35777c1c9a
2014-04-03 09:17:51 +02:00