Commit Graph
30 Commits
Author SHA1 Message Date
Mike Kaganski ad686b26ce No need to use SAL_THROW_EXTERN_C macro in CXX
Change-Id: I6eb9f0431a9402479a2d90d5b6f68b611d52a9f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175957
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-02 22:16:06 +01:00
Stephan Bergmann c8eaadb5d7 Remaining loplugin:bufferadd
...that had been missing because the plugin didn't implement postRun, so it
didn't report anything when run as part of the shared plugin.  (But did report
the expected warnings when run as a standalone plugin during
CompilerTest_compilerplugins_clang.)

Most fixes are straightforward.  A noteworthy one is PreparedStatement::setBytes
in connectivity/source/drivers/postgresql/pq_preparedstatement.cxx:  The old
preallocation of a 20 character OStringBuffer might have prevented

  buf.append( reinterpret_cast<char *>(escapedString), len -1 );

from potentially throwing std::bad_alloc, which would have caused escapedString
to be leaked.  Even though that 20-character preallocation was likely just
random junk and not meant to address the potential leak, lets address it now.

Change-Id: Ib506332d061684a22a74e5e39e591539fd2c4900
Reviewed-on: https://gerrit.libreoffice.org/80925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17 09:03:53 +02:00
Noel Grandin f13c6ad5f0 new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned
into creating an OUString with + operations

Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6
Reviewed-on: https://gerrit.libreoffice.org/80809
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15 14:33:57 +02:00
Gabor Kelemen 2660f132cc tdf#42949 Fix IWYU warnings in cppu/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ia1b2f0a9c99acc7ac538f3b41c1b6757d414db35
Reviewed-on: https://gerrit.libreoffice.org/66970
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-29 13:48:23 +01:00
Stephan Bergmann 7a3aafb5a1 loplugin:includeform: cppu
Change-Id: I438346398fd8430cf4357b8a3d8e9f423966f2ca
2017-10-23 22:46:11 +02:00
Stephan Bergmann c662bf350f Mark function declarations as CPPU_DLLPUBLIC, not only definitions
<http://msdn.microsoft.com/en-us/library/8fskxacy.aspx> "Importing into an
Application Using __declspec(dllimport)":  "Using __declspec(dllimport) is
optional on function declarations, but the compiler produces more efficient code
if you use this keyword."

Change-Id: I149306049987b2406622d7a0dc5dde92d283a5b3
2015-01-05 17:25:50 +01:00
Stephan Bergmann 9a6e2dd9e7 Missing const
Change-Id: I8a1c520023b493c0494ac2ac650542d8ecc11c5d
2015-01-05 14:48:29 +01:00
Alexander Wilms 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
Stephan Bergmann 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
Noel Grandin 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
Noel Grandin 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
Michael Meeks c3a6a57fc2 re-base on ALv2 code. 2012-06-13 14:18:29 +01:00
Matúš Kukan d899f976ee cppu: add visibility symbols 2011-12-19 10:14:52 +01:00
Matúš Kukan 051fdda153 cppu: convert to gbuild
Because of unit tests is here custom target where are idl files
processed.
2011-12-19 10:14:51 +01:00
Norbert Thiebaud 24b4c075d5 remove include of pch header in cppu 2011-11-27 13:02:56 -06:00
Sebastian Spaeth a715e1b3d0 Add vim/emacs modelines to all source files
Fixes #fdo30794
Based on bin/add-modelines script (originally posted in mail
1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-14 17:04:31 +02:00
Jens-Heiner Rechtien 7c80db2eb3 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm f4c84b6d8b INTEGRATION: CWS changefileheader (1.5.46); FILE MERGED
2008/03/31 07:23:19 rt 1.5.46.1: #i87441# Change license header to LPGL v3.
2008-04-11 09:29:18 +00:00
Rüdiger Timm de8b0032ce INTEGRATION: CWS changefileheader (1.7.20); FILE MERGED
2008/03/31 07:23:19 rt 1.7.20.1: #i87441# Change license header to LPGL v3.
2008-04-11 09:29:00 +00:00
Kurt Zenker 58207526be INTEGRATION: CWS basmgr03 (1.6.44); FILE MERGED
2007/07/26 08:52:07 fs 1.6.44.1: #i80044# +cppu_unsatisfied_iset_message
2007-10-09 14:20:00 +00:00
Vladimir Glazounov 77320c6775 INTEGRATION: CWS ause074 (1.4.92); FILE MERGED
2007/01/30 12:03:54 hjs 1.4.92.1: #i73801# remove remaining usages of sv[pre].mk
2007-02-06 12:24:13 +00:00
Oliver Bolte 28c32e8c9a INTEGRATION: CWS pchfix02 (1.5.60); FILE MERGED
2006/09/01 17:23:01 kaib 1.5.60.1: #i68856# Added header markers and pch files
2006-09-16 23:19:04 +00:00
Rüdiger Timm a3695ff424 INTEGRATION: CWS ooo19126 (1.3.160); FILE MERGED
2005/09/05 13:54:23 rt 1.3.160.1: #i54170# Change license header: remove SISSL
2005-09-08 07:44:53 +00:00
Rüdiger Timm c7dc1643a7 INTEGRATION: CWS ooo19126 (1.4.20); FILE MERGED
2005/09/05 13:54:23 rt 1.4.20.1: #i54170# Change license header: remove SISSL
2005-09-08 07:44:28 +00:00
Kurt Zenker bc00179e31 INTEGRATION: CWS impress23 (1.3.68); FILE MERGED
2004/12/29 11:57:40 dbo 1.3.68.1: #i38957# added Any <<= bool, Any::get<>(), Any::has<>(), tests
2005-01-21 15:48:26 +00:00
Oliver Bolte da419ba180 INTEGRATION: CWS cliuno01 (1.2.32); FILE MERGED
2003/07/16 13:08:08 dbo 1.2.32.1: #107130# unacquired
2003-09-04 09:52:35 +00:00
Daniel Boelzle d8344847a2 #102391# cleaning up __ symbols 2002-08-21 08:19:40 +00:00
Daniel Boelzle 230d11f432 #102391# introducing some base type extensions 2002-08-19 06:18:50 +00:00
Daniel Boelzle a46e111f65 #88337# documentation review 2001-11-09 08:14:31 +00:00
Jens-Heiner Rechtien b525a3115f initial import 2000-09-18 14:29:57 +00:00