Commit Graph

273 Commits

Author SHA1 Message Date
Noel Grandin
dcf6abfcdf cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
2015-06-15 14:06:31 +02:00
Caolán McNamara
d2275c825d cppcheck: noExplicitConstructor
Change-Id: I955b04396d27e88ce228f180275955071da83ec6
2015-05-26 14:11:12 +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
Christian Lohmaier
ab465b90f6 bin/rename-sw-abbreviations.sh
renames the most annoying abbreviations in Writer (and partially
in the shared code too).

Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20 13:05:49 +02:00
Julien Nabet
5f653490a4 Remove include stdio (part3)
Change-Id: I0b44a33dc38b76130a7b230962de7ce86bd4574b
Reviewed-on: https://gerrit.libreoffice.org/15793
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-19 05:29:48 +00:00
Noel Grandin
259820af71 loplugin:staticmethods
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-05-05 09:30:41 +02:00
Stephan Bergmann
e19cd844be Rephrase comparisons between bool and sal_Bool
...to cater for forthcoming loplugin:implicitboolconversion improvements

Change-Id: I801b6b73648715448198d582a087cc834f6e20c8
2015-04-28 10:21:01 +02:00
Miklos Vajna
403fa5ec2a sw: use variadic cppu::WeakImplHelper
Change-Id: I2c03ffad8d935bad126c19a8647c924af5a9bce5
Reviewed-on: https://gerrit.libreoffice.org/15174
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2015-04-06 20:23:13 +00: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
6f3c52bb37 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2015-03-26 15:33:38 +01:00
Noel Grandin
a84c07509d loplugin:constantfunction: sw
Change-Id: Ife8ccbe4625d87d1e3314c75604cb3d947011680
2015-03-23 09:42: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
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
Caolán McNamara
309574394b callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...

commit b44cbb26ef
Author: Noel Grandin <noel@peralex.com>
Date:   Tue Jan 20 12:38:10 2015 +0200

    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: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-29 23:42:26 +00: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
Julien Nabet
7da92fdcb0 cppcheck: Possible inefficient checking for <var> emptiness
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04 19:11:13 +01:00
Caolán McNamara
79f115b91e boost::unordered_map->std::unordered_map
Change-Id: I2c65709cda6f10810452dfb8aa1a247cb3a5564f
2015-01-03 21:11:20 +00:00
Julien Nabet
26f4e226da Typo: paremeter/paramater=>parameter
Change-Id: I26993b9cf01408803e0353e93079e56d1f57f589
2014-12-20 16:42:04 +01:00
Stephan Bergmann
b1fab4ab32 sw: Use appropriate OUString functions on string constants
Change-Id: I9c3e03324c69beb5af4c43da208086600876f875
2014-12-18 14:12:34 +01:00
Stephan Bergmann
0f5e917024 Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call).  Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).

(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added.  The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like

  'x' == s

is an abomination that shall not be abetted.)

Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-17 16:39:33 +01:00
Stephan Bergmann
fe99ee368f sw: Use appropriate OUString functions on string constants
Change-Id: I559d1e44d9096a2583af8e05468b3743ac210c6c
2014-12-15 10:18:44 +01:00
Noel Grandin
64a70d8cf5 loplugin: cstylecast
Change-Id: Id61218433add142e109bfc858549b8d2d8d1c28f
2014-12-04 11:15:54 +02:00
Kohei Yoshida
8093e86ebe Revert "loplugin: cstylecast"
This reverts commit 8dba4716d2.

