Commit Graph

300 Commits

Author SHA1 Message Date
4d6a509efe convert all remaining BOOST_STATIC_ASSERT to static_assert
and we can include a few less headers

Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-02-05 22:21:49 +00:00
4e12f9553b cppu: convert some OSL_TRACE
Change-Id: I5dc00f7b03b51916b1331c4ba64064a5aa5930c9
2015-01-29 21:48:13 +01:00
4e3da621fe Some more loplugin:cstylecast clean-up
Change-Id: I132d22e2af3cf673c17d8964f690d48990834884
2015-01-28 13:50:37 +01:00
9193a15fc5 Some more loplugin:cstylecast: cppu
Change-Id: Iec1251648031afa9eddd7445135fb08dc74821bd
2015-01-20 09:06:46 +01:00
d5c3a25aae valgrind: uninitialized variable
Change-Id: I1e166c7e3b58ed565aaf478fa0b6505d1f68b604
2015-01-08 09:23:21 +00:00
900a2996c4 coverity#1261762 Resource leak
still leaks the handle of course, but c++izes the code and hides
the leak from coverity as a side-effect

Change-Id: Ieaab1545a98da1d699df93d020f0cb452ddf2516
2015-01-08 09:10:42 +00:00
f76f40560e More unnamed namespace clean-up
Change-Id: Iaba8b9b3415c357990b795b6f23b98929ac5e00a
2015-01-05 14:02:27 +01:00
406629e9a0 These extern "C" functions are not in an unnamed namespace
Change-Id: I185b29c185094176e0992fc84c9cc82ff93de9c2
2015-01-05 13:53:26 +01:00
debced0f29 These extern "C" functions are not in namespace cppu
Change-Id: Ia98b32bd8451051750fbf810958bdcfe584ea7be
2015-01-05 13:47:54 +01:00
da2d66ce56 include
Change-Id: I77d06a70f9c000f800b9b31d3b04aafe77754446
2015-01-05 13:32:42 +01:00
9720e8e5ef Some loplugin:revisibility clean-up
Stumbled across such redundant visibility re-specifications when looking at the
odd case of cppu_unsatisfied_iquery_msg declared CPPU_DLLPUBLIC in
cppu/source/cppu/cppu_opt.cxx and used in inline code in
include/com/sun/star/uno/Reference.hxx with only a declaration lacking
CPPU_DLLPUBLIC visible, and wondering how that actually works on Windows.

However, this plugin is probably not worth it being run all the time, so
committing it to compilerplugins/clang/store/.

Change-Id: Ibc3c4e7499213de1b419ce7eb85455cb832e1510
2015-01-05 13:10:48 +01:00
305b90c999 OSL_FAIL -> SAL_WARN
Change-Id: I82ce1030e69f8794c9fdbdc138541e5d7e0541d4
2015-01-02 17:08:48 +01:00
7f476fea47 boost::unordered_map -> c++11 std::unordered_map
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00:00
398c83576b document coverity#706128 Wrong sizeof argument
Change-Id: Ibb38d8b8395300501caa0fc040f03b06770fd42e
2014-12-11 11:02:06 +00:00
12bcfec04f markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
e4573efdff restore using rtl for OSL_DEBUG_LEVEL > 1
Change-Id: I6497303e1b2d8d5ffd962489657582387ab974b1
2014-10-30 09:05:17 +00:00
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00:00
2152628832 see if we can auto-ignore new Sequence false positives as such
Change-Id: I7099dcf15843a80c25c7fb508dd9c0e8df6447e0
2014-10-27 14:34:19 +00:00
d8be5a5576 optimise UNO Sequence destructor
to avoid expensive function calls until the refcount reaches 0

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, slightly changing it to
add a uno_type_sequence_destroy to uno/sequence2.h instead of a
uno_type_destructSequence to uno/data.h.

Change-Id: I3bbff3294f2b515fc3c68c4c6c1cb16829f5cc44
2014-10-02 13:00:08 +02:00
32d6415617 fdo#83512 Make use of OUStringHash and OStringHash
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-18 13:12:48 +02:00
e71bc82224 attempt to fix Android buildbot
it seems to have issues with a < token followed by a :: token.

Change-Id: I8cc6a5b6cf00a233182de273ab6aa8609326aca9
2014-09-17 08:22:58 +02:00
9685276b97 cppu and cppuhelper: loplugin: cstylecast
Add a macro in include/cppuhelper/implbase_ex.hxx
to make initialising the type_entry classes a little less verbose.

