4054 Commits

Author SHA1 Message Date
Noel Grandin
06dd5b9c9e convert SbDEBUG constants to o3tl::typed_flags
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f
2016-11-24 08:05:55 +02:00
Stephan Bergmann
f338935019 loplugin:unnecessaryoverride (dtors) in basic
Change-Id: I5756b96bcc7563b82e35d3cdfdda3b80692767e5
2016-11-23 18:37:02 +01:00
Michael Stahl
6a18fdceb5 trivial makefile cleanups
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-22 13:14:57 +01:00
Laurent Balland-Poirier
8a50ea5454 tdf#102872 Add qa unit test for BASIC methods
Add test if several methods still works

Change-Id: I8d26e5e3555dbbc0f07152138e1bc0cd65d90998
Reviewed-on: https://gerrit.libreoffice.org/30166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
2016-11-22 09:30:41 +00:00
Noel Grandin
bb674aa550 loplugin:unusedfields
Change-Id: Id2dbbf384637223db3d334d95332251832918003
Reviewed-on: https://gerrit.libreoffice.org/30927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17 13:10:42 +00:00
Noel Grandin
f31d98f63c loplugin:expandablemethods in avmedia..canvas
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54
Reviewed-on: https://gerrit.libreoffice.org/30753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 07:00:18 +00:00
Noel Grandin
8955c3fde6 loplugin:oncevar
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d
Reviewed-on: https://gerrit.libreoffice.org/30668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:11:51 +00:00
Miklos Vajna
f996a5a153 basic: fix Android build
rtl::math::round() is fine here, I guess.

Change-Id: I4d92bc191182ff531e11d20ef87c69dc99da2b32
2016-11-07 08:03:34 +01:00
Julien Nabet
62d7d5b8cf Fix Android build (llround)
Change-Id: I4f412f36f690bb2857ffa8c6188a9a4ce3994730
Reviewed-on: https://gerrit.libreoffice.org/30607
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-06 11:58:30 +00:00
Julien Nabet
703d00e335 Fix Android build (basic)
by retrieving the content of former function ImpRound

