Commit Graph

82 Commits

Author SHA1 Message Date
Mike Kaganski
62f3f3d92a SbxArray: drop 16-bit indices
Change-Id: I43b478187636b9bb53fdf7ab938436ae364bd7a7
Reviewed-on: https://gerrit.libreoffice.org/84733
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-09 14:18:25 +01:00
Gabor Kelemen
7ddedd2594 tdf#42949 Fix IWYU warnings in basic/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50
Reviewed-on: https://gerrit.libreoffice.org/82312
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-12 09:20:55 +01:00
Gabor Kelemen
754c6af45a tdf#42949 Fix IWYU warnings in include/basic/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I9dd7984affc4343f148c66077feaac19176adf51
Reviewed-on: https://gerrit.libreoffice.org/68769
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07 14:20:10 +01:00
Noel Grandin
c7f5da8b04 fix comparison of std::lower_bound result
turns out using a compare operator that takes something other than the
element type as a parameter is really hard to get right.

The changes in:
    basic/source/classes/propacc.cxx
    comphelper/source/property/propagg.cxx
    vcl/source/font/font.cxx
are a regression from
    commit 35e80e9726
    Date:   Fri Oct 19 16:01:19 2018 +0200
    when calling std::lower_bound

The change in
    toolkit/source/awt/vclxtoolkit.cxx
is a regression from
    commit 76dd28afc9
    Date:   Tue Oct 9 16:27:11 2018 +0200
    loplugin:staticvar in various

Change-Id: Icf6db22e1fc091517a53dd3624913c8c2071c106
Reviewed-on: https://gerrit.libreoffice.org/67954
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 11:04:27 +01:00
Noel Grandin
35e80e9726 when calling std::lower_bound
it's not enough to compare != end(), you also need to compare the key
against the iterator result

Change-Id: Ide5f151ba2297a35e5546f47fbc3c53cbe5ab533
Reviewed-on: https://gerrit.libreoffice.org/62014
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-20 08:00:32 +02:00
Mike Kaganski
daf7c3e732 basic: consistently use "" and <> in include directives
Change-Id: I147c0e9b9b1e09af593f54799e45e1348cd40716
Reviewed-on: https://gerrit.libreoffice.org/43298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-10 07:43:46 +02:00
Stephan Bergmann
c8fd385d61 loplugin:casttovoid: basic
Change-Id: I4e70accf67d4d812b8998b0baa07cd04c27216ad
2017-07-02 22:35:38 +02:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Stephan Bergmann
9c6a58f8c4 Clean up uses of Any::getValue() in basic
Change-Id: Ice269eae6b0278d5e089d973aae72b3f871c1272
2016-06-14 16:02:55 +02:00
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Arnaud Versini
14420e8329 BASIC : Add tools::make_ref and simplify SvRef usage
Change-Id: I8fe846dbd353bace05a8732a9b961f3507d97ef8
Reviewed-on: https://gerrit.libreoffice.org/22587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-22 12:33:52 +00:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Noel Grandin
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
Stephan Bergmann
08e49fa337 loplugin:nullptr (automatic rewrite)
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
2015-11-10 10:31:17 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Noel Grandin
065c8b48a6 use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
2015-10-30 08:10:22 +02:00
Michael Stahl
71f6aab077 basic: replace boot::ptr_vector with std::vector
Change-Id: I4967ad8345cd74c39edbea1df513978b62996b90
2015-10-26 16:09:20 +01:00
Michael Stahl
b3ee922299 basic: one more WeakImplHelper<XPropertySetInfo> duplicate
This one may be quite busted even since it compares
sal_Int32(-1) with USHRT_MAX.

Change-Id: I894b382ad499ee49f4616c7704afbb90f0556744
2015-09-11 23:44:59 +02:00
Noel Grandin
b1c25a0d8f inline "old" SbERR constants
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
2015-07-28 08:35:34 +02:00
Noel Grandin
b4ee16da65 com::sun::star->css in basic
Change-Id: I637fd7aedeb97b7dca22521474a54a1d4274f212
Reviewed-on: https://gerrit.libreoffice.org/17206
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 09:39:36 +00:00
Stephan Bergmann
761e0ae0a7 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8bce930283301130ec7a2b1eab2a2c8f65c8abf9
2015-06-08 16:23:17 +02:00
Noel Grandin
afcf1ecee1 loplugin:loopvartoosmall
Change-Id: I1e9768c08af0bc7caac6a39c13842ee9d8ad962c
2015-05-29 08:48:41 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Stephan Bergmann
2fc4a8c811 Add support for cppu::UnoType<void>
Change-Id: I88259ffaffc73979c240721d2db166c79d3085f1
2015-04-01 12:48:44 +02:00
Stephan Bergmann
4f2a236da4 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I69cac41fd3db1e99ecb55e23ac81c67046f81cb4
2015-04-01 08:35:28 +02:00
Stephan Bergmann
c3fb36ed26 Clean up C-style casts from pointers to void
Change-Id: I6dd7c7fbaf0d4b22abba0a7b1f5e37f0a46d0747
2015-03-28 19:09:17 +01:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Caolán McNamara
1b48561586 coverity#706231 Uncaught exception
Change-Id: I1f1acb91a97ff7c9fb50ad36eca7b91d361a1276
2014-05-28 13:49:49 +01:00
Stephan Bergmann
cc725643fd Clean up function declarations and some unused functions
Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033
2014-04-09 10:12:02 +02:00
Noel Grandin
1eee88dd6b basic: sal_Bool->bool
Change-Id: I1c084ca86c0b1308eb2fc1451ba34d2e702c6a7f
2014-04-07 13:53:50 +02:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
6a38eace8c Remove visual noise from basic
Change-Id: I10865b94f67de39e9dbcbe71ede42aa94d81db61
Reviewed-on: https://gerrit.libreoffice.org/8234
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25 21:09:17 +00:00
Alexander Wilms
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
Takeshi Abe
526a60086c Drop duplicate #include
Change-Id: I05569ef98293445916e8f48e7f06abd795fe9bb5
2013-12-08 17:20:40 +09:00
Caolán McNamara
609f0b8bff add limits.h for rhel-6 build
Change-Id: I9d355be54eb4072044ad660296375fca8d0fa831
2013-11-01 08:54:20 +00:00
Tor Lillqvist
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Tor Lillqvist
9097611359 We already have SAL_CALL that means __cdecl on Windows
Not that there should be any need to use it here; it is the default anyway.

