d41b8ac9e5
callcatcher: shave off a few more
...
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a
2015-02-02 21:07:54 +00:00
a4faad707c
tdf#76174: basic: lock SolarMutex in BasicScriptListener_Impl
...
... before calling into BASIC.
Change-Id: I51a59fe5ca9b15ff7ec509c052964523d87a9790
2015-01-29 21:48:12 +01:00
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
4130c64355
Some more loplugin:cstylecast: basic
...
Change-Id: Ib22bc7408d333a7080fa44c9c3ac9535ccf00752
2015-01-20 09:06:45 +01:00
2f69f6efa0
remove unnecessary parentheses
...
left over from "SVStream operator>> to Write method" conversion
Change-Id: I619eb743d7890d5c70d0a94e51ce263567fa6f3b
2015-01-16 08:08:44 +02:00
7f476fea47
boost::unordered_map -> c++11 std::unordered_map
...
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00:00
39ddeb53c0
basic: Use appropriate OUString functions on string constants
...
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
2014-12-18 14:12:23 +01:00
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
898c414700
basic: Use appropriate OUString functions on string constants
...
Change-Id: Ied7e5eba39672363065083493bd5e60449fda371
2014-12-12 10:21:45 +01:00
93124f7710
reduce scope of local variables
...
This eliminates some of the warnings from Cppcheck report of
2014-11-29.
Change-Id: Ic4bf3bd8f5982d2ea2f25a28c0dd61084c59af11
Reviewed-on: https://gerrit.libreoffice.org/13331
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com >
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com >
2014-12-06 14:12:31 +00:00
41029bcdd0
coverity#1242865 Untrusted value as argument
...
Change-Id: Ie7a7a2e7894a204dd55833416b7cbc5b01826e64
2014-11-14 12:02:48 +00:00
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
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
1409c0bd88
coverity#1242865 Untrusted loop bound
...
Change-Id: I9dc9cd98d0a02a2867d4c40c7afb7bf873513143
2014-11-05 21:03:24 +00:00
5b0c95d81e
coverity#1242794 Untrusted loop bound
...
Change-Id: I902a5bf989a8f385994a2f927cce4975b18f06d2
2014-11-05 21:03:24 +00:00
12bcfec04f
markup with event type not checker type
...
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
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
cb0e009a9e
document array_vs_singleton dismissals
...
Change-Id: I8d7eb4c01197e885abca717c7814c61a7641ac9d
2014-10-30 10:10:09 +00:00
a1fad26e04
fdo#84935: basic: DocBasicItem is a UNO service, lock SolarMutex in dtor
...
Change-Id: Ia31d735ba54d18f406653debce04a07c077d09eb
2014-10-23 15:38:20 +02:00
0f6c6baf61
coverity#1242481 Dereference null return value
...
Change-Id: I21e6bdd643d898a3515a96e4c9c17c2d6f98b0e4
2014-10-03 16:30:32 +01:00
c625525ddc
rename SvRef::AddRef to AddFirstRef
...
to make it's intended purpose clearly distinguishable from AddNextRef
Change-Id: I5da780b48b19fd873667b648031bc394113f953b
Reviewed-on: https://gerrit.libreoffice.org/11763
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-10-03 05:25:41 +00:00
059f5a95b2
loplugin: cstylecast
...
Change-Id: Ic7c9c978baf5602a508aff5976220a02ed03a680
2014-10-02 07:37:19 +02:00
5cefde06ea
remove unnecessary casts in calls to SvStream.WriteUInt32
...
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
2014-09-26 15:27:17 +02:00
04fd62096f
remove unnecessary casts in calls to SvStream.WriteInt32
...
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I0c0172519479be0535a447e41a592fbf782751bd
2014-09-26 15:27:17 +02:00
5501c8d222
remove unnecessary casts in calls to SvStream.WriteUInt16
...
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
2014-09-26 15:26:48 +02:00
dedfa972bc
remove unnecessary casts in calls to SvStream.WriteInt16
...
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: Ie44bec6b988f3e46fe78d14b740818c9141f5df0
2014-09-26 15:26:48 +02:00
bec72dd34f
remove unnecessary casts in calls to SvStream.WriteUChar
...
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I2ea4c7d97e745b3e6a3834f41ac7bfefa4883c7a
2014-09-26 15:26:19 +02:00
5bce329040
SfxHint: convert home-grown RTTI to normal C++ RTTI
...
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.
Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com >
2014-09-06 15:47:44 -05:00
37b9ea92ba
convert SBX flag bits to type-safe enum
...
Change-Id: I18d5d6a27f06ee60a5cb3dc393bf05b51bba4817
Reviewed-on: https://gerrit.libreoffice.org/11070
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-08-26 04:30:03 -05:00
d21d5a7261
drop unnecessary shl.hxx includes
...
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
d438c470d7
coverity#1231668 Unchecked return value
...
Change-Id: Ia7e47b5d42e9a488b3952f12d607b3f17661c44d
2014-08-17 16:39:21 +01:00
6a873638fa
Renamed brdcst.[hc]xx to SfxBroadcaster.[hc]xx
...
- Remove includes from files where they are not needed.
- Update pch files
Change-Id: I0188e3934ef429008c1ef495ab1d5b27f38664d5
Reviewed-on: https://gerrit.libreoffice.org/10342
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2014-07-17 08:47:58 +00:00
d97b5e420f
Avoid possible memory leaks in case of exceptions
...
Change-Id: Icecc2cce52d7f27c030270639e6b85877e3aa620
2014-07-16 18:01:39 +09:00
dac4ca5f68
new loplugin: externalandnotdefined
...
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.
Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
42fcd888ae
coverity#735397 dead code
...
Change-Id: If8d82a39af7a506f42b6c13d8408ffc479b564e7
2014-07-01 12:44:06 +02:00
a7fcb3ed07
clang: Returning null reference
...
Change-Id: I2cfc14e73696a027283dfa5eef98f784505dc5a3
2014-06-26 16:29:13 +01:00
3e82897353
improve the inlinesimplememberfunctions clang plugin
...
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
f8ef1fe95b
loplugin:staticcall
...
Change-Id: I6cd46964c523c9393e9d249fdb43aaa38679fa06
2014-06-13 17:54:23 +02:00
184a00b962
loplugin: inlinesimplememberfunctions
...
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
dd8f095940
WaE: warning C4101: 'ex' : unreferenced local variable
...
Change-Id: Ib8b71b50fe52a7cc4e261626549ac3e067851797
2014-06-04 08:30:26 +02:00
3038794d2e
basic: typo
...
Change-Id: I10c9e480a94a966dac4f6c17fc69fa8892c56955
2014-06-02 12:04:31 +02:00
6b4c596b01
Fix memory leak for BASIC sub (as well as void function)
...
d88593af59d9126cdbcd6c0a5b06fb9c673dc6f9 "INTEGRATION: CWS ab34: #i73457#
Prevent sub from beeing set as param 0 for return type void" to fix i#73457
"Memory Leak in all Basic type void Method calls" had made the PutDirect call
dependent on != SbxVOID only (which would cover void functions) but not also on
!= SbxEMPTY (which would apparently be required to also cover subs, as seen with
CppunitTest_basic_vba run under lsan). Either this was an oversight with the
original fix, or subs have meanwhile changed from GetType() == SbxVOID to
SbxEMPTY?
Change-Id: I3e5dbf79bfd5eea3cfec8ed3fa984d13167aa501
2014-06-02 11:12:11 +02:00
a916b6ff7f
Detach all DocBasicItem objects upon process termination.
...
To prevent rogue DocBasicItem objects (which are global objects) from
attempting to stop listening after the main app is dead.
Change-Id: I68a667137ca4e0eff18278f4d2d5dd67466eaf34
2014-05-29 21:59:48 -04:00
5a827671d1
Avoid static local of a singleton. This crashed writer unit tests.
...
Change-Id: I7c5f2d372676cdb317a8dad636bf1aab7dd5db37
2014-05-29 21:59:42 -04:00
a71ae24a23
Avoid possible memory leaks in case of exceptions
...
Change-Id: Iac63a5d60478e5cd8e2b77c889c7b312d3d15f67
2014-05-29 09:29:15 +09:00
3d046b753d
coverity#706235 Uncaught exception
...
Change-Id: I06321ca2b686207a1d9bd698461aedf84daf31e1
2014-05-28 13:49:50 +01:00
9986fe77f4
coverity#706234 Uncaught exception
...
Change-Id: I7542008369ed3433cd8bfce7702f036148195516
2014-05-28 13:49:50 +01:00
cf16d4eb9d
coverity#706232 Uncaught exception
...
Change-Id: I07e13af4f4578d5d6823b6d10aa9c37d04ecc395
2014-05-28 13:49:49 +01:00
1b48561586
coverity#706231 Uncaught exception
...
Change-Id: I1f1acb91a97ff7c9fb50ad36eca7b91d361a1276
2014-05-28 13:49:49 +01:00
a77a7f6083
Fix memory leak
...
...by using css::uno::Type instead of a naked typelib_TypeDescription.
Change-Id: I387692265e9e032cb5ed6519739ebb3307db6f28
2014-05-28 14:34:12 +02:00