Change-Id: Ibb5085cb67c47b5a46644250efd6dcef7a0fc837
Reviewed-on: https://gerrit.libreoffice.org/30605
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-06 09:50:10 +00:00
Arnaud Versini
3db1e9ed4d BASIC : remove ImpRound and use std::(l)lround instead
Change-Id: I1e8f58890395bc6bc29f56c258836db3dc52384c
Reviewed-on: https://gerrit.libreoffice.org/30464
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-06 08:08:50 +00:00
Noel Grandin
b1f8cf3782 loplugin:singlevalfields
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76
Reviewed-on: https://gerrit.libreoffice.org/30476
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 13:06:37 +00:00
Arnaud Versini
6e0b4ffd25 BASIC : use rtl/character.hxx in sbxform.cxx
Change-Id: I88c9d26b27ff80e02a88349198813d2771522343
Reviewed-on: https://gerrit.libreoffice.org/30445
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01 06:54:11 +00:00
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
Tor Lillqvist
f29ce347f9 Bypass VBATest::testMiscOLEStuff() in a 64-bit Windows build for now
It fails when Excel is installed, for some reason:

    Basic error:
    Type: com.sun.star.uno.RuntimeException
    Message: [automation bridge] unexpected exception in IUnknownWrapper_Impl::invoke ! Message :
    [automation bridge]: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    macro result for ole_ObjAssignNoDflt.vb
    macro returned:

    C:/cygwin64/home/Tor/lo/64bit-debug/basic/qa/cppunit/test_vba.cxx:155:`anonymous namespace'::VBATest::testMiscOLEStuff
    assertion failed
    - Expression: pReturn->GetOUString() == "OK"
    - Result not as expected

Note that this test returns early if Excel is not installed, so it is
not run effectively performed anyway even in 32-bit builds on most
(any?) Jenkins and tinderbox machines.

Change-Id: I0a0b6f27219dec116369fae1bb7c95b3e9597e77
2016-10-27 12:33:34 +03: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
Noel Grandin
5a5731cd05 loplugin:expandablemethodds in include/basic..comphelper
Change-Id: I1aa9c12e8839325a9fd98530abc89a3d586ff62e
Reviewed-on: https://gerrit.libreoffice.org/30120
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21 09:57:38 +00:00
Noel Grandin
f019ee7cf9 loplugin:expandablemethodds in basctl..chart2
Change-Id: I96f565a974fe3e316ae2ab04f8731b8bbfb87993
Reviewed-on: https://gerrit.libreoffice.org/29998
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 08:07:04 +00:00
Jochen Nitschke
d1ea6ecda6 replace <<= with assign for <<= with rhs Any
found by deleting specialization of '<<=' template

Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c
Reviewed-on: https://gerrit.libreoffice.org/29956
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-18 19:16:44 +00:00
Stephan Bergmann
7596535983 Simplify some dynamic/static_casts
...that are unnecessarily complicated after the "remove tools/rtti.hxx" commits

Change-Id: I570751a1f81c547b50248fe4e2824c5c7c5dd624
2016-10-18 16:53:18 +02:00
Jacek Fraczek
398d641664 tdf#89307: Removed T* SvRef::opeartor &()
Usage has been replaced with SvRef::get() or removed where applicable.

Change-Id: I49f108910b668466134c40940b53fc3ab2acd816
Reviewed-on: https://gerrit.libreoffice.org/29780
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-18 09:27:56 +00:00
Jochen Nitschke
9ac8a57e52 replace <<= with assign for <<= with rhs Any
makeAny and Any ctor return an Any

Change-Id: Iaa361bc315d785f80153acf1009bf47d109728ec
Reviewed-on: https://gerrit.libreoffice.org/29914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-17 15:39:13 +00:00
Stephan Bergmann
233e5d5f85 clang-cl loplugin: basic
Change-Id: Ibb324ac81343d56038d18a4ee9b27b486df6e520
Reviewed-on: https://gerrit.libreoffice.org/29881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:33 +00:00
Hieronymous
01dc6d098d tdf#96099 Reduce no. of useless typedefs for trivial containers.
Reduced vector< OUString > typedefs in sbintern module.

Change-Id: I5b2fd6f0b5fe0ae538a12ac028a08458c6eb4714
Reviewed-on: https://gerrit.libreoffice.org/29916
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-16 10:41:20 +00:00
Hieronymous
6956e3379b Improve UNO error reporting. Make exceptions more descriptive.
Change-Id: I7f7462d2fe2fa29361fd51871bf43bcc5e817944
Reviewed-on: https://gerrit.libreoffice.org/29771
Tested-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-10-13 14:01:40 +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
3e993a51f1 loplugin:staticmethods: basic
Change-Id: Ic8c8c8ad4470e14d662f478f6b859cd908c9f78c
2016-10-07 12:07:43 +02:00
Stephan Bergmann
f1a8c3119f Replace DdeData conversion operators with proper functions
Change-Id: I866bdcbf1b6a5cda4472b6655ace866a3d5a8983
2016-10-05 13:39:25 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Andrea Gelmini
8f9af8dd97 Fix typos
Change-Id: Ie44267e7c9f92eb1920f05235826abff761251f1
Reviewed-on: https://gerrit.libreoffice.org/29430
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-03 13:43:44 +00:00
Laurent Balland-Poirier
db29cdcc70 tdf#102872 TAB function is missing its argument
Commit 98f0e0eda50690bd01842c806bd13e3bc5af2966 introduced TAB function
but its declaration in basic/source/runtime/stdobj.cxx is missing its argument
So it used TAN function as argument

Change-Id: Id4461ca805f9c7034b0440de46b845f29f57e3b0
Reviewed-on: https://gerrit.libreoffice.org/29437
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-03 09:25:15 +00:00
Noel Grandin
4d87443bf5 loplugin:constantparam
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c
Reviewed-on: https://gerrit.libreoffice.org/29321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30 06:57:26 +00:00
Eike Rathke
7d8196ea2f perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 related
There were over 150 places in *::Notify() functions that did some
dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the
base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast
operations come with quite some cost, so avoid if possible. Specifically
for ScFormulaCell::Notify() that created a bottleneck in scenarios where
cells were notified that already handled a previous notification. In
mass operations doing the dynamic_cast before it could be decided
whether having to act on it or not this made 2/3 of all time spent in
the Notify() call.

To get rid of that rename/move SfxSimpleHint to SfxHint and let classes
derive from SfxHint instead of SfxSimpleHint. This comes only with a
slight cost that an additional sal_uInt32 is transported in such hints,
initialized to 0, but this is neglectable compared to the huge gain.

For the rare cases where a Notify() actually expects both, an SfxHint
(formerly SfxSimpleHint) and a derived hint, this changed order of the
dynamic_cast involved so the simple SfxHint::GetId() is handled last.
Modules using such combinations can further optimize by treating the
simple SfxHint::GetId() first once verified that none of the other
derived hints use an ID not equal to zero respectively none of the ID
values the simple hint uses.

Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce
Reviewed-on: https://gerrit.libreoffice.org/29205
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23 15:14:03 +00:00
Stephan Bergmann
e27a0ec89f Related cid#1371289: Improve code to not depend on missing move assignment
Change-Id: Id254fa76cafe33a36646d517d224ba6a05406c09
2016-09-20 11:19:32 +02:00
Noel Grandin
a2b77b4368 loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.

Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 08:30:26 +00:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +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
Noel Grandin
0761f97525 loplugin:constantparam in accessibility to basic
Change-Id: Id77cbcaefebf310a5d99c6ac12d154e182fd0a1c
Reviewed-on: https://gerrit.libreoffice.org/28860
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 08:46:12 +00:00
Jochen Nitschke
f1018190a8 tdf#88205 use list ctor for uno::Sequence a11y to canvas
Change-Id: Ib719c94c0488b8a48fdb013bc8fbd1a988595d18
Reviewed-on: https://gerrit.libreoffice.org/28866
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 07:23:51 +00:00
Stephan Bergmann
a53808c0ed loplugin:dllprivate
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13 22:26:22 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "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
Caolán McNamara
f352ee156c boost::intrusive_ptr->tools::SvRef
Change-Id: I4c913dc62efe3f3747e78670f4efb0216d95c4ad
Reviewed-on: https://gerrit.libreoffice.org/28585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-02 08:09:19 +00:00
Jochen Nitschke
c53912e526 cppcheck:assertWithSideEffect
Change-Id: Ib3d2bb85c925a4208a9e2f0032857a11258c3bb2
Reviewed-on: https://gerrit.libreoffice.org/28540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-08-31 12:19:05 +00:00
Stephan Bergmann
1bab5c7419 loplugin:stringconstant: adapt to improved OUStringLiteral1 (basic)
Change-Id: I7e9ceb5513b34115bb1f41e627af06bbffc6ecf1
2016-08-30 15:26:56 +02:00
Arnaud Versini
301279ea15 BASIC : Remove useless SbxBase::GetCreator
Change-Id: I3d9aa358ffaefc11b7d2427f2b567c360be2c667
Reviewed-on: https://gerrit.libreoffice.org/28434
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-29 06:21:34 +00:00
Arnaud Versini
a8c5edcea9 BASIC: Devirtualize SbiExprNode::~SbiExprNode and make SbiExprNode final
Change-Id: I95581265e2cc7befc00e67d42b6516d49c794680
Reviewed-on: https://gerrit.libreoffice.org/28438
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-08-28 19:40:41 +00:00
Jochen Nitschke
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00:00
Noel Grandin
b8064bdf7f new loplugin: countusersofdefaultparams
Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04
Reviewed-on: https://gerrit.libreoffice.org/28353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25 06:37:42 +00:00
Asela Dasanayaka
057ae1cfca tdf#96505 get rid of "long" integer literals 'L'
Remove L from integer literals in module basic all 0L, 1L, 2L and 3L

Change-Id: Ia46ce3d206020e16fc17e95731244a557941528c
Reviewed-on: https://gerrit.libreoffice.org/27816
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-08-24 12:19:57 +00:00