14c763e793
s/ERRCODE_SBX_OK/ERRCODE_NONE
...
adds no value
Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7
Reviewed-on: https://gerrit.libreoffice.org/39056
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-21 20:58:36 +02:00
528632660b
convert ErrCode to strong typedef
...
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.
Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-21 08:42:30 +02:00
6ee9f2c188
loplugin:oncevar accessibility..basic
...
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6
Reviewed-on: https://gerrit.libreoffice.org/38969
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-20 07:50:06 +02:00
a5dba7dbec
remove unused osl/mutex.hxx includes
...
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
2017-06-18 13:38:25 +02:00
d69795b9c9
use local statics in getTypes functions
...
... instead of double checked locking patterns.
Change-Id: I1b86ce723ff22dd357b3ed69a52757b085472424
Reviewed-on: https://gerrit.libreoffice.org/38906
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-17 13:28:18 +02:00
7aee0ea7c5
replace SbxError typedef with ErrCode
...
part of a larger patch to convert ErrCode to strong_int
Change-Id: Ia56e5d6d8c4217d6f258e2113d20ce737977892f
Reviewed-on: https://gerrit.libreoffice.org/38813
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-15 09:48:11 +02:00
3059ede409
drop SbError typedef
...
in favour of ErrCode.
Part of a larger patch to convert ErrCode to strong_int
Change-Id: Ia846bfc93c58c85c6a6cec79e9d19b9ecbd1c05f
Reviewed-on: https://gerrit.libreoffice.org/38783
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-15 08:25:22 +02:00
a6aa57ff59
use ERRCODE_NONE instead of 0
...
peeling off a small chunk of my ErrCode strong_int conversion
Change-Id: Idc89e8496083beed7608cba705cd981139eb7111
Reviewed-on: https://gerrit.libreoffice.org/38777
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-14 15:42:31 +02:00
e272761e8f
remove MAYBEFUTURE dead code
...
Seems to date from:
commit c631cf94e468d6f5ced5cacda3600c683c44dca2
Author: John LeMoyne Castle <jlc@mail2lee.com >
Date: Tue Dec 21 15:47:53 2010 +0000
68bit currency enhancement
Change-Id: I81863991ec3717ea213dffb535283e6fc8abceb7
Reviewed-on: https://gerrit.libreoffice.org/38693
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-13 09:12:58 +02:00
febbad7263
cleanup unused css/frame/* includes
...
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65
Reviewed-on: https://gerrit.libreoffice.org/38633
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-12 13:05:38 +02:00
1dd5e226bd
clang-tidy readability-non-const-parameter
...
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470
Reviewed-on: https://gerrit.libreoffice.org/38593
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-09 15:05:54 +02:00
b5594f06c4
Cater for UNO (signed) vs. BASIC (unsigned) byte mismatch
...
See <https://listarchives.libreoffice.org/global/users/msg51243.html >
"[libreoffice-users] type byte in Basic", where
> Sub Main
> dim oOutputStream as variant
> oOutputStream = createUnoService("com.sun.star.io.SequenceOutputStream")
> dim nA as byte
> nA = 195
> oOutputStream.writeBytes(array(nA))
> oOutputStream.flush
> dim back(0) as byte
> back = oOutputStream.getWrittenBytes
> MsgBox(back(0))
> End Sub
failed with "Inadmissible value or data type. Overflow." instead of showing
"-61".
Change-Id: I0445476c67510d5f8669a6e711e92332c01ec06c
2017-06-08 14:48:25 +02:00
ef117cad3a
tdf#108039: check for nullptr in rtl_uString and OUString
...
rtl_[u]String_newConcat now checks allocation result to return
early and avoid SIGSEGV. Other functions are not modified, to
keep old behavior relying on allocation success and crashing
early on OOM to avoid added overhead in performance-critical
places.
OUString operator+= now checks rtl_uString_newConcat result and
throws std::bad_alloc on failure, to specifically address BASIC
problem. It keeps strong exception guarantee of leaving this'
state unaltered.
Concatenation in BASIC now checks for bad string allocation
(previously SIGSEGV was generated).
Unit test included.
Change-Id: I1513311d3d58eac43b2d2ec9a230e22dff0b4245
Reviewed-on: https://gerrit.libreoffice.org/37965
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Jenkins <ci@libreoffice.org >
2017-06-07 11:48:57 +02:00
de8caac6be
replace SVSTREAM_OK with ERRCODE_NONE
...
since the first is #define'd to the second, and offers no extra value
Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450
Reviewed-on: https://gerrit.libreoffice.org/38406
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-06 08:15:57 +02:00
3fdfbe68ba
Improved loplugin:cstylecast to reference types: basic
...
Change-Id: Ib2159aef39d416905899fe91280d2234835e23e9
2017-06-05 21:18:14 +02:00
17a2c9e8e2
clang-tidy performance-unnecessary-value-param
...
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192
Reviewed-on: https://gerrit.libreoffice.org/38400
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-05 09:22:51 +02:00
2ccde70d60
teach redundantcast plugin about functional casts
...
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-30 08:50:31 +02:00
dc36d07d9e
basic: Drop unused variables in test scripts
...
Change-Id: I9893e8bed254dcac91fbc7abb5ab4817a28ba339
Reviewed-on: https://gerrit.libreoffice.org/38133
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-30 01:19:45 +02:00
ef513fd4b0
remove unnecessary use of OString::getStr
...
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-28 19:44:08 +02:00
f15afbcbb2
add VBA tests- PMT, PPMT, PV,QBCOLOR functions
...
Change-Id: Idcbecbdee6a6c054886d6a11ce22e525ecf23736
Reviewed-on: https://gerrit.libreoffice.org/38084
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-05-27 21:01:06 +02:00
f45463d8e2
tdf#93727 Support date literals in basic
...
* detect #...# in SbiScanner
* add vb test
* made date locale-independent
Change-Id: Ic269df2df8d3a7c5af7858c3655bb40a0b6033f0
Reviewed-on: https://gerrit.libreoffice.org/36002
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Eike Rathke <erack@redhat.com >
2017-05-24 18:55:45 +02:00
7948e84091
basic: Stop detecting the number of tokens at runtime
...
which removes static variables and improves SbiTokenizer's
thread-safety.
Change-Id: Ic3eb52adfa85691af65f214c1b90c43c03f9a3dd
Reviewed-on: https://gerrit.libreoffice.org/37867
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-24 04:15:32 +02:00
f060adefba
Test _WIN32 instead of WIN32
...
since the former is predefined by Visual C++ [0], but the latter
is not.
[0] https://msdn.microsoft.com/en-us/library/b0084kay.aspx
Change-Id: I9ecb84779cbaf5f0186ef0b05da61b32293f8f2b
Reviewed-on: https://gerrit.libreoffice.org/37808
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-22 22:00:47 +02:00
514fd7073c
basic: Kill unnecessary ifdef stuff
...
Change-Id: Id890eb2b7ff2f87005e114dd0fcea0fe3eb81eea
Reviewed-on: https://gerrit.libreoffice.org/37866
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-22 05:01:57 +02:00
cae3e20571
cleanup unused css/resource/ includes
...
Change-Id: I1e2c795cef64799d5e28e5fafec6cd72f621abba
Reviewed-on: https://gerrit.libreoffice.org/37853
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-20 18:00:42 +02:00
a0b93fe081
cleanup unused css/script/ includes
...
but keep exception includes in headers for now
Change-Id: I826828675a2d14b906e57068cbced2e790e12bce
Reviewed-on: https://gerrit.libreoffice.org/37846
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-20 10:23:38 +02:00
f0fddb1d2d
loplugin:stringcopy: basic
...
Change-Id: I39d8ae76be2794d5e7b5a9979d7211823c995c2c
2017-05-19 17:19:14 +02:00
2155e04d63
make string translation loading more uniform
...
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2017-05-19 15:40:40 +02:00
2e51afc77c
loplugin:comparisonwithconstant in basic
...
Change-Id: Ie34a17d2fb465ffbe675ba4e99917d23959f1fb5
Reviewed-on: https://gerrit.libreoffice.org/37809
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-19 12:53:34 +02:00
2acc4dc6a9
basic: Fix broken unit test for IsMissing()
...
Change-Id: Ia6fb2622c85686a50701d4c37356e608a3df653b
Reviewed-on: https://gerrit.libreoffice.org/37775
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-19 10:32:36 +02:00
9fb691adb4
basic: Fix broken unit test for Join()
...
Change-Id: Ib9768097d73fe664e24da4c3989141e87342a34e
Reviewed-on: https://gerrit.libreoffice.org/37711
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-18 12:13:34 +02:00
6c2a10e1d0
basic: Fix broken test for VBA's LCase
...
Change-Id: Icdbe62d4faa04b59a5cc11ea8f72f5e88f664a6d
Reviewed-on: https://gerrit.libreoffice.org/37682
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2017-05-17 10:30:19 +02:00
6df22f0ec5
loplugin:checkunusedparams various
...
Change-Id: I5d1cc807134230d86e0226a12fada204004312d3
Reviewed-on: https://gerrit.libreoffice.org/37675
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-16 14:20:27 +02:00
666901bc82
basic: Test VBA's CDec() only on Windows
...
since it is not implemented on others.
Change-Id: If058207eb441caa65f93bbb554fe77cf469b1682
Reviewed-on: https://gerrit.libreoffice.org/37631
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-16 05:19:17 +02:00
2c3f58eff2
Translate German comments and debug strings (leftovers in dirs a... to c...)
...
Translates all (leftovers) found using a custom regex, in directories not
shown by /bin/find-german-comments and beginning with "a" to "c".
Change-Id: I3b0152ee78ad80a29d714cbd98bf888f31be4763
Reviewed-on: https://gerrit.libreoffice.org/37573
Reviewed-by: Eike Rathke <erack@redhat.com >
Tested-by: Eike Rathke <erack@redhat.com >
2017-05-15 15:27:52 +02:00
4582acb3ee
remove some unnecessary locking
...
Change-Id: I7da9e82930d3fe8f927c495aeca270b8bb5cf65c
Reviewed-on: https://gerrit.libreoffice.org/37602
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-15 08:40:46 +02:00
b9d75dea30
basic: Fix broken logic in VBA's unit tests
...
It should not be "OK" when no assertion passes.
Change-Id: Ib6bab2d597a138468e96b4acf8c3be7abd112cca
Reviewed-on: https://gerrit.libreoffice.org/37540
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-15 04:59:04 +02:00
f99c95c80d
basic: Fix VBA constant vbNewLine with unit test
...
... making its value CRLF on Windows and LF on others.
A winding road of regressions passed through it;
first b680e352546dc614f3b30bbe212e6b415a6a6bf4,
then 7beeced463648fc67defea2ad48d58dd42f0ca1e.
Change-Id: I9e4da4a17436949b4fea35481b8355b4321cb268
Reviewed-on: https://gerrit.libreoffice.org/37500
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-15 04:57:59 +02:00
dd6d7992d6
loplugin:constantparam
...
Change-Id: I67d74072c776c32a1f91df94c621efe180baf5dc
Reviewed-on: https://gerrit.libreoffice.org/37481
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-12 12:30:53 +02:00
389da66dfc
remove unused uno::Reference vars
...
found by temporarily marking Reference as SAL_WARN_UNUSED.
Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-12 09:56:01 +02:00
9425245a87
basic: Remove strange ifdef-guard for SHARED
...
Was there any platform predefining it?
Change-Id: I4c155c00272b426c0d2b1b1ec0184cc223f9e38c
Reviewed-on: https://gerrit.libreoffice.org/37461
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-12 03:57:08 +02:00
e93cf20603
basic: Compare strings in a case-insensitive manner
...
without creating temporary strings.
Change-Id: I8d0e8286089cb78fa9d8612bff6c51f6901637f1
Reviewed-on: https://gerrit.libreoffice.org/37249
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-10 05:54:25 +02:00
e5a4858e1a
basic: Compare with keywords without creating temporary strings
...
Change-Id: Ie284bbe4759a31c48cde415a4e673efd4c789741
Reviewed-on: https://gerrit.libreoffice.org/37252
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-10 05:49:19 +02:00
959496794c
cleanup osl/diagnose.h includes
...
with command
> git grep -l osl/diagnose.h *.cxx |
xargs grep -L -w 'OSL_\w*' |
xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'
headers need more work
Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-09 15:41:46 +02:00
12191a4f30
make loplugin constantparam smarter about string params
...
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294
Reviewed-on: https://gerrit.libreoffice.org/37426
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 13:52:30 +02:00
719a2adfbd
remove unnecessary empty OUString fields and vars
...
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
Reviewed-on: https://gerrit.libreoffice.org/37394
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 08:28:56 +02:00
4763091bbe
loplugin:constantparam
...
Change-Id: Ia9500b25602c14aadf49fe373682ae9d87a0a1a2
Reviewed-on: https://gerrit.libreoffice.org/37390
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 08:28:04 +02:00
97eb00c75e
revert OSL_ASSERT changes
...
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
6b3b0b85f9
tdf#43157: convert basic module away from OSL_ASSERT to assert
...
Change-Id: Idfd05d410ad3d76c3699492d98e1284a21f5f7d6
2017-05-07 09:29:23 +10:00
a940826162
Fix typos
...
To complete commit 0ef94e2b559547bc4e906e7f24e57ff5d642e108
and f12096272e684ddcd8ffa4e34dcb0a680cc594c2
Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03
Reviewed-on: https://gerrit.libreoffice.org/37199
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2017-05-05 23:35:06 +02:00