summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)AuthorFilesLines
2016-12-24basic: cleanup test_*_methodsLaurent Balland-Poirier7-146/+84
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 Grandin1-4/+1
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 Grandin3-7/+7
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 Kaganski4-15/+20
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 Grandin11-20/+5
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-08convert SFX_HINT to scoped enumNoel Grandin14-78/+78
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 Lillqvist1-0/+2
Change-Id: Ic65f024fd88915544539dedf3aa1c68a945cddd3
2016-12-07basic: small lcl_eraseImpl refactoringArnaud Versini1-4/+2
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 Nitschke1-1/+0
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 Grandin5-52/+52
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin2-26/+26
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05basic : Make NeedEsc easier to readArnaud Versini1-2/+2
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 Versini1-27/+13
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 Grandin1-5/+5
snuck in with commit 4d2c210c74567d9af6bededf3fae6bfd62406f14 "use early return to simplify flow" Change-Id: I2a5cbff01c5f40d879d320fd3934bc0856756d37
2016-12-02use early return to simplify flowNoel Grandin1-5/+5
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 Johansson1-1/+5
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 Lepage1-0/+5
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 Bergmann1-2/+1
Change-Id: Id85b4709e295453dfd351978096596aef09ce9a9
2016-11-28BASIC: useless override DocObjectWrapper::acquire and releaseArnaud Versini1-16/+0
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 Grandin5-69/+63
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f
2016-11-23loplugin:unnecessaryoverride (dtors) in basicStephan Bergmann4-21/+1
Change-Id: I5756b96bcc7563b82e35d3cdfdda3b80692767e5
2016-11-22trivial makefile cleanupsMichael Stahl1-3/+3
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-22tdf#102872 Add qa unit test for BASIC methodsLaurent Balland-Poirier7-0/+439
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 Grandin1-13/+11
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 Grandin3-25/+6
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 Grandin1-5/+2
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 Vajna5-31/+18
rtl::math::round() is fine here, I guess. Change-Id: I4d92bc191182ff531e11d20ef87c69dc99da2b32
2016-11-06Fix Android build (llround)Julien Nabet1-0/+4
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 Nabet1-0/+9
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 Versini5-20/+22
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 Grandin3-5/+2
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 Versini1-10/+8
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 Abe1-1/+1
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 Lillqvist1-2/+4
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 Gelmini1-1/+1
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 Grandin4-12/+6
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 Grandin5-16/+6
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 Nitschke3-6/+6
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 Bergmann3-45/+42
...that are unnecessarily complicated after the "remove tools/rtti.hxx" commits Change-Id: I570751a1f81c547b50248fe4e2824c5c7c5dd624
2016-10-18tdf#89307: Removed T* SvRef::opeartor &()Jacek Fraczek5-32/+35
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 Nitschke1-10/+10
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 Bergmann6-77/+77
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.Hieronymous3-5/+3
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-13Improve UNO error reporting. Make exceptions more descriptive.Hieronymous1-4/+7
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-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek20-279/+278
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-07loplugin:staticmethods: basicStephan Bergmann1-1/+1
Change-Id: Ic8c8c8ad4470e14d662f478f6b859cd908c9f78c
2016-10-05Replace DdeData conversion operators with proper functionsStephan Bergmann1-1/+1
Change-Id: I866bdcbf1b6a5cda4472b6655ace866a3d5a8983
2016-10-05convert MapUnit to scoped enumNoel Grandin4-9/+9
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-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann7-16/+16
...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-03Fix typosAndrea Gelmini2-3/+3
Change-Id: Ie44267e7c9f92eb1920f05235826abff761251f1 Reviewed-on: https://gerrit.libreoffice.org/29430 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>