summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2016-01-11fix windows buildNoel Grandin
Change-Id: Ie00d2dd3fbf6ff498c652249797f8d01acef8a97
2016-01-11loplugin:unusedmethods unused return value in basicNoel Grandin
Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07Some cleanup for sal_uIntPtr usageJohannes Hauf
Change-Id: Ia9779e6477d8848588f3543d09ea6b4477f594a2 Reviewed-on: https://gerrit.libreoffice.org/21022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-07BASIC : use std::vector instead of SbArray for Modules.Arnaud Versini
Change-Id: I9594efb13b3dccc637ccd61eea4b42255c2a775c Reviewed-on: https://gerrit.libreoffice.org/20817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-05Fix typosAndrea Gelmini
Change-Id: I3fba2c76c83381eb398c80947ef4849bccf7ab27 Reviewed-on: https://gerrit.libreoffice.org/21078 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-05Fix typosAndrea Gelmini
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727 Reviewed-on: https://gerrit.libreoffice.org/21103 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2016-01-04Use CPPUNIT_ASSERT_DOUBLES_EQUALStephan Bergmann
...except when checking for infinity Change-Id: If6e3b8965169cc615fa5d76422e1925866714936
2016-01-04loplugin:cstylecastStephan Bergmann
Change-Id: I5ecd63d79e8be77879d3789c45079929696abe03
2016-01-04tdf#96136 replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUALDipangar Niranjar
Change-Id: Ib45af8a56ac3adc428c530908cf1bbd95e9cc64c Reviewed-on: https://gerrit.libreoffice.org/21065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2015-12-30BASIC : Remove useless allocation operator overloadArnaud Versini
Change-Id: I134cdbfe388347264a810bbfbff8b4f9f373e663 Reviewed-on: https://gerrit.libreoffice.org/20873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-12-27Remove some includes (stdio/stdlib)Julien Nabet
Change-Id: I4aa649961efac521e72c363efb5d0a3192125da5 Reviewed-on: https://gerrit.libreoffice.org/20966 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-12-27sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32Matteo Casalin
also avoid some explicit temporaries and group some checks. Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b
2015-12-27sal_uLong/sal_uIntPtr for ScNumFormatAbbrevMatteo Casalin
Change-Id: I45f2a43fe4295e44691ab00c93af3fca41b1dcfa
2015-12-27sal_uIntPtr to sal_uInt32Matteo Casalin
Change-Id: I856ee7aa28d45dd69b030e3db05701b415009fde
2015-12-23loplugin:unusedfields in basicNoel Grandin
Change-Id: I304f3903f305ba5b538964071ab95b57ebf2f970
2015-12-22BASIC : Refactor FoldConstants for extracting it from SwExprNode.Arnaud Versini
Change-Id: Ia47597b26d63db216dd3ab71acbb18449ece7b1a Reviewed-on: https://gerrit.libreoffice.org/16963 Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org> Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-12-20cppcheck: false positive deallocuseJulien Nabet
Help cppcheck by returning early and remove a now useless bool var Change-Id: If4dcb6f64bcfd6c3cb22136163caf3679d6fd5a8
2015-12-16Resolves: #i126272# compile error : if statement followed by End If...Damjan Jovanovic
- in next Line ??? Allow the Else in a single-line If statement to be terminated by a comment instead of only EOL. Patch by: me (cherry picked from commit cbd43d0cb1165add5b9b559c3608a93ea631da13) Change-Id: I3dcf014c9fe501bc9770ae3cfd69e7730c0b86cb
2015-12-15Resolves: #i19221# Print Tab(5); "Hello" does not workDamjan Jovanovic
Implement the Tab() function in AOO Basic. Patch by: me (cherry picked from commit fa1315d25186643ea537972609c117e0c9bb1fbc) Change-Id: Ifa9843661ce3862347c6351a078ddb207169182a
2015-12-13BASIC: use c++ foreach loops when possible.Arnaud Versini
Change-Id: Ia1c734e26da88010eef40a4375c423b0765f43ae Reviewed-on: https://gerrit.libreoffice.org/20423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-12-10DBG_TRACE_BASIC/PROFILING had been rotting for quite some time nowStephan Bergmann
...e.g., it still used the long-gone tools String class Change-Id: I9d1930c72fbae3208a0f3da14c6991f30d89a9bc
2015-11-30Get order of expected/actual args to CPPUNIT_ASSERT_EQUAL rightStephan Bergmann
Change-Id: I0fa26417630991c6d07b5412fb579f9c222d09a6
2015-11-29generate better unit test assert messageMarkus Mohrhard
Change-Id: Ibba7f18fefb4f2851472a6ae0b41447237a6b97f Reviewed-on: https://gerrit.libreoffice.org/20270 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-11-28Adapt to true wchar_t in clang-clStephan Bergmann
Change-Id: I215b8215108a268f969106db6f01f876bd0dc0a0
2015-11-25#i117960# Basic: Line Input doesn't work in single-line IfDamjan Jovanovic
i92642 added the ability to use certain keywords as variable names (eg. name = 1, line = "hi"), but also caused a regression where "Line Input" is broken in single-line If statements. This patch fixes that by allowing Then and Else to also be the start-of-line tokens expected to immediately preceed the "Line" token in order for that "Line" token to be recognized a keyword instead of a variable name. Also added FVT spreadsheet tests for "Line" as both a variable name and as "Line Input". Patch by: me (cherry picked from commit f8a51d0f5a645704bc2bdc939474ac931d55559c)
2015-11-25loplugin:unusedfields variousNoel Grandin
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-19use comphelper::containerToSequenceNoel Grandin
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin
and improve the script a little Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84 Reviewed-on: https://gerrit.libreoffice.org/20033 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17loplugin:unnecessaryvirtualNoel Grandin
update the plugin with lessons learned from the mergeclasses plugin and re-run it Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711 Reviewed-on: https://gerrit.libreoffice.org/20015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-115th step to remove tools/rtti.hxxOliver Specht
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11new loplugin: memoryvarNoel Grandin
detect when we can convert a new/delete sequence on a local variable to use std::unique_ptr Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc Reviewed-on: https://gerrit.libreoffice.org/19884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10Resolves: #i61854# Basic: Default title of Msgboxes should be changedDamjan Jovanovic
Found by: berend dot cornelius at germany dot sun dot com Patch by: Pathangi Janardhanan Jatinshravan <JATINSHR001 at e dot ntu dot edu dot sg> Review by: Damjan Jovanovic (cherry picked from commit 519770a2b47d4bb95a7616cedcc1582ae83ab205) Change-Id: I61c9eacd285c8335925f1569b64bb2d600caf545
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