summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2017-01-19New loplugin:dynexcspec: Add @throws documentation, basicStephan Bergmann
Change-Id: Ic3e265e05c69942c5c1c7d1b83f65f2cbe35ca1f
2017-01-19clear ARRAY_VS_SINGLETON coverity warningsCaolán McNamara
experiment to see if this clears them Change-Id: I91a74e06f621d3012b564cad87586ba74b0367ca
2017-01-16new loplugin: useuniqueptr: basicNoel Grandin
Change-Id: I5a9806e8dd79431f14d6861c8f4d65f828398f07 Reviewed-on: https://gerrit.libreoffice.org/33145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09Revert "Remove test_getsystemticks_method.vb for now"Stephan Bergmann
This reverts commit 93a8ebac2d6eb124bf57223069765af08fcd5c85, now that fce604c8ae11b462113305aba080d77f8193cfea "[API CHANGE] return unsigned 64-bit value from GetSystemTicks in basic code" is in.
2017-01-09[API CHANGE] return unsigned 64-bit value from GetSystemTicks in basic codeNoel Grandin
instead of 32-bit value. looks like this has been incorrect since commit 9f2104e1f3a1ef8a37406b39188234df309241bc Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Mon Jun 19 16:46:13 2006 +0000 INTEGRATION: CWS warnings01 (1.23.26); FILE MERGED but nobody cared, since the values would previously fit into a 32-bit number. Change-Id: I4c121085977b5e7ff3e33c8ad57749b925ad31b9 Reviewed-on: https://gerrit.libreoffice.org/32879 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09Remove test_getsystemticks_method.vb for nowStephan Bergmann
Introduced with 060c2b9b1b0d3c9cf27f1b289a620cfa82b5b060 "QA Basic: split tests of methods in different files", but GetSystemTicks appears to routinely return negative values. Change-Id: Ibccdf753aea581e05e9d4e1bf551ae72dc70c959
2017-01-06QA Basic: split tests of methods in different filesLaurent Balland-Poirier
Following resolution of "Missing TAN method" [1] as discussed on dev list [2] a large majority of methods are now tested with (almost) one method per file Missing methods: - colors failed: RED, GREEN, BLUE - file methods: DIR, CHDRIVE, EOF,... - financial methods calling Calc functions: IPmt, IRR,... - not totaly implemented methods (?): ROUND, WAITUNTIL... [1] https://bugs.documentfoundation.org/show_bug.cgi?id=102872 [2] http://nabble.documentfoundation.org/QA-test-for-BASIC-functions-tt4202257.html Change-Id: I2b2824b5b18a2cfbbee2bbc5369e9e2b9e5c930b Reviewed-on: https://gerrit.libreoffice.org/32519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-24basic: cleanup test_*_methodsLaurent Balland-Poirier
cleanup remove duplicate test with other tests Change-Id: I4c82ad9f226f25080199ac0dc3815492fc4c265a Reviewed-on: https://gerrit.libreoffice.org/31860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-12-19no need to wrap calls to SAL_INFO in #ifdef DBG_UTILNoel Grandin
Change-Id: Ic373a8f145f3f78c3f109e36a9c1dd9156f0dd75 Reviewed-on: https://gerrit.libreoffice.org/32034 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-14Partially fix VBATest::testMiscOLEStuff for Win64Mike Kaganski
On Windows x64 there are two ODBCs - one for each bitness. A 64-bit build gets 64-bit ODBC, and there is no provider named "Microsoft Excel Driver (*.xls)", no normally the test is simply skipped. But if MS Excel is installed, then it installs provider "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)", that was detected by previous code, but not used inside the VBAs. So, VBAs tried to use "Microsoft Excel Driver (*.xls)" unavailable to them. This patch allows using Excel's provider as well, thus allowing developer to test against 64-bit-specific regressions. However, the last test uses Microsoft.Jet.OLEDB.4.0 provider, that is unavailable on Win64. There are substitutions - Microsoft.ACE.OLEDB.12.0 and Microsoft.ACE.OLEDB.15.0, but there is no easy way to test if they are installed. Thus, that test is disabled on Win64 for now. Also, possible buffer overflow fixed, when byte count was passed to SQLGetInstalledDriversW instead of char count. Change-Id: Ib5c55251f0e92b3078a46aee173b5061439445ae Reviewed-on: https://gerrit.libreoffice.org/32019 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-13OSL_TRACE->SAL in avmedia..canvasNoel Grandin
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-08convert SFX_HINT to scoped enumNoel Grandin
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08loplugin:staticmethodsTor Lillqvist
Change-Id: Ic65f024fd88915544539dedf3aa1c68a945cddd3
2016-12-07basic: small lcl_eraseImpl refactoringArnaud Versini
Change-Id: I72dc8bbbd554aec9a8481cc1d9330d2a866a3ba9 Reviewed-on: https://gerrit.libreoffice.org/31597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-12-06cleanup unused includes (related to tdf#88206)Jochen Nitschke
cppuhelper/compbase*.hxx and cppuhelper/implbase*.hxx compbase*.hxx includes implbase*.hxx replace compbase*.hxx if only implbase*.hxx stuff is used. Change-Id: I631a20aee411c6a32ffcf470f6e392621755f995 Reviewed-on: https://gerrit.libreoffice.org/31686 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05basic : Make NeedEsc easier to readArnaud Versini
Change-Id: Ie2ee404a51262cd08673268169a41255abf012bd Reviewed-on: https://gerrit.libreoffice.org/31600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-04basic: cleanup test_math_methodsArnaud Versini
Change-Id: I11b3ca4c55151de7403ff9980ada9958d8ef12dc Reviewed-on: https://gerrit.libreoffice.org/31592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
2016-12-02oops, wasn't supposed to commit thatNoel Grandin
snuck in with commit 4d2c210c74567d9af6bededf3fae6bfd62406f14 "use early return to simplify flow" Change-Id: I2a5cbff01c5f40d879d320fd3934bc0856756d37
2016-12-02use early return to simplify flowNoel Grandin
Change-Id: I98201eac2e038c152422bbc6380cfa321ba266df Reviewed-on: https://gerrit.libreoffice.org/31534 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-02tdf#93592 Make it possible to add default language resource to dialogeditorNiklas Johansson
During the conversion of uno services a few lines where removed that probably should not have been removed. This caused the dialog editor to crash if you tried to add a new language resource to a document fdo#93077. The fix for that bug fixed the crash but also made it imposible to add a language resource to a dialog that isn't previously translated. With this patch the functionality should be back on track, adding/removing language resources without problems at least as far as my testing goes. Change-Id: Ie6e083837894a219bf8e9c75dec6bf7652d51615 Reviewed-on: https://gerrit.libreoffice.org/30462 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-30tdf#80731 Closing parenthesis is now detected (Mid statement and functions).Pierre Lepage
Change-Id: I5efdb6c3ce71148672a8b76d3f1cc87b0fe04994 Reviewed-on: https://gerrit.libreoffice.org/30593 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-28-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: Id85b4709e295453dfd351978096596aef09ce9a9
2016-11-28BASIC: useless override DocObjectWrapper::acquire and releaseArnaud Versini
Change-Id: Ia8fcb1c5935374376b727075c9bdcbd6a96b3c70 Reviewed-on: https://gerrit.libreoffice.org/31264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24convert SbDEBUG constants to o3tl::typed_flagsNoel Grandin
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f
2016-11-23loplugin:unnecessaryoverride (dtors) in basicStephan Bergmann
Change-Id: I5756b96bcc7563b82e35d3cdfdda3b80692767e5
2016-11-22trivial makefile cleanupsMichael Stahl
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-22tdf#102872 Add qa unit test for BASIC methodsLaurent Balland-Poirier
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-17loplugin:unusedfieldsNoel Grandin
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-11loplugin:expandablemethods in avmedia..canvasNoel Grandin
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-08loplugin:oncevarNoel Grandin
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-07basic: fix Android buildMiklos Vajna
rtl::math::round() is fine here, I guess. Change-Id: I4d92bc191182ff531e11d20ef87c69dc99da2b32
2016-11-06Fix Android build (llround)Julien Nabet
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-06Fix Android build (basic)Julien Nabet
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-06BASIC : remove ImpRound and use std::(l)lround insteadArnaud Versini
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-02loplugin:singlevalfieldsNoel Grandin
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-01BASIC : use rtl/character.hxx in sbxform.cxxArnaud Versini
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-01Omit the default comparatorTakeshi Abe
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-27Bypass VBATest::testMiscOLEStuff() in a 64-bit Windows build for nowTor Lillqvist
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-23Fix typosAndrea Gelmini
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-21loplugin:expandablemethodds in include/basic..comphelperNoel Grandin
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-19loplugin:expandablemethodds in basctl..chart2Noel Grandin
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-18replace <<= with assign for <<= with rhs AnyJochen Nitschke
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-18Simplify some dynamic/static_castsStephan Bergmann
...that are unnecessarily complicated after the "remove tools/rtti.hxx" commits Change-Id: I570751a1f81c547b50248fe4e2824c5c7c5dd624
2016-10-18tdf#89307: Removed T* SvRef::opeartor &()Jacek Fraczek
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-17replace <<= with assign for <<= with rhs AnyJochen Nitschke
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-16clang-cl loplugin: basicStephan Bergmann
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-16tdf#96099 Reduce no. of useless typedefs for trivial containers.Hieronymous
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>