63 Commits
Author SHA1 Message Date
Andrea Gelmini 8acc72d8c2 Fix typos
Change-Id: I1a3aa6e77a31e1d60bfaf98006799657f91bcb1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209890
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:30:23 +02:00
Stephan Bergmann bdff0bb77b Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here

Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26 17:04:01 +02:00
Noel Grandin de60c73db3 simplify InterfaceContainerHelper::clear
instead of relying on side-effects from instantiating an iterator

Change-Id: Ie66b9e7ceeb3c4a0f4243fdd0a5ac37af77e98ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26 08:00:59 +01:00
Noel Grandin ec94926665 Use std::vector in OInterfaceContainerHelper instead of Sequence
instead of fighting the fact that Sequence is intended to be immutable

getSequence() will become a little slower, but since getSequence()
is called 5k times during 'make check', while add/remove are called
3M times, I think it's safe to say mutation is dominant.

Change-Id: I23d127c93c589050d6c06c0da47871e1ebe7b52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86929
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-17 13:40:59 +01:00
Noel Grandin 2b8cf734e3 improve "convert OSL_ASSERT to assert"
this fixes commit 3a0c457444, by
converting the assert in removeInterface() to SAL_WARN_IF, and similarly
for the related addInterface() method

Comment from sberg on the original commit:

This leaves OInterfaceContainerHelper::add-/removeInterface in somewhat
inconsistent state (as addInterface OSL_ASSERTs non-null but then also
explicitly checks for null, i.e., effectively supports null).

css.lang.XComponent::add-/removeEventListener do not explicitly specify
whether or not their arg may be null.  I /think/ we traditionally
supported null; asserting non-null thus might cause issues for 3rd-party
code.

Change-Id: I1e28cc03aa7dfe662125c573d60b447309009448
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86827
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15 10:34:49 +01:00
Noel Grandin 3a0c457444 convert OSL_ASSERT to assert
and fix the one place triggering it

Change-Id: I87ec57c6a92ed89fdacfcb0d650525eaeaa266b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86822
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15 08:27:52 +01:00
Andrea Gelmini bf298e9ef3 Fix typo
Change-Id: I08d6e2cb30c54b9e7b11498850e5f5cd7de1a98d
Reviewed-on: https://gerrit.libreoffice.org/70994
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-20 07:54:46 +02:00
Arkadiy Illarionov 5af9e26ae8 Simplify containers iterations in cppcanvas, cppu, cppuhelper
Use range-based loop or replace with STL functions

Change-Id: I72bf7cdb632c04e2fc8d4f7ab85cb6571222aa07
Reviewed-on: https://gerrit.libreoffice.org/68636
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-03 16:27:08 +01:00
Gabor Kelemen 7bad59533d tdf#42949 Fix IWYU warnings in cppuhelper/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I0eebd82b96d630da0597166cf87d398072607c13
Reviewed-on: https://gerrit.libreoffice.org/67473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-14 13:36:03 +01:00
Noel Grandin a58f6d2744 loplugin:indentation in cppu..cui
Change-Id: If625e5bf38ca8e1f12686038c7c9be8d0303b6f6
Reviewed-on: https://gerrit.libreoffice.org/67536
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08 13:16:15 +01:00
Mike Kaganski b23e4d2bac cppuhelper: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: Ib097ea1764d275a3123d0dccf05d52315b4858a1
Reviewed-on: https://gerrit.libreoffice.org/48971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 06:52:50 +01:00
Stephan Bergmann 71a6caf49b More loplugin:cstylecast: cppuhelper
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I3966d302241a52014aaad41f72924a2095ea6621
2018-01-12 20:26:29 +01:00
Stephan Bergmann 7392e1326d Improved loplugin:cstylecast to reference types: cppuhelper
Change-Id: Id442b7a76072fb346d927a7dd8659a05bb491f9b
2017-06-05 21:18:13 +02:00
Chris Sherlock 97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock 9a274915a1 tdf#43157: convert cppuhelper and io from OSL_ASSERT to assert
Change-Id: I56d49e1ce9f1c070fedcabb8f1637d17dee1083b
2017-05-07 08:11:12 +10:00
Noel Grandin 992a333130 clang-tidy: readability-else-after-return
run it against sal,cppu,cppuhelper

