Commit Graph

297 Commits

Author SHA1 Message Date
Takeshi Abe
cb90f0976d Omit the default comparator
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0
Reviewed-on: https://gerrit.libreoffice.org/30319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-01 04:11:44 +00:00
Andrea Gelmini
525311b0d6 Fix typos
Change-Id: Ib7b17f85c7b6a1937c3f6e1617ceec58074643b4
Reviewed-on: https://gerrit.libreoffice.org/30040
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-23 17:17:01 +00:00
Jacek Fraczek
f004aa9951 tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.

SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.

Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-10 08:48:30 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
20a9e101d9 loplugin:constantparam
clean up the plugin a little, and try to catch params which are default
constructed, which doesn't seem to be working yet

Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12
Reviewed-on: https://gerrit.libreoffice.org/28861
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 08:47:06 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Muhammet Kara
d5784e91e9 Improve readability of OUString concatanation in LibPage
, ScriptDocument
, PropBrw
, VBATest
, SbUnoClass
, SbModule
, and SbiSymPool

It is more readable and more efficient as a bonus.
See: https://goo.gl/jsVAwy:

Change-Id: I73926989345193b133e538d5aeca36f12723162c
Reviewed-on: https://gerrit.libreoffice.org/26853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-03 15:46:58 +00:00
Noel Grandin
cea4c1afdf loplugin:singlevalfields in basic and fix leak
And fix leak in BasicManagerImpl where it would never have freed
the streams.

Change-Id: I1e99c2c6a70a8cac27dd5c86a7042efc3de7a578
Reviewed-on: https://gerrit.libreoffice.org/26632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27 05:17:31 +00:00
Michael Stahl
136a2fd6c0 compilerplugins: add OWeakObject::release() override check
Change-Id: I767857545d7c91615cf162790c04f0016de9fdf6
Reviewed-on: https://gerrit.libreoffice.org/26555
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-24 12:05:09 +00:00
Arnaud Versini
c0d7dfa56c BASIC : Add SbModule::FindMethod
Change-Id: I3418c4a3d24b3b6630d6c80a6c8aa9d4ffb7e73a
Reviewed-on: https://gerrit.libreoffice.org/24346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12 07:43:03 +00:00
Noel Grandin
f107d45381 Convert SbxClassType to scoped enum
Change-Id: I48afcdd9924d22b52a8db21aa253061e4d38c85b
Reviewed-on: https://gerrit.libreoffice.org/25259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23 11:49:32 +00:00
Noel Grandin
e8fd5a07ec update loplugin stylepolice to check local pointers vars
are actually pointer vars.

Also convert from regex to normal code, so we can enable this
plugin all the time.

Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 10:55:58 +00:00
Stephan Bergmann
da50c790a7 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ib91f20761167ab78b68813d8877dceea5fef801f
2016-04-20 17:25:35 +02:00
Stephan Bergmann
c83173940a Avoid reserved identifier
Change-Id: I2f8dc470100e91841eebbe1e3b02a3d31ab3a535
2016-04-06 08:31:46 +02:00
Stephan Bergmann
f7a3bdf623 Turn SbiOpcode into scoped enum
Change-Id: I75d808dd3a42e57e7f55bad97e24fef65bb62dc6
2016-04-06 08:31:46 +02:00
Stephan Bergmann
7beeced463 Avoid reserved identifiers
Change-Id: I3fbc7cb107bdab770d5ce9ed3ecddb962d2d4666
2016-04-06 08:31:46 +02:00
Steven Guo
5819268ad7 tdf#94306 Replace boost::noncopyable with plain C++11 deleted copy ctors
Replaced boost::noncopyable with plain C++11 deleted copy ctors
in /basic/* files.

Change-Id: I9c0eb0a51ec5cb25c88c72b55f42864e73006e6b
Reviewed-on: https://gerrit.libreoffice.org/22969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-08 16:10:46 +00:00
Noel Grandin
2d0dab5b15 loplugin:commaoperator in basic/
Change-Id: I320a06e50d032a55d8d5e6354959c12327e319ee
2016-02-22 16:55:11 +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
Caolán McNamara
7347248254 cppcheck: unreadVariable
Change-Id: I15f0320b646d20f0093c77286c1ff2715aacb8ce
2016-02-15 11:45:53 +00:00
Caolán McNamara
f3f67b770b fix indent
Change-Id: I48552afc35c1f7cfff3562c36eca3f1cf6174077
2016-02-15 11:45:53 +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
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