Noel Grandin
4fa4b9addf
loplugin:fpcomparison in basic/
...
Change-Id: I76ffac6a0f0b1525c85d1995277d3ca22ef268e1
Reviewed-on: https://gerrit.libreoffice.org/21869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-04 06:41:19 +00:00
Noel Grandin
1ef9f3988e
unnecessary use of OUString constructor
...
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1
Reviewed-on: https://gerrit.libreoffice.org/21945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31 12:04:02 +00:00
Arnaud Versini
4cac0c05c6
BASIC: SbiExpression::IsIntConstant has side effects.
...
Also renames IsIntConstant to ConvertToIntConstIfPossible.
Change-Id: Ib4b465ac0d890762547fb2d83c26ad6be6ee75e8
Reviewed-on: https://gerrit.libreoffice.org/21746
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-27 15:36:52 +00:00
Noel Grandin
752cd07d08
InterfaceContainer2 with vector instead of Sequence
...
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.
Switch all our internal use-sites to the new class.
Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
Arnaud Versini
7d0e520e22
BASIC : Remove class SbiDimList and SbiParameters
...
Change-Id: I039bdc786a65ad534390e7138f584cdb470428af
Reviewed-on: https://gerrit.libreoffice.org/21734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-01-24 17:43:15 +00:00
Arnaud Versini
49b5eed56c
BASIC : Remove SbiExprList::pParser
...
Change-Id: Ib9386d97ddb12f148cf76dc71aa8c41003286f50
Reviewed-on: https://gerrit.libreoffice.org/21534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-24 06:48:45 +00:00
Arnaud Versini
3a97b3619a
BASIC : Remove useless virtual function override
...
Change-Id: I0f8e480bf73256e7f1284e11983cc70c0426172c
Reviewed-on: https://gerrit.libreoffice.org/21513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-16 17:08:46 +00:00
Arnaud Versini
1ae5ceccb8
BASIC : Remove useless methods in StarBasic
...
Change-Id: I9e8ce92b967ee9c9485b7af15280f6a212ff599d
Reviewed-on: https://gerrit.libreoffice.org/21498
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-16 17:06:26 +00:00
Michael Stahl
9694a0edfe
basic: coverity#1348466 checked return
...
Kind of unnecessary but let's hope it shuts up coverity.
Change-Id: I4903c9df788ce5fb9648c5fd68627ff21362828f
2016-01-15 13:03:09 +01:00
Stephan Bergmann
a20f9388f1
-Werror=misleading-indentation (GCC 6)
...
Change-Id: Ia633b859df94ede325469ec8a20e7383d2a178d4
2016-01-13 17:20:28 +01:00
Noel Grandin
c93486bbb8
loplugin:loopvartoosmall
...
Change-Id: Ifa813b91b153004aa0fba42cdc209f4c4fd9578f
2016-01-12 08:59:48 +02:00
Noel Grandin
bbfeab3b13
loplugin:unusedmethods unused return value in include/basic
...
Change-Id: Ib1a006adaa92e257d40a20ff0d8beeb37e7c2fe0
Reviewed-on: https://gerrit.libreoffice.org/21360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12 06:40:03 +00:00
Arnaud Versini
a5c2328313
BASIC: Store directly SbxVarEntry in SbxArray
...
Change-Id: I64ae6c2a45e0ed880f5b76ca2ad420d684fdfeb4
Reviewed-on: https://gerrit.libreoffice.org/21308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-01-12 06:06:49 +00:00
Noel Grandin
9a64d7f8dd
fix windows build
...
Change-Id: Ie00d2dd3fbf6ff498c652249797f8d01acef8a97
2016-01-11 11:59:18 +02:00
Noel Grandin
bc80f951c1
loplugin:unusedmethods unused return value in basic
...
Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
2016-01-11 10:49:24 +02:00
Andrea Gelmini
64d624b651
Fix typos
...
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-10 14:17:20 +00:00
Johannes Hauf
bccd83ea54
Some cleanup for sal_uIntPtr usage
...
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-07 14:13:49 +00:00
Arnaud Versini
5e0d36adc3
BASIC : use std::vector instead of SbArray for Modules.
...
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-07 12:18:40 +00:00
Andrea Gelmini
fbec6ac089
Fix typos
...
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-05 13:40:54 +00:00
Andrea Gelmini
92e60e1b80
Fix typos
...
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-05 07:32:28 +00:00
Arnaud Versini
f146ddadf5
BASIC : Remove useless allocation operator overload
...
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-30 18:27:27 +00:00
Julien Nabet
ec3e174569
Remove some includes (stdio/stdlib)
...
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-27 17:24:11 +00:00
Matteo Casalin
cb98c423bb
sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32
...
also avoid some explicit temporaries and group some checks.
Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b
2015-12-27 16:51:27 +01:00
Matteo Casalin
7d8919d2d5
sal_uLong/sal_uIntPtr for ScNumFormatAbbrev
...
Change-Id: I45f2a43fe4295e44691ab00c93af3fca41b1dcfa
2015-12-27 16:51:26 +01:00
Matteo Casalin
42798dc46a
sal_uIntPtr to sal_uInt32
...
Change-Id: I856ee7aa28d45dd69b030e3db05701b415009fde
2015-12-27 16:51:25 +01:00
Noel Grandin
70d14d2ccd
loplugin:unusedfields in basic
...
Change-Id: I304f3903f305ba5b538964071ab95b57ebf2f970
2015-12-23 09:46:48 +02:00
Arnaud Versini
4251e676bb
BASIC : Refactor FoldConstants for extracting it from SwExprNode.
...
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-22 11:13:03 +00:00
Julien Nabet
36984c75cc
cppcheck: false positive deallocuse
...
Help cppcheck by returning early and remove a now useless bool var
Change-Id: If4dcb6f64bcfd6c3cb22136163caf3679d6fd5a8
2015-12-20 22:17:36 +01:00
Damjan Jovanovic
a22702ab0d
Resolves: #i126272# compile error : if statement followed by End If...
...
- 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-16 09:18:23 +00:00
Damjan Jovanovic
98f0e0eda5
Resolves: #i19221# Print Tab(5); "Hello" does not work
...
Implement the Tab() function in AOO Basic.
Patch by: me
(cherry picked from commit fa1315d25186643ea537972609c117e0c9bb1fbc)
Change-Id: Ifa9843661ce3862347c6351a078ddb207169182a
2015-12-15 13:48:28 +00:00
Arnaud Versini
4df183e2c9
BASIC: use c++ foreach loops when possible.
...
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-13 15:57:42 +00:00
Stephan Bergmann
c4c059beb3
DBG_TRACE_BASIC/PROFILING had been rotting for quite some time now
...
...e.g., it still used the long-gone tools String class
Change-Id: I9d1930c72fbae3208a0f3da14c6991f30d89a9bc
2015-12-10 08:18:15 +01:00
Stephan Bergmann
caa080ea80
Adapt to true wchar_t in clang-cl
...
Change-Id: I215b8215108a268f969106db6f01f876bd0dc0a0
2015-11-28 08:44:39 +01:00
Damjan Jovanovic
d5443023ef
#i117960# Basic: Line Input doesn't work in single-line If
...
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-25 20:46:26 +00:00
Noel Grandin
2554efabb6
use comphelper::containerToSequence
...
in chart2, we remove a local equivalent of the method
Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
Noel Grandin
d9e6270392
loplugin:unnecessaryvirtual
...
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-17 12:26:32 +00:00
Oliver Specht
fa91dd31f3
5th step to remove tools/rtti.hxx
...
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-11 10:49:30 +00:00
Noel Grandin
db17d3c17c
new loplugin: memoryvar
...
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-11 07:16:20 +00:00
Damjan Jovanovic
f7715e6821
Resolves: #i61854# Basic: Default title of Msgboxes should be changed
...
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-10 09:45:21 +00:00
Stephan Bergmann
08e49fa337
loplugin:nullptr (automatic rewrite)
...
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
2015-11-10 10:31:17 +01:00
Noel Grandin
6c80a8fe89
new loplugin: oncevar
...
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-09 08:34:40 +00:00
Stephan Bergmann
a80bab7058
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
...
Change-Id: I9979100550a86ac3f42d74a5403fb3ffd9d5006b
2015-11-06 09:34:39 +01:00
Damjan Jovanovic
42a63dd0e8
Resolves: #i61277# Basic open file with random access erases all data.
...
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-04 14:04:36 +00:00
Noel Grandin
59b072e22b
yyyyy
...
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Benjamin Ni
be729e7721
tdf#94269: Replace "n" prefix for bool variables with "b"
...
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
Noel Grandin
3bc5df7f32
UNO: no need to use OUString constructor when calling createInstance
...
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-30 08:59:59 +00:00
Noel Grandin
065c8b48a6
use uno::Reference::set method instead of assignment
...
Change-Id: I58410209f32f988f258a588364e0b037c2790211
2015-10-30 08:10:22 +02:00
Michael Stahl
51eb04a158
basic: replace boost::ptr_vector with std::vector<std::unique_ptr>
...
Change-Id: I98c4ac860fbdb55a61f9be0e9d2d5f29fb849e05
2015-10-26 16:09:20 +01:00
Michael Stahl
71f6aab077
basic: replace boot::ptr_vector with std::vector
...
Change-Id: I4967ad8345cd74c39edbea1df513978b62996b90
2015-10-26 16:09:20 +01:00
Michael Stahl
79a7cf5424
basic: replace boost::ptr_vector with std::vector<std::unique_ptr>
...
Change-Id: I0bd3a5182d62432a8f0caf4bbae11bbce56a363c
2015-10-26 16:09:19 +01:00