I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.

Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12 10:11:34 +02:00
Stephan Bergmann b519d132ad loplugin:subtlezeroinit: cppuhelper
Change-Id: I405ba174a4397938415eee6108ca1f0687b4649a
2017-02-21 07:35:09 +01:00
Tor Lillqvist 6de3688cc6 Drop :: prefix from std in c*/
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155
Reviewed-on: https://gerrit.libreoffice.org/34324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 23:01:23 +00:00
Stephan Bergmann 918faa4a16 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
2016-04-20 17:25:38 +02:00
Noel Grandin 947cc1b53a inline one-liner static method
Change-Id: I9e0bd7a34ed691b245738dd66ff5ba7cc879ebe5
2015-12-02 08:47:30 +02:00
Stephan Bergmann bf3f840302 loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-11-10 10:31:21 +01:00
Noel Grandin 171990764e com::sun::star-css in cppu,cppuhelper
Change-Id: I84a412f587fd66f6c0610f083e61cf0fa079d4d9
Reviewed-on: https://gerrit.libreoffice.org/17384
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-29 06:44:57 +00:00
Noel Grandin b55166d266 Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f.
2015-06-29 10:11:53 +02:00
Noel Grandin e57314f61f return and use std::vector from OInterfaceContainerHelper
since most of the time we don’t need a heavyweight uno::Sequence.
Adds a new method getElementsAsVector().

Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a
Reviewed-on: https://gerrit.libreoffice.org/15747
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-29 07:25:22 +00:00
Takeshi Abe 0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Stephan Bergmann e97b327266 Clean up C-style casts from pointers to void
Change-Id: I92c0a6c602e473b796df43b88c98b823de8d9399
2015-03-28 19:09:19 +01:00
Caolán McNamara 7f476fea47 boost::unordered_map -> c++11 std::unordered_map
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00: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
Takeshi Abe ef9449cd04 Avoid possible memory leaks in case of exceptions
Change-Id: I5e302cf7ac784e1413c0539d0c967a3523f04ba0
2014-07-12 07:57:32 +09:00
Noel Grandin da906ab937 cppuhelper: remove SAL_THROW macro
Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2
2014-06-05 08:17:46 +02:00
Stephan Bergmann 7f902e1697 cppuhelper: sal_Bool -> bool
Change-Id: I6e0e6c1e4880a652ea4d8f0cccf9d8103c2cbbef
2014-02-17 17:55:18 +01:00
Michael Meeks 9d7c1dcbbb re-base on ALv2 code. Includes:
Patches contributed by Ocke Janssen
   converted reportdesign.
   http://svn.apache.org/viewvc?view=revision&revision=1396797
   http://svn.apache.org/viewvc?view=revision&revision=1394326

   Patch contributed by Oliver Rainer-Wittmann
   sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
   apply print settings to new printing routines
   http://svn.apache.org/viewvc?view=revision&revision=1172115
2012-12-06 09:12:57 +00:00
Alexander Bergmann 0439af27e1 Code cleanup: ( () ) replaced by (()) 2012-01-26 17:41:07 +00:00
Norbert Thiebaud c10fb61c1a remove include of pch header in cppuhelper 2011-11-27 13:03:19 -06:00
Julien Nabet 474d8ffd63 Some cppcheck cleaning 2011-05-17 12:44:26 +02:00
Fridrich Strba 7895563216 move module cppuhelper to boost unordered containers 2011-02-03 23:39:38 +01:00
J. Graeme Lingard 1b11499074 Remove redundant comments 2010-12-05 20:28:21 +00:00
Caolán McNamara 2048cbbfad #i111793# make cppuhelper/interfacecontainer strict aliasing safe 2010-10-18 19:54:14 +01: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
Laurent Charrière 7b5a50e4ed Fix typos in comments in ure/cppuhelper
Signed-off-by: Laurent Charrière <lcharriere@gmail.com>
2010-10-14 10:54:59 +01:00
Laurent Charrière fee1a2b79e Delete commented out code in ure/cppuhelper
Signed-off-by: Laurent Charrière <lcharriere@gmail.com>
2010-10-14 10:54:58 +01:00
Laurent Charrière a22e62641a Translate German comments in ure/cppuhelper
Signed-off-by: Laurent Charrière <lcharriere@gmail.com>
2010-10-14 10:54:58 +01: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
Mathias Bauer ffd6952e9a #i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible 2009-07-10 14:03:42 +02:00
Rüdiger Timm b09cc7acba INTEGRATION: CWS changefileheader (1.18.28); FILE MERGED
2008/03/28 15:25:25 rt 1.18.28.1: #i87441# Change license header to LPGL v3.
2008-04-11 10:34:46 +00:00
Kurt Zenker 44fd1d64df INTEGRATION: CWS mingwport06 (1.17.34); FILE MERGED
2007/08/27 12:04:57 vg 1.17.34.2: #i75499# single ifdef for MSVC
2007/08/24 12:58:07 vg 1.17.34.1: #i75499# pragma is for MSVC
2007-09-06 12:21:20 +00:00
Rüdiger Timm 1fc0b4f5ce INTEGRATION: CWS cppuhelpshrink (1.16.30); FILE MERGED
2006/12/22 14:37:20 mmeeks 1.16.30.1: #i72766#
save memory in cppuhelper, using a vector instead of a hash_map
2007-01-29 14:45:47 +00:00
Oliver Bolte 414a1433dc INTEGRATION: CWS pchfix02 (1.15.14); FILE MERGED
2006/09/01 17:23:18 kaib 1.15.14.1: #i68856# Added header markers and pch files
2006-09-16 11:41:22 +00:00
Jens-Heiner Rechtien 4e2788de19 INTEGRATION: CWS warnings01 (1.13.60); FILE MERGED
2005/09/22 15:38:47 sb 1.13.60.2: RESYNC: (1.13-1.14); FILE MERGED
2005/09/07 11:05:30 sb 1.13.60.1: #i53898# Made code warning-free.
2006-06-19 09:34:07 +00:00
Rüdiger Timm 14aabc1726 INTEGRATION: CWS ooo19126 (1.13.64); FILE MERGED
2005/09/05 12:07:38 rt 1.13.64.1: #i54170# Change license header: remove SISSL
2005-09-08 08:27:32 +00:00