Jens Carl
9f71d0f3f9
tdf#68339 Other: BASIC Syntax error
...
Allow expressions (operands) of comparison operators prefixed with the
Logical Operator "Not".
Change-Id: I1b070e2288dac26b1f1186d38cf5d2f4ad99a406
Reviewed-on: https://gerrit.libreoffice.org/71332
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Reviewed-by: Jens Carl <j.carl43@gmx.de >
2019-05-03 08:24:18 +02:00
Stephan Bergmann
e1e39fac22
Some more WIN32 -> _WIN32
...
...at least some of which have presumably been missing from
ce43d0ae92 "use consistent #define checks for the
Windows platform" by accident (and some just clean up comments)
Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b
Reviewed-on: https://gerrit.libreoffice.org/68580
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2019-03-01 17:40:47 +01:00
Tamás Zolnai
afbfe42e63
clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2
...
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d
Reviewed-on: https://gerrit.libreoffice.org/63241
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com >
2018-11-10 23:11:28 +01:00
Noel Grandin
c2139cafe6
loplugin:simplifyconstruct in accessibility..bridges
...
Change-Id: I08f6a64b50f03d1b08027a2ac9e51442255d64bc
Reviewed-on: https://gerrit.libreoffice.org/59976
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-09-05 09:28:12 +02:00
Mike Kaganski
59d53910de
Small cleanup and simplification
...
Change-Id: I1e8a750832f365f080f6f60c81560dc942003049
Reviewed-on: https://gerrit.libreoffice.org/56788
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2018-07-02 06:34:43 +02:00
Julien Nabet
3ceb01afc3
Use for range loops in basegfx and basic
...
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56
Reviewed-on: https://gerrit.libreoffice.org/50280
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2018-02-24 17:28:43 +01:00
Noel Grandin
be94207ecb
new loplugin:emptyif
...
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-01-19 13:25:54 +01:00
Stephan Bergmann
6070aaa47d
More loplugin:cstylecast: basic
...
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/ > "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I20b38196ee1b6a34384dc46d9de1b6e1b44947ae
2018-01-12 20:29:14 +01:00
Zdeněk Crhonek
c5417a21f5
VBA tests (4) - don't pass when all tests fail
...
Change-Id: Ib4f9b5df1cffe104ba27be95183d075f24f28bb3
Reviewed-on: https://gerrit.libreoffice.org/45774
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-12-23 12:48:39 +01:00
Zdeněk Crhonek
baaf6c12c8
VB tests (3)-don't pass whe all tests fail
...
Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435
Reviewed-on: https://gerrit.libreoffice.org/45739
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-12-22 00:04:01 +01:00
Tor Lillqvist
66b3970c94
Seems that testMiscOLEStuff() works only as 64-bit on a current Windows 10
...
Change-Id: Ib43f8c185d2a2e9e93f34d918d6f9461586cf6a6
2017-10-17 18:57:54 +03:00
Mike Kaganski
daf7c3e732
basic: consistently use "" and <> in include directives
...
Change-Id: I147c0e9b9b1e09af593f54799e45e1348cd40716
Reviewed-on: https://gerrit.libreoffice.org/43298
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-10 07:43:46 +02:00
Mike Kaganski
1944e3ddc0
Rename and move SAL_U/W to o3tl::toU/W
...
Previosly (since commit 9ac98e6e34 )
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.
Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-05 16:02:52 +02:00
Mike Kaganski
c3609f107b
Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
...
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that
Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-09-30 19:08:28 +02:00
Mike Kaganski
aaa26a58ba
Some more WIN32_LEAN_AND_MEAN
...
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874
Reviewed-on: https://gerrit.libreoffice.org/42419
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-09-18 19:24:31 +02:00
Zdeněk Crhonek
74da6d5f9f
VBA tests-add VAL,VARTYPE,WEEKDAY,WEEKDAYNAME,YEAR tests
...
Change-Id: I3f1803617a2bdeaab9922ebb375ec4fd67318d20
Reviewed-on: https://gerrit.libreoffice.org/41499
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-24 12:55:26 +02:00
Zdeněk Crhonek
57ece564ac
VBA functions tests-SYD, TIMESERIAL, TIMEVALUE, TRIM, TYPENAME, UBOUND,UCASE
...
Change-Id: I7ea7757291d996375584ef05d822701737020b1c
Reviewed-on: https://gerrit.libreoffice.org/40894
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-08 19:36:00 +02:00
Zdeněk Crhonek
f060d64507
VBA tests- add functions STRING,STRREVERSE,SWITCH
...
Change-Id: Ibba3b5cabee31af44f0e8dda5a11f152ab0cfe01
Reviewed-on: https://gerrit.libreoffice.org/40730
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-03 21:29:30 +02:00
Zdeněk Crhonek
3acfc281ad
VBA tests - STR and STRCOMP functions
...
Change-Id: I09daaa8be3687bf838f569849542d47c85907d1e
Reviewed-on: https://gerrit.libreoffice.org/40687
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-02 21:51:55 +02:00
Zdeněk Crhonek
fae4b84882
VBA tests-functions RIGHT,RTRIM,SECOND,SGN,SIN,SLN,SPACE,SQR
...
Change-Id: I0db9233f20fccbc4b2c4f4b3e36cf0aaa8583c99
Reviewed-on: https://gerrit.libreoffice.org/40339
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-07-24 18:05:44 +02:00
Caolán McNamara
00657aef09
migrate to boost::gettext
...
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
results in inserting the english original so something can be found, now the
standard fallback of using the english original from the source key is used, so
partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
com::sun::star::resource::OfficeResourceLoader
com::sun::star::resource::XResourceBundleLoader
com::sun::star::resource::XResourceBundle
when translating strings via uno apis
com.sun.star.resource.StringResourceWithLocation
can continue to be used
Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Takeshi Abe
b9bda1d791
tdf#103104 Allow line-continuation followed by a dot in BASIC
...
as in VBA-compatibility mode.
Change-Id: If263183fc1fa5742235213a8617fdf412d2a245e
Reviewed-on: https://gerrit.libreoffice.org/39893
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-07-14 02:52:54 +02:00
Zdeněk Crhonek
ad17c13cf1
VBA test - add RATE, RGB functions
...
Change-Id: I284597a54067049479c56d6e6eea6322f0e3ee2b
Reviewed-on: https://gerrit.libreoffice.org/39377
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-06-29 15:51:42 +02:00
Zdeněk Crhonek
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
Takeshi Abe
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
Noel Grandin
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
Takeshi Abe
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
Takeshi Abe
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 b680e35254 ,
then 7beeced463 .
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
Zdeněk Crhonek
3cb581adde
VBA tests- MONTHNAME,NPER, NPV,OCT test case
...
Change-Id: Ia6c732d4c205ba2461007feacce1403b83e6043b
Reviewed-on: https://gerrit.libreoffice.org/37109
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-05-03 20:14:27 +02:00
Stephan Bergmann
38f70cd770
loplugin:cppunitassertequals: basic
...
Change-Id: Icaa3e0eace6ccff365d4ebdb007771fc8a78671a
2017-04-28 14:21:30 +02:00
Zdeněk Crhonek
377d2d4bed
add VBA test cases
...
functions - LEFT, LEN, LOG, LTRIM,
MID, MINUTE, MIRR, MONTH
Change-Id: Ifa4c6c1b715772644afc4280379b2a9e8429842f
Reviewed-on: https://gerrit.libreoffice.org/36551
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-16 18:01:59 +02:00
Zdeněk Crhonek
31dc11e7e3
add VBA test cases
...
tests: ISARRAY, ISDATE, ISEMPTY, ISERROR, ISMISSING,
ISNULL, ISNUMERIC, ISOBJECT, JOIN, LBOUND, LCASE
Change-Id: I0b0dacd0d62bf00680f33866ce7ec0152eec27e0
Reviewed-on: https://gerrit.libreoffice.org/36509
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-13 14:22:23 +02:00
Zdeněk Crhonek
ed4473abc1
VBA tests - INSTRREV, INT test case
...
Change-Id: I220b8dd57927486b697b46777e20db7d2f53e487
Reviewed-on: https://gerrit.libreoffice.org/36486
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-13 09:54:18 +02:00
Stephan Bergmann
c14ed11d77
Clean up uses of SAL_U/SAL_W: basic
...
Change-Id: I755b3b781c42cc9af61c0b90621d2eb7f544df62
2017-04-10 10:13:41 +02:00
Zdeněk Crhonek
d89a421352
VBA tests - HEX, HOUR, IIF, INSTR test cases
...
Change-Id: Ib9e05dcfbd72f56cb3b5fb4e4760f868c008c7ac
Reviewed-on: https://gerrit.libreoffice.org/36315
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-09 15:42:50 +02:00
Zdeněk Crhonek
6c34c5ff46
VBA tests - FORMATNUMBER function
...
Change-Id: Ibfb00e5be9a32e3767ec4e73cdbf81f53f07b42e
Reviewed-on: https://gerrit.libreoffice.org/36229
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-09 07:27:05 +02:00
Stephan Bergmann
9ac98e6e34
Finally switch MSVC to sal_Unicode = char16_t, too
...
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.
Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-04-04 16:12:11 +00:00
Zdeněk Crhonek
d9dc5dcd39
add VBA tests- FIX,EXP,ERROR,DAY functions
...
Change-Id: I339abf03f88a0b8135184a892f5200ad381310bd
Reviewed-on: https://gerrit.libreoffice.org/36010
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-02 11:02:27 +00:00
Zdeněk Crhonek
a2c746ecd8
VBA tests - add DATEDIFF and DATEPART test case
...
Change-Id: I3d0026e707369e435013be1d11e1366a77ff2d0b
Reviewed-on: https://gerrit.libreoffice.org/35881
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-29 21:01:48 +00:00
Zdeněk Crhonek
1e02750ef2
VBA tests - add CVDATE,CVERR,DATEADD test case
...
Change-Id: Ib6b79eb3a3daf22dd4f15427a3e8547300f8b8f9
Reviewed-on: https://gerrit.libreoffice.org/35403
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-18 16:26:09 +00:00
Zdeněk Crhonek
7ea2962e76
VBA tests - add CSNG, CSTR test case
...
Change-Id: I5e9bc24bb89cc634a3c01e8c8b23a19927e7010c
Reviewed-on: https://gerrit.libreoffice.org/35341
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-17 17:39:13 +00:00
Zdeněk Crhonek
c0ed8e9537
add VBA test CINT,CLNG functions tests
...
Change-Id: I69f0144006e4ed226e8b158c0cc9f60dda0a9184
Reviewed-on: https://gerrit.libreoffice.org/35060
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-11 06:16:58 +00:00
Zdeněk Crhonek
1577f01b29
add VBA COS function test case
...
Change-Id: I9014e068576d68613da6a70526dcb5b8e278e3f1
Reviewed-on: https://gerrit.libreoffice.org/35027
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-10 20:18:41 +00:00
Zdeněk Crhonek
8528712b6e
VBA test CHOOSE function
...
Change-Id: Ieb76595199ea1f6c23924d4860228fe5f4d30df1
Reviewed-on: https://gerrit.libreoffice.org/34909
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-06 05:43:29 +00:00
Zdeněk Crhonek
ed0e8f970f
VBA test CDATE, CDBL function
...
Change-Id: Id45930e6d329a0b1142bfde612c1a089390e4817
Reviewed-on: https://gerrit.libreoffice.org/34868
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-04 09:20:02 +00:00
Zdeněk Crhonek
38f13e4dca
add VBA functions tests - ABS,ARRAY, ASC, ATN, CBOOL
...
Change-Id: I8a0b8b833ba32b9d27773748b3bbd8bbc07d1959
Reviewed-on: https://gerrit.libreoffice.org/34696
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-03-01 05:16:52 +00:00
Justin Luth
56d44e10df
VBA: unit test for PtrSafe and compiler directives
...
#If Vba7
Declare PtrSafe Function xx
#Else
Declare Function xx
#End if
Change-Id: I807efb9fa68b5ac50f2bd59ba7cfa45c499af189
Reviewed-on: https://gerrit.libreoffice.org/34522
Reviewed-by: Justin Luth <justin_luth@sil.org >
Tested-by: Justin Luth <justin_luth@sil.org >
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com >
2017-02-28 02:49:25 +00:00
Zdeněk Crhonek
b5c83cf676
add VBA CHR() test case
...
Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01
Reviewed-on: https://gerrit.libreoffice.org/34133
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Eike Rathke <erack@redhat.com >
2017-02-27 20:37:36 +00:00
Noel Grandin
83721f4365
makeAny->Any in basctl..chart2
...
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61
Reviewed-on: https://gerrit.libreoffice.org/33867
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-02-03 08:50:50 +00:00
Noel Grandin
4978328534
convert method names in tools::SvRef to be more like our other..
...
reference classes, uno::Reference and rtl::Reference.
Specifically rename Is()->is() and Clear()->clear().
Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae
Reviewed-on: https://gerrit.libreoffice.org/33576
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-02-02 08:02:54 +00:00