Commit Graph

274 Commits

Author SHA1 Message Date
Noel Grandin
bbfeab3b13 loplugin:unusedmethods unused return value in include/basic
Change-Id: Ib1a006adaa92e257d40a20ff0d8beeb37e7c2fe0
Reviewed-on: https://gerrit.libreoffice.org/21360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12 06:40:03 +00:00
Arnaud Versini
5e0d36adc3 BASIC : use std::vector instead of SbArray for Modules.
Change-Id: I9594efb13b3dccc637ccd61eea4b42255c2a775c
Reviewed-on: https://gerrit.libreoffice.org/20817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-07 12:18:40 +00:00
Andrea Gelmini
92e60e1b80 Fix typos
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727
Reviewed-on: https://gerrit.libreoffice.org/21103
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-01-05 07:32:28 +00:00
Matteo Casalin
42798dc46a sal_uIntPtr to sal_uInt32
Change-Id: I856ee7aa28d45dd69b030e3db05701b415009fde
2015-12-27 16:51:25 +01:00
Arnaud Versini
4df183e2c9 BASIC: use c++ foreach loops when possible.
Change-Id: Ia1c734e26da88010eef40a4375c423b0765f43ae
Reviewed-on: https://gerrit.libreoffice.org/20423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-12-13 15:57:42 +00:00
Stephan Bergmann
c4c059beb3 DBG_TRACE_BASIC/PROFILING had been rotting for quite some time now
...e.g., it still used the long-gone tools String class

Change-Id: I9d1930c72fbae3208a0f3da14c6991f30d89a9bc
2015-12-10 08:18:15 +01:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
08e49fa337 loplugin:nullptr (automatic rewrite)
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
2015-11-10 10:31:17 +01:00
Stephan Bergmann
a80bab7058 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I9979100550a86ac3f42d74a5403fb3ffd9d5006b
2015-11-06 09:34:39 +01:00
Stephan Bergmann
fc0b9a3493 loplugin:defaultparams
Change-Id: I5a3852f85f20543165e174da9cd9a36da9a3df8d
2015-10-20 11:44:49 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Oliver Specht
89d39bc100 tdf#94559: 4th step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
    idl, editeng, sc, sd, sw, sfx2, sot, starmath

Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653
Reviewed-on: https://gerrit.libreoffice.org/19132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-06 07:29:37 +00:00
Laurent Godard
ddb4526159 tdf#94617 allow to store nStart information greater than sal_Int16 limit
- preserve backward compatibility
- nDebugFlag is stored but not used when loaded
- Flag nDebugFlag set the top bit to 1
- stores the multiplier of sal_Int16 limit to reach nStart
- in load, test this flag bit
- rebuild correct nStart
- new B_CURVERSION file format for binary storage macro
- unit test for big modules

Reviewed-on: https://gerrit.libreoffice.org/18926
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit db17079fcff6f9a068c499b17f2501cc4c82d10b)

Change-Id: Iaa037982d828fef7195615e6eda546b7199a4fe8
2015-10-01 16:36:05 +01:00
Andrea Gelmini
9e4c87be31 Fix typos
Change-Id: Ie0e941d48457d758525353d6c5cf858652f86fd3
Reviewed-on: https://gerrit.libreoffice.org/18938
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 05:53:57 +00:00
Oliver Specht
d3c7c9ea81 tdf#94559: first step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
avmedia, basctl, basic, cui, dbaccess, vcl,xmloff

Change-Id: If4496762e82e896b6fbc362e6626502703c245f5
Reviewed-on: https://gerrit.libreoffice.org/18905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-29 12:26:20 +00:00
Caolán McNamara
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
Laurent Godard
8a7b7b7b72 New identifier for save/open macro with user defined types
no version bump but B_USERTYPE defined

fix test from commit de26ef85 that should be nMaxRecords

tested full round trip on password protected document (ie. use binary storage)
master --(0)--> master --(1)--> libreoffice 4.4 --(2)--> master --(3)--> master

(0) in master, User type supported, big module supported
(1) in libreoffice 4.4, user type not supported, big module supported, no loss of code
(2) in master, user type not supported, big module not found, no loss of code
    it is OK as libreoffice 4.4 saves to LegacyVersion
(3) in master, User type supported, big module supported (all is restored)
    it is OK as module was saved with CURRENT_VERSION (see sbxmod.cxx)

Change-Id: I237cf7de70adf1a755be1bc30987b21c43b6ab35
Reviewed-on: https://gerrit.libreoffice.org/17871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31 10:14:12 +00:00
Noel Grandin
bd8b93fdff make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-28 09:49:56 +02:00
Stephan Bergmann
9d094b9f0a tdf#92446: Revert apparently bogus attempt at fixing a memory leak
6b4c596b01 "Fix memory leak for BASIC sub (as well
as void function)," from just looking at the few lines of code in isolation, and
their revision history, looked like a plausible and effective approach to fix
the leaks reported by CppunitTest_basci_vba when run under lsan.

However, tdf#92446 indicates that that innocent-looking change had rather dire
consequences.  So revert it and leave a fix for the memory leak to somebody who
actually understands all this code.