Change-Id: I0904b5b9db269c92bc89e7ce3d6c8b09350c9897
2014-09-17 07:08:23 +02:00
bcc719d52e Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: Iaa470f710295e65347c9d12a3bce0d0b68b02417
2014-08-07 18:24:41 +02:00
0d78ad871e DBG_ASSERT->assert when followed by dereference
Change-Id: Ic1c999ffdc391ea01be5711721e7c9e63179473e
2014-07-07 10:48:25 +01:00
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
a8b32cc97a OSL_ENSURE->assert
Change-Id: Ib8ba49e89d03eaf3b3aae94dbbf121898ba9e8de
2014-06-26 16:29:14 +01:00
41e3515978 cppu: remove SAL_THROW macro
Change-Id: I2f1909f953846f0d0b6fb402b4beb373bba8b2a8
2014-06-05 08:17:49 +02:00
ed81c7fb25 fixincludeguards.sh: cppu 2014-04-19 11:10:06 +02:00
104096f175 Missing include
Change-Id: Ifbb916e72a00a9e9925fd12e7945f178d7ae200b
2014-04-04 10:05:57 +02:00
f480f26e61 Remove visual noise from cppu
Change-Id: Ib776a6e5397eb9731cf908c4015642c29b320ff6
Reviewed-on: https://gerrit.libreoffice.org/8247
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 06:12:56 -06:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
34a44156b3 cppu: sal_Bool -> bool
Change-Id: I1288f1f6f38d1475b4eb5272509e479bd9f2552d
2014-02-17 17:55:18 +01:00
a0008fd7c3 Remove needless SAL_DLLPRIVATE annotations
Change-Id: Iafaf65e5b25f5d9e00e1dc73db280f6605ad1de5
2014-02-03 16:05:09 +01:00
a2c464868a [API CHANGE] Remove UNOIDL "array" and "union" vaporware remnants from cppu
This leaves only aborting stubs (for SONAME stability) for

  typelib_static_array_type_init
  typelib_typedescription_newArray
  typelib_typedescription_newUnion

and completely removes corresponding

  typelib_ArrayTypeDescription
  typelib_UnionTypeDescription

structs and C++ inline

  getCppuArrayType*

functions.  None of this should ever have been called by client code anyway, so
while technically an API change it should not matter for practical purposes.

Change-Id: I23769d104d545533bf578762b79994e269d78c22
2014-01-31 10:18:17 +01:00
ba5261057c coverity#440026 Logically dead code
Change-Id: Ib269314be090d2d65b593b1c47fea1e10ef2582b
2014-01-28 11:29:15 +00:00
4f4a21c899 coverity#1158251 Dereference before null check
Change-Id: I724632f66d7ec64e165b039e8b9d8c43a9f5aaa7
2014-01-25 20:56:31 +00:00
a3f32769fc Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.

Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
2014-01-21 15:54:52 +01:00
82625bb98e remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
Convert code like:
    buf.append( static_cast<sal_Unicode>('!') );
to:
    buf.append( '!' );

Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-07 09:43:37 +02:00
e4a98b2b7d remove empty or
This is an additional commit to 66397a4fd222757a8bd651c0c297615319eac4a5

Change-Id: I61df7984090e984f50788d0c2573d3bf8bac233b
2014-01-05 13:13:13 +01:00
5ad06dbf64 WaE: unused function 'setNegativeBridge'
Change-Id: I251f93f421972f8e5ab346af29152cebc17ab875
2013-12-26 18:48:04 +02:00
66397a4fd2 fdo#72598 Remove SunStudio cruft from code base
Change-Id: I5150eec33228e18e274a8ae4effd3f185851b7f4
Reviewed-on: https://gerrit.libreoffice.org/7103
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-12-16 20:52:39 +00:00
a83b2af9ab Clean-up uno/lbnames.h
Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
2013-12-16 21:43:12 +01:00
acf233e2bb cppu: Avoid uno_direct_getEnvironment() indirection.
"UNO_ENV_SUBST:" should not be used.

Change-Id: If23b174de792cd69dc79e70dd8f5e8a31badb96d
2013-12-11 17:54:54 +01:00
52bbd9cc00 remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
Convert code like:
    aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" ));
to:
    aStrBuf.append( "ln(x)" );
which compiles down to the same code.

Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
2013-11-20 10:07:32 +02:00
3af99e4d59 convert equalsAsciiL calls to startsWith calls
Convert code like:
    aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
to
    aStr.startsWith( "ActiveConnection" )
which compiles down to the same machine code.

Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
2013-11-20 10:07:31 +02:00
cb327052cb Better assertions
Change-Id: I4ba11570328e17abdf063049065b4fc6dcc65a9d
2013-08-22 14:55:30 +02:00
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
19277d02fb osl_getThreadIdentifier(0) -> osl::Thread::getCurrentIdentifier()
Change-Id: Ida9785c4b9fda0459769957734952e69d7a9de44
2013-08-21 14:19:10 +02:00
08452f1208 Rename SOLAR_JAVA to ENABLE_JAVA and HAVE_FEATURE_JAVA
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
2013-08-19 10:29:04 +03:00
d1ffad7983 error: dereferencing type-punned pointer will break strict-aliasing rules
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

Change-Id: I0b5809ec1dd3fb616bb7698972205a2810ed1aa5
2013-08-12 09:03:38 +02:00