<:: is not a legal syntax at least with gcc 4.7.
2014-12-02 23:17:30 -05:00
Noel Grandin
8dba4716d2 loplugin: cstylecast
Change-Id: I922fe2b4177687863d9749c2f46aab9ddd86621a
2014-12-02 14:34:10 +02:00
Bjoern Michaelsen
4ea7a6f4f4 expand complex cascading conditional operator
Change-Id: I315f3a929a465c9fd0ec91999e947afcd08f1522
2014-11-21 15:45:02 +01: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
Matteo Casalin
195fd6b5e3 sw: convert 'a ? sal_False : sal_True' to '!a'
Change-Id: I8b3d1f7af217d36a9baf62df3e62f1361b8c57bb
2014-11-16 16:54:42 +01:00
Matteo Casalin
a080c8f34d sw: avoid 'condition ? sal_True : sal_False' expressions
Change-Id: Idd6c9f9752659fc5da575e5a3f0ffc15ce5dbe1c
2014-11-16 16:54:39 +01:00
Matteo Casalin
2abe293f08 makeAny(sal_True/sal_False) to makeAny(true/false) in sw
Change-Id: Ie368fecd39189dc6ea72737b0c695c55a2d350a9
2014-11-16 16:54:39 +01:00
Matteo Casalin
9ba8304dad sal_True/sal_False to true/false in sw comments (also delete obsolete ones)
Change-Id: Ifb29bd3e9c5dc7671c189fd9daa010305f7a85a4
2014-11-16 16:54:38 +01:00
Brij Mohan Lal Srivastava
d32be3ace8 fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.

Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14 09:20:38 +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
Matthew J. Francis
764e3016b6 fdo#84086 Fix assorted use-after-free bugs
Change-Id: Iec004fffdb0afbe27bd69f379db90f6d904a8a65
Reviewed-on: https://gerrit.libreoffice.org/11553
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-22 05:15:53 +00:00
Caolán McNamara
3fa329f610 coverity#707382 Uncaught exception
Change-Id: Idad4fbff404c23b74a83c2d3e745363c52c3d90a
2014-09-02 12:14:48 +01:00
Caolán McNamara
9ed8e1f19c coverity#707409 Uncaught exception
Change-Id: I0f19cd6411c7008a4698fc81fd2ce9c4108ce8eb
2014-09-02 12:14:48 +01:00
Stephan Bergmann
6006747f0e Fix *_component_getFactory function type
Change-Id: I0f2fedc544349a69f29df5e83bec30ea510125f5
2014-08-21 17:22:20 +02:00
Valentin Kettner
5494954b26 Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.

Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12 23:26:38 +02:00
Valentin Kettner
274f1811b9 Refactored IDocumentRedlineAccess out of SwDoc.
Into the new class DocumentRedlineManager.
Added an non const version of GetRedlineTbl to the interface.
Also Moved SetAutoFmtRedlineComment which is not part of interface.

Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-08-12 23:26:36 +02:00
Caolán McNamara
11291be10e coverity#738453 Uncaught exception
Change-Id: Id05fd31d3a62bec8d658b9ecbae484ac081b8960
2014-07-15 11:56:08 +01:00
Caolán McNamara
f9c460e34d coverity#738454 Uncaught exception
Change-Id: I9b344efa1b46a6e7c6b69d3044ef88b4cba826cb
2014-07-15 11:56:07 +01:00
Caolán McNamara
c4d33c5f8f coverity#738457 Uncaught exception
Change-Id: I152f105e7bd363528d9fa4e365d32d12c00b0a44
2014-07-14 09:21:04 +01:00
Caolán McNamara
346419a018 coverity#738452 Uncaught exception
Change-Id: I25f63c07103f55066f634fdd99411523425a9de1
2014-07-14 09:21:03 +01:00
Caolán McNamara
52153a08a5 coverity#1224989 Uncaught exception
and

coverity#1224990 Uncaught exception
coverity#1224991 Uncaught exception

Change-Id: I10c1d5a5d8a2f3e3f12699d1f2bec9febe3df126
2014-07-10 13:39:19 +01:00
Caolán McNamara
6b9cc44922 coverity#1224987 Uncaught exception
and

coverity#1224988 Uncaught exception

Change-Id: Idba0a2d289f00c8629be59b990a121044a099aa1
2014-07-10 13:39:19 +01:00
Caolán McNamara
d16cc33b49 coverity#707407 Uncaught exception
Change-Id: Ib77be2231878dcb89524e6a5c5c4f1fe30e4e7d8
2014-07-10 13:39:18 +01:00
Caolán McNamara
160c41759e coverity#707401 Uncaught exception
and

coverity#707404 Uncaught exception

Change-Id: I710963e601121d736ecd55c9dd8f9ec0a17ed815
2014-07-10 13:39:17 +01:00
Caolán McNamara
98921d4c37 coverity#738460 Uncaught exception
Change-Id: I39d0665131432ce963b434925e23b9eab2e739ca
2014-07-09 09:59:02 +01:00