Change-Id: Ic81b1c14a1cfb07c6ec4415cc26b2f826adbc8ca
2015-08-14 13:18:56 +02:00
Noel Grandin
4f87e9da41 loplugin: defaultparams
Change-Id: I29ef505ee77965df33677f8051ec39398ef0c74e
2015-08-11 09:48:17 +02:00
Noel Grandin
b1c25a0d8f inline "old" SbERR constants
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
2015-07-28 08:35:34 +02:00
Noel Grandin
01075a7274 inline the "old" SbxErr constants
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
2015-07-28 08:35:34 +02:00
Noel Grandin
9072c5c855 convert SbxFlagsBits to scoped enum
Change-Id: I3dd699ca675be2ff4a8bfb7938bd5d43719b304c
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
Matteo Casalin
f7a2795c88 sal_uIntPtr to sal_uInt32, for consistency
Change-Id: Ib78dce61e8fb8c8e3bf8c7a2b02966100a4db0e8
2015-07-19 17:12:32 +02:00
Takeshi Abe
7640e244db tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, in basic.

Change-Id: I13c5644bd6b9e964e42a98bee9c3019d959efb36
Reviewed-on: https://gerrit.libreoffice.org/16719
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06 07:28:21 +00:00
Caolán McNamara
cfbbb3ca5d coverity#1308445 Uncaught exception
Change-Id: I831637f7f2fb2c552de8c20dc9f5da4e8783b935
2015-06-27 18:24:57 +01:00
Caolán McNamara
232db3f79c coverity#1308444 Uncaught exception
Change-Id: I103965dfb3e19964e58b3ca4ef34dcee2141d882
2015-06-27 18:24:57 +01:00
Caolán McNamara
25b665a2f3 coverity#1308435 Uncaught exception
Change-Id: I8d4ba326e94565bc1ae8b57e406883f737049aea
2015-06-27 14:42:20 +01:00
Noel Grandin
07d85c4499 remove SFX_NOTIFY macro
it has not served any purpose since we switched to using normal C++ RTTI
for the SfxHint objects

Change-Id: Ic81353bcb7863ce892eb75296248ca14d8fd6c86
2015-06-24 12:06:34 +02:00
Stephan Bergmann
761e0ae0a7 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8bce930283301130ec7a2b1eab2a2c8f65c8abf9
2015-06-08 16:23:17 +02:00
Caolán McNamara
8e22cd40ec cppcheck: noExplicitConstructor
Change-Id: I8ae8623252546ca94f65fc04b331dd9cafa4fc92
2015-06-02 08:57:56 +01:00
Noel Grandin
ae451af87d basic: used typed LINKs
Change-Id: I8770a782e7ff5529e30aee13558711bdd8a4070d
2015-05-19 11:10:54 +02:00
Julien Nabet
3aebc670e1 Remove include stdio (part2)
Change-Id: Iae58d107d8df1c543a165086fb2b7c288e7121dd
Reviewed-on: https://gerrit.libreoffice.org/15775
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-18 05:33:52 +00:00
Noel Grandin
539ba642d7 remove unnecessary header file
Change-Id: I3b86a54a773341be7e7e69e88c59dc531ea49c5b
2015-05-17 10:08:59 +02:00
Stephan Bergmann
9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00
Stephan Bergmann
5eb6bd4db7 lopluign:staticmethods: Handle DECL_LINK
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-08 19:15:32 +02:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
Noel Grandin
6bb742b9cb convert STR_EVENT constants to scoped enum
- also add needed infrastructure to o3tl::enumarray so we can use
std::find on it
- move the Impl inside the .cxx file, no need to expose it in the header

Change-Id: I7758a6175849f46723d97b1e657f846524c3b7cd
2015-04-29 10:41:40 +02:00
Stephan Bergmann
4911135f8b SbModule::Run return value is unused
Change-Id: I7cd697d944dc0efbd35b852fc553ba85bc88c15e
2015-04-28 10:19:37 +02:00
Stephan Bergmann
b87db6a187 Update to XDocumentEventBroadcaster et al
Change-Id: Ie09223824af45e5e214169182a5cd189fd04f6ef
2015-04-22 15:38:43 +02:00
Stephan Bergmann
9f23260105 SvStream: WriteUChar -> WriteBool
Change-Id: I89aa0e22c31d368ab36fe46917db6aacb11c7b14
2015-04-17 15:20:43 +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
Noel Grandin
ee094bd46f loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02:00
Stephan Bergmann
9222f5d065 A UNO Any can't contain an Any
...and css::uno::makeAny<css::uno::Any>() was never meant to be used.  Introduce
css::uno::toAny for the (template-code) cases that shall return an Any for both
Any and non-Any inputs.

Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
2015-04-08 17:45:08 +02:00
Noel Grandin
e9beb26470 convert SBI_ constants to enum class
Change-Id: I65e706f4e1adfe242808293d9514c9db8d22cc12
2015-03-02 08:59:18 +02:00
David Tardon
04814fcc3b likely intent
Change-Id: I2372ddec8e82eb99206661469843d7837d2bf6d1
2015-03-01 17:33:58 +01:00
Caolán McNamara
d41b8ac9e5 callcatcher: shave off a few more
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a
2015-02-02 21:07:54 +00:00
Stephan Bergmann
4130c64355 Some more loplugin:cstylecast: basic
Change-Id: Ib22bc7408d333a7080fa44c9c3ac9535ccf00752
2015-01-20 09:06:45 +01:00
Noel Grandin
2f69f6efa0 remove unnecessary parentheses
left over from "SVStream operator>> to Write method" conversion

Change-Id: I619eb743d7890d5c70d0a94e51ce263567fa6f3b
2015-01-16 08:08:44 +02:00