summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
2015-11-09new loplugin: oncevarNoel Grandin
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
Change-Id: I9979100550a86ac3f42d74a5403fb3ffd9d5006b
2015-11-04Resolves: #i61277# Basic open file with random access erases all data.Damjan Jovanovic
StarBasic tries to emulate truncation of files opened for writing by deleting them before opening them (if they exist). However there are exclusion to the truncation behaviour when the file is opened in append mode or is a binary file. Another exclusion - that was missing with disasterous consequences - is that the file should not be truncated when opened in random access mode. (cherry picked from commit 72b2f07ccac7578ef36fc2b92dcba49abe397ebc) Change-Id: Ic0053039ce5fd67ad42bf5332ae301d83f1a158d
2015-11-04yyyyyNoel Grandin
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-02tdf#94269: Replace "n" prefix for bool variables with "b"Benjamin Ni
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-10-30UNO: no need to use OUString constructor when calling createInstanceNoel Grandin
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526 Reviewed-on: https://gerrit.libreoffice.org/19682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30use uno::Reference::set method instead of assignmentNoel Grandin
Change-Id: I58410209f32f988f258a588364e0b037c2790211
2015-10-26basic: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I98c4ac860fbdb55a61f9be0e9d2d5f29fb849e05
2015-10-26basic: replace boot::ptr_vector with std::vectorMichael Stahl
Change-Id: I4967ad8345cd74c39edbea1df513978b62996b90
2015-10-26basic: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I0bd3a5182d62432a8f0caf4bbae11bbce56a363c
2015-10-26basic: replace boost::ptr_vector with std::vector<std::unqiue_ptr>Michael Stahl
Change-Id: Ieba2fb34e0279871d36b4fe80d9de76e614b5cde
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: I5a3852f85f20543165e174da9cd9a36da9a3df8d
2015-10-19loplugin:defaultparamsStephan Bergmann
Change-Id: Ib0f01af2c7a7186d138369c177a563b322a87214
2015-10-15calling IsSet() before Call() on Link<> is unnecessaryNoel Grandin
the Call() already does a check Found with: git grep -A 1 -w 'IsSet()' | grep -B 1 '.Call(' | grep ':' | cut -d ':' -f 1 Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12cppcheck:variableScopeNoel Grandin
Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-07Reduce variable scopeStephan Bergmann
Change-Id: I87850db982f413b328976e043d8386b7577ba17c
2015-10-06Related: tdf#94814 some cleanup of static_cast following dynamic_castCaolán McNamara
to the same type Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af
2015-10-06clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I03769bd4105e4e1d140b2885978ea9da9ef866de
2015-10-06clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: Ib26cbbc839040c49288606f588cb7400d7e40b83
2015-10-06clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I2ef946572a61eb766454d2df0cb2ff523050ed7e
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-02checkUnoObjectType etc always deref their ptr arg, convert to refCaolán McNamara
Change-Id: Iabdb057fb2dc05cfb8c98864dc5109360b50633a
2015-10-02Fix typosAndrea Gelmini
Change-Id: I776c517ba87838c0c3391f79010a30fa7fe2abd3 Reviewed-on: https://gerrit.libreoffice.org/18939 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-01tdf#94617 allow to store nStart information greater than sal_Int16 limitLaurent Godard
- preserve backward compatibility - nDebugFlag is stored but not used when loaded - Flag nDebugFlag set the top bit to 1 - stores the multiplier of sal_Int16 limit to reach nStart - in load, test this flag bit - rebuild correct nStart - new B_CURVERSION file format for binary storage macro - unit test for big modules Reviewed-on: https://gerrit.libreoffice.org/18926 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit db17079fcff6f9a068c499b17f2501cc4c82d10b) Change-Id: Iaa037982d828fef7195615e6eda546b7199a4fe8
2015-10-01coverity#1325250 Unchecked dynamic_castCaolán McNamara
Change-Id: Id52cad11d2ca4ef42a31c0905ee123ccd53e0677
2015-10-01coverity#1325255 Unchecked dynamic_castCaolán McNamara
Change-Id: Ie1a6b231e0313d1c00ffb9ab0137af2beeb05e02
2015-10-01loplugin:unusedmethodsNoel Grandin
- improvements to the plugin to find more method calls - improvements to python script to remove more false+ - fix the FORCE_COMPILE_ALL build flag to include code in the $WORKDIR Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836 Reviewed-on: https://gerrit.libreoffice.org/19064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30Fix typosAndrea Gelmini
Change-Id: Ie0e941d48457d758525353d6c5cf858652f86fd3 Reviewed-on: https://gerrit.libreoffice.org/18938 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-29Renamed wrongly prefixed boolean variablesStefan Heinemann
Fixed tdf#94269 Change-Id: I63109cc4e095bad680d7637a065080ea368860ae Reviewed-on: https://gerrit.libreoffice.org/18851 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-29loplugin:removeunusedmethods, remove unused stuffNoel Grandin
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29remove unused #include <sal/alloca.h>Michael Stahl
Change-Id: I490841fd2c526e4ca6d6c94cc7b9dba318c932a1
2015-09-29basic: more plausible build fix than e5a8eb9eMichael Stahl
Change-Id: I26fd8a76a17386de73fa12058509ccee7e768512
2015-09-29fix dbgutil buildCaolán McNamara
Change-Id: If2a9d330bd7fde8db5e998e97c278fb19c90f24a
2015-09-29tdf#94559: first step to remove rtti.hxxOliver Specht
replaced use of PTR_CAST, IS_TYPE, ISA in avmedia, basctl, basic, cui, dbaccess, vcl,xmloff Change-Id: If4496762e82e896b6fbc362e6626502703c245f5 Reviewed-on: https://gerrit.libreoffice.org/18905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-26pVar != null, so static_cast(pVar) != nullCaolán McNamara
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 McNamara
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 McNamara
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 Stahl
This one may be quite busted even since it compares sal_Int32(-1) with USHRT_MAX. Change-Id: I894b382ad499ee49f4616c7704afbb90f0556744
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>