summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2015-09-09Fix previous commitStephan Bergmann
...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 Bergmann
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 Grandin
Change-Id: Icbc0dfc6096a6e2c651dad4fe9f78d176f389390
2015-09-05cppcheck: fix some redundantCondition warningsJulien Nabet
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 Versini
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 Stahl
... that was causing duplicate WeakImplHelper symbols now. Change-Id: Ibbf84a2059f30bfeb5c265adcafb4b56d2534dc8
2015-09-03loplugin:stringconstant also for cases using char const v[] = "..."Stephan Bergmann
Change-Id: Iba38686620624178a7be39d703389402bbcea4cb
2015-09-01coverity#1242865 Untrusted loop boundCaolán McNamara
Change-Id: I9332fa9b805e702fb56067efc308aff09310f603
2015-08-31New identifier for save/open macro with user defined typesLaurent Godard
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 Bergmann
Change-Id: I349e1b9e3ea81c0684c6234497b6d44b47666b09
2015-08-29o3tl/cow_wrapper: remove boost dependencyDaniel Robertson
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 Jovanovic
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 Grandin
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-27Clean up aEmptyStephan Bergmann
Change-Id: I4c4294b7fb1cb537ba3ae3e6e7e747a3333b7469
2015-08-26Clean up aEmptyStrStephan Bergmann
Change-Id: I5befe9deac917a28e80ed193b67ff29b5ba35149
2015-08-26Resolves: #i117989# Basic functions return wrong results for dates <1900-1-1Damjan Jovanovic
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 Grandin
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-23coverity#1242865 Untrusted loop boundCaolán McNamara
Change-Id: I9c6f821f7bd1e9bd3eb8f47e269e62a792523f1a
2015-08-18null pointer guard if no user defined types declared at the module levelLaurent Godard
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 Godard
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 Godard
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 Versini
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 Versini
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 Bergmann
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 Grandin
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 Grandin
Change-Id: I29ef505ee77965df33677f8051ec39398ef0c74e
2015-08-04basic,basctl: inline some use-once typedefsNoel Grandin
Change-Id: I60619a5bfe9507fb5ed24123f62f6b5c2f2c8712
2015-08-03new loplugin: refcountingNoel Grandin
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 Grandin
Change-Id: I478a9c7eca6509baf3e9a3dd3ce3dd8f3060f842
2015-07-28inline "old" SbERR constantsNoel Grandin
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
2015-07-28inline the "old" SbxErr constantsNoel Grandin
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
2015-07-28convert SbxFlagsBits to scoped enumNoel Grandin
Change-Id: I3dd699ca675be2ff4a8bfb7938bd5d43719b304c
2015-07-24loplugin:unusedmethodsNoel Grandin
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 Barrientos
Change-Id: I5187364d420ab78c36a91632efab9c32951d867a
2015-07-20com::sun::star->css in basicNoel Grandin
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 Casalin
Change-Id: I5cff1cda3c6882e751b88a4a4d1aacbec8942578
2015-07-19sal_uIntPtr to sal_uInt32, for consistencyMatteo Casalin
Change-Id: Ib78dce61e8fb8c8e3bf8c7a2b02966100a4db0e8
2015-07-19sal_uInt16 to sal_Int32 with some cleanupMatteo Casalin
Change-Id: Ib6e42702dd1ce29645215114b26286f05ccc1332
2015-07-19Use more proper integer typesMatteo Casalin
Change-Id: If86163ddeff91571419a37becbbe75f98e681d7d
2015-07-17basic: replace boost::ptr_vector with std::vector<std::unique_ptr>>Michael Stahl
Change-Id: I96ea97c1df7903a28387d8e1171075be55a80ca7
2015-07-16loplugin:simplifyboolStephan Bergmann
Change-Id: I2dc7883e23c1437c4a8bf9fce19acfd3fe700ec0
2015-07-15fix Windows buildNoel Grandin
after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 "loplugin:unusedmethods basic" Change-Id: I7586d2487e47731db93335c3d9969626bf2eb6ab
2015-07-15loplugin:unusedmethods basicNoel Grandin
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 Bergmann
...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 Gelmini
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 Bergmann
Change-Id: Ia1e22ff95457a958ef26974091aa2092b32505bd
2015-07-06tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
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-04Fix typosAndrea Gelmini
Change-Id: I75b4ad61785bf0ba1cb07735d938c0977356b8cc Reviewed-on: https://gerrit.libreoffice.org/16705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-02error: 'pGen' was not declared in this scopeMiklos Vajna
Change-Id: I6ebf100be3a90b315491e2735da9c82e5901fc59
2015-07-02BASIC : Remove SbCodeGen attribute from SbiExprNode and user std::unique_ptr.Arnaud Versini
Change-Id: I9f44f6a4b61987de960b77f54bac8cf2c981bd2a Reviewed-on: https://gerrit.libreoffice.org/16551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>