summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)AuthorFilesLines
2015-09-26pVar != null, so static_cast(pVar) != nullCaolán McNamara1-18/+16
Change-Id: Id22808858b5884b2f87064b389eb411e0712bab4 Reviewed-on: https://gerrit.libreoffice.org/18881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18boost->stdCaolán McNamara12-39/+33
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-14boost->stdCaolán McNamara1-2/+1
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-11basic: one more WeakImplHelper<XPropertySetInfo> duplicateMichael Stahl2-129/+14
This one may be quite busted even since it compares sal_Int32(-1) with USHRT_MAX. Change-Id: I894b382ad499ee49f4616c7704afbb90f0556744
2015-09-09Fix previous commitStephan Bergmann1-1/+2
...4b4a7c0d87eb580272aba0777c9021789025bdc0 "Revert a fix that can never have worked in the first place?"---which presumably did work after all, as Noel thankfully pointed out to me, <http://lists.freedesktop.org/archives/libreoffice/2015-September/070193.html> "Re: [Libreoffice-commits] core.git: basic/source 'Revert a fix that can never have worked in the first place?'" Change-Id: I411bfaacbfebf50589290c6a3040d0300c256439
2015-09-08Revert a fix that can never have worked in the first place?Stephan Bergmann1-9/+2
clang-analyzer-deadcode.DeadStores finds that conditionally assigning eTok = SYMBOL inside the "if( SbiTokenizer::IsKws( eTok ) )" block is useless, as the directly following if( DoParametersFollow( pParser, eCurExpr, eTok = eNextTok ) ) will unconditionally assign into eTok again, without intermediate use of the old eTok value. Now, the conditional "eTok = SYMBOL" assignment was added as 5d98ed5c6a4afc0a7943318c510e56aef8c45193 "INTEGRATION: CWS ab12fixes: #118234# SbiExpression::Term(): Allow Input as symbol for action option compatible," while the unconditional "eTok = eNextTok" assignment had followed that block ever since c25ec0608a167bcf1d891043f02273761c351701 "initial import." The referenced "#118234#" was a Sun-internal bug and is no longer available, but it does very much look as if this alleged bugfix never worked in the first place. So revert the code back to what it looked before 5d98ed5c6a4afc0a7943318c510e56aef8c45193, for now. Change-Id: I1fe1178d2c5b0c0372da32b8dd0f2dfbdb22a1ae
2015-09-08loplugin:mergeclass, merge BiNode with NameNode, Obj0Type with ObjkTypeNoel Grandin1-12/+4
Change-Id: Icbc0dfc6096a6e2c651dad4fe9f78d176f389390
2015-09-05cppcheck: fix some redundantCondition warningsJulien Nabet1-2/+2
Change-Id: If53d33fb4d9ca9dc1babb9043bd07c5d29fe74c2 Reviewed-on: https://gerrit.libreoffice.org/18353 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-05BASIC : SbiParser::DefXXX Only convert the first letter to uppercaseArnaud Versini1-2/+3
Change-Id: Iccee4712459653b35b11d8dbe99c45df753307be Reviewed-on: https://gerrit.libreoffice.org/17859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-09-03basic: remove over-engineered XEnumeration serviceMichael Stahl1-40/+15
... that was causing duplicate WeakImplHelper symbols now. Change-Id: Ibbf84a2059f30bfeb5c265adcafb4b56d2534dc8
2015-09-03loplugin:stringconstant also for cases using char const v[] = "..."Stephan Bergmann1-4/+4
Change-Id: Iba38686620624178a7be39d703389402bbcea4cb
2015-09-01coverity#1242865 Untrusted loop boundCaolán McNamara1-2/+10
Change-Id: I9332fa9b805e702fb56067efc308aff09310f603
2015-08-31New identifier for save/open macro with user defined typesLaurent Godard4-11/+35
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-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann2-84/+84
Change-Id: I349e1b9e3ea81c0684c6234497b6d44b47666b09
2015-08-29o3tl/cow_wrapper: remove boost dependencyDaniel Robertson2-0/+2
Remove boost dependencies from ::o3tl::cow_wrapper, and add the necessary includes to files including checked_delete and noncopyable that do not already include the necessary files. Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686 Reviewed-on: https://gerrit.libreoffice.org/18125 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-28Resolves: #i112383# CLng("&HFFFFFFFF") fails on 64-bits...Damjan Jovanovic1-1/+1
rather than returning -1 Found-by: andrew Patch-by: Damjan Jovanovic (cherry picked from commit 175afdcb151d9ce1238dc9fec59f2dfc2eb07345) Change-Id: I996bbfa82b10716318944f390ea53e0a5ae7c89c
2015-08-28make PostUserEvent Link<> typedNoel Grandin1-3/+2
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-27Clean up aEmptyStephan Bergmann1-6/+5
Change-Id: I4c4294b7fb1cb537ba3ae3e6e7e747a3333b7469
2015-08-26Clean up aEmptyStrStephan Bergmann2-8/+6
Change-Id: I5befe9deac917a28e80ed193b67ff29b5ba35149
2015-08-26Resolves: #i117989# Basic functions return wrong results for dates <1900-1-1Damjan Jovanovic1-22/+2
Also extended our spreadsheeet test to search through more columns, open spreadsheets with macros enabled, and added a test for the the Year(), Month(), Day(), Hour(), Minute(), and Second() functions comparing Calc's formulas vs StarBasic's runtime functions. Found-by: villeroy Patch-by: Damjan Jovanovic (cherry picked from commit a68493266e9212119f31e58c256f00fb9bcc8d20) Change-Id: I8f2115c623a1d35db5b7fc8184a9118c3eca6fcd
2015-08-26Convert vcl Button Link<> click handler to typed Link<Button*,void>Noel Grandin2-20/+8
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-23coverity#1242865 Untrusted loop boundCaolán McNamara1-2/+12
Change-Id: I9c6f821f7bd1e9bd3eb8f47e269e62a792523f1a
2015-08-18null pointer guard if no user defined types declared at the module levelLaurent Godard1-50/+53
Change-Id: I368a168c636e4029e9cd9bbe4a4df5d9b846c923 Reviewed-on: https://gerrit.libreoffice.org/17834 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18correct wrong commentsLaurent Godard1-4/+0
Change-Id: I6682248873bcd6302b1d8d041bbc2e19a8e0ba7b Reviewed-on: https://gerrit.libreoffice.org/17831 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18tdf#75973 : User Defined Types in password encrypted macrosLaurent Godard1-0/+161
save/load basic script so that when executing password protected the user defined types can be rebuilt supports array and nested types a unit test in sc macros-test.cxx Change-Id: Ie127ea7ad9aea3353741048c00f1b3910c5517a4 Reviewed-on: https://gerrit.libreoffice.org/17815 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17BASIC : SbiParser::pBasic is uselessArnaud Versini3-3/+1
Change-Id: I5aa041f78ea5685b996a6baf1d7bc22d5bd957ab Reviewed-on: https://gerrit.libreoffice.org/17782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-16BASIC : SbiRuntime::ClearExprStack should return voidArnaud Versini2-3/+2
Change-Id: I704d8920ec44b6d2eb1fc9599dc37e41a28b5e63 Reviewed-on: https://gerrit.libreoffice.org/17779 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-08-14tdf#92446: Revert apparently bogus attempt at fixing a memory leakStephan Bergmann1-6/+1
6b4c596b01039324cfe78f38c4e3ffb9080bcd34 "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-14make Link<> instances typedNoel Grandin2-3/+2
and remove some unused code Change-Id: I934824401b5c528b07ad76f753f78440c4492885 Reviewed-on: https://gerrit.libreoffice.org/17703 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-11loplugin: defaultparamsNoel Grandin10-13/+13
Change-Id: I29ef505ee77965df33677f8051ec39398ef0c74e
2015-08-04basic,basctl: inline some use-once typedefsNoel Grandin5-22/+12
Change-Id: I60619a5bfe9507fb5ed24123f62f6b5c2f2c8712
2015-08-03new loplugin: refcountingNoel Grandin4-54/+54
This was a feature requested by mmeeks, as a result of tdf#92611. It validates that things that extend XInterface are not directly heap/stack-allocated, but have their lifecycle managed via css::uno::Reference or rtl::Reference. Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692 Reviewed-on: https://gerrit.libreoffice.org/16924 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-29convert SBSTRM constants to scoped enumNoel Grandin5-27/+36
Change-Id: I478a9c7eca6509baf3e9a3dd3ce3dd8f3060f842
2015-07-28inline "old" SbERR constantsNoel Grandin27-843/+843
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
2015-07-28inline the "old" SbxErr constantsNoel Grandin27-438/+438
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
2015-07-28convert SbxFlagsBits to scoped enumNoel Grandin23-226/+226
Change-Id: I3dd699ca675be2ff4a8bfb7938bd5d43719b304c
2015-07-24loplugin:unusedmethodsNoel Grandin1-9/+0
Change-Id: If5090c330e12d6e537766bf4a9be0a2360381a7a Reviewed-on: https://gerrit.libreoffice.org/17312 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21Miscellaneous typosAdolfo Jayme Barrientos1-2/+2
Change-Id: I5187364d420ab78c36a91632efab9c32951d867a
2015-07-20com::sun::star->css in basicNoel Grandin29-513/+496
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-19Fix indentationMatteo Casalin1-6/+6
Change-Id: I5cff1cda3c6882e751b88a4a4d1aacbec8942578
2015-07-19sal_uIntPtr to sal_uInt32, for consistencyMatteo Casalin5-12/+12
Change-Id: Ib78dce61e8fb8c8e3bf8c7a2b02966100a4db0e8
2015-07-19sal_uInt16 to sal_Int32 with some cleanupMatteo Casalin1-5/+4
Change-Id: Ib6e42702dd1ce29645215114b26286f05ccc1332
2015-07-19Use more proper integer typesMatteo Casalin1-5/+5
Change-Id: If86163ddeff91571419a37becbbe75f98e681d7d
2015-07-17basic: replace boost::ptr_vector with std::vector<std::unique_ptr>>Michael Stahl2-12/+14
Change-Id: I96ea97c1df7903a28387d8e1171075be55a80ca7
2015-07-16loplugin:simplifyboolStephan Bergmann1-9/+9
Change-Id: I2dc7883e23c1437c4a8bf9fce19acfd3fe700ec0
2015-07-15fix Windows buildNoel Grandin1-1/+1
after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 "loplugin:unusedmethods basic" Change-Id: I7586d2487e47731db93335c3d9969626bf2eb6ab
2015-07-15loplugin:unusedmethods basicNoel Grandin15-67/+5
Change-Id: Iddfbde451088750f8c74f3ac72c35b5ccfbe0ab1 Reviewed-on: https://gerrit.libreoffice.org/17044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann2-19/+5
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-08Fix typosAndrea Gelmini2-2/+2
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0 Reviewed-on: https://gerrit.libreoffice.org/16834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-07Replace GetAppData(SHL_IDL) with a static pointer varStephan Bergmann1-7/+12
Change-Id: Ia1e22ff95457a958ef26974091aa2092b32505bd