Also the extern "C" is bogus here as far as I know; that affects only the
external name of the function, and that a function is passed to bsearch()
doesn't set any requirements on the external name of it. It could be a static
function with no global symbol name. But oh well.

Change-Id: Ia264bf2f952fd6f38aa36a25a084383d4d3f1bdc
2013-10-12 09:45:27 +03:00
Tor Lillqvist
7329fbd9c4 Bin two unused functions
Change-Id: I8362bfa0152f84a425ea3d461653d45c07816b92
2013-10-12 09:42:24 +03:00
Lionel Elie Mamane
b31f33bcc1 Easier conversion between Basic Date and UNO Date/Time
Utility functions to convert between Basic Date type
and the representations of Date and Time in UNO, namely:
 - com.sun.star.util.Date
 - com.sun.star.util.Time
 - com.sun.star.util.DateTime

Name of new functions:
 - CDateToUnoDate
 - CDateFromUnoDate
 - CDateToUnoTime
 - CDateFromUnoTime
 - CDateToUnoDateTime
 - CDateFromUnoDateTime

Change-Id: I2b971df20df1c0351d071023e042169b548894f1
Reviewed-on: https://gerrit.libreoffice.org/5897
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-09-11 20:40:19 +00:00
Noel Grandin
95c0d568fd use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.

Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
2013-06-05 08:13:23 +02:00
Mark Wielaard
287d483edb propacc.cxx include limits.h for USHRT_MAX.
Don't depend on accidental definition depending on the version of boost used.

Change-Id: Ib26afdde895411bdf827e1af21e490b59ef7f2d5
Reviewed-on: https://gerrit.libreoffice.org/4111
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-05-31 07:15:52 +00:00
Michael Stahl
9617741fdf basic: SbCompare_UString_PropertyValue_Impl MSVC workaround
MSVC 2008 with _DEBUG calls this with parameters in wrong order so needs
another overload to make it happy.

Change-Id: I906483ecf5325d7aa742e3d93afb151501374abb
2013-04-12 19:12:31 +02:00
Marcos Paulo de Souza
c40cd8a4f2 Remove all occurences of RTL_* and ::rtl prefix from basic
This is a big commit, so thanks for your time reviewing this :)

Conflicts:
	basic/source/sbx/sbxscan.cxx

Change-Id: Ib9bc710b87475b5695764557321e5dcef25e5933
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-03 10:07:39 +01:00
Caolán McNamara
747cb47357 remove unnecessary includes of svl/svarray.hxx
Change-Id: Ifec201efc4e97baf2d36d66c4ae6967eadd6134c
2012-07-30 12:47:50 +01:00
Michael Meeks
63c508e3e8 re-base on ALv2 code. Includes:
118568: switch to using ucpp
    Patch contributed by Juergen Schmidt
    http://svn.apache.org/viewvc?view=revision&revision=1209396
2012-07-18 09:29:19 +01:00
Michael Stahl
a96d082bc0 convert SbPropertyValueArr_Impl to boost::ptr_vector
Change-Id: Id3189a9abff5ee97b93bccefba8193ba36cb043a
2012-06-12 23:25:16 +02:00
Michael Stahl
a7a6f77582 SbPropertyValues: rename members
Change-Id: Iad6bc5af052a0795608ec11ee11c8dea3d091868
2012-06-12 23:25:16 +02:00
Michael Stahl
f9c5a36609 SbPropertyValues::setPropertyValue doesn't check that property exists
Change-Id: Ia63eea0c19bfa750b80f4c99f278f8d144c714a8
2012-06-12 23:25:16 +02:00
Michael Stahl
56366fa094 fix previous commit:
Make SbCompare_UString_PropertyValue_Impl a strict weak ordering.

Change-Id: I70d639ad44ceb69311c2d5bc1b95c972ad658451
2012-06-12 23:25:10 +02:00
Noel Grandin
8de787a266 Convert SV_DECL_PTRARR(SbPropertyValueArr_Impl) to std::vector
Change-Id: I3e072c165d83e9ade06caf2508031b473ef7691d
2012-06-12 23:25:10 +02:00