Gabor Kelemen
0bdcfc2900
tdf#146619 Use more forward declarations in include/unotools/
...
This shaves off some 40M of input
Change-Id: I12e10deb87ceea1f7a23f3de4ea624befe187c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198238
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com >
Tested-by: Jenkins
2026-02-05 17:35:46 +01:00
Gabor Kelemen
c309a5785d
tdf#146619 Run IWYU on basic/
...
Change-Id: I58883f0223a28f3ea887c37e2a86a3c31ff88546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188749
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de >
2025-08-18 20:19:07 +02:00
Balazs Varga
b6775ce2b3
Temporarily skip unit tests on native arm64 build
...
which indicating unit test fails.
Change-Id: I2689b0dda888e15e52ca60cc18e1705a1aefe968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173143
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de >
Tested-by: Jenkins
2024-09-12 09:37:26 +02:00
Mike Kaganski
afb46ee880
tdf#150458: evaluate for loop's end and step once in VBA support mode
...
As required by [MS-VBAL], and actual VBA implementation.
It is a question if we also need to change it likewise in other
modes (normal, compatible) - see tdf#150460.
Change-Id: I1e83d57fe4be3bf264a64fe977909cf7684bc798
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172005
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-08-18 09:08:49 +02:00
Alain Romedenne
54b642f4b8
VBA QA new unit test for IF THEN statement
...
Intent is to cover:
- EndIf / End If equivalence
- repeating ElseIf blocks
_ nested IF statements
- IF THEN one liner
Change-Id: I667f0381529afcc82fc44ae461081f7ba84b01d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-08-05 11:19:47 +02:00
Andreas Heinisch
2b6caa40d6
tdf#160321 - Added missing VB test
...
Change-Id: I4019599aa9d7803a63e4270b06841915ea428392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168637
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2024-06-10 17:50:33 +02:00
Noel Grandin
7d6e751faa
loplugin:ostr basic
...
Change-Id: Ie5fc4676bd1cab2c0417b479bf08dda00936469a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-05-06 13:56:49 +02:00
Ilmari Lauhakangas
115c8b42b8
Revert "tdf#130924 replace '*printf' with 'SAL_*' logging macros."
...
My mistake, did not notice
https://bugs.documentfoundation.org/show_bug.cgi?id=130924#c5
We shouldn't hide test output.
This reverts commit df0db41324 .
Change-Id: Ieac40effb57333322f8db8ead093a83765d17a09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156479
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2023-09-03 13:22:55 +02:00
sahil
df0db41324
tdf#130924 replace '*printf' with 'SAL_*' logging macros.
...
Change-Id: I5bb4052ded82c355f7d71e4f38ebdefe3fcc25da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156283
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2023-08-31 19:50:23 +02:00
Baole Fang
e12fff12b6
tdf#152690: Fix "!" behavior when it is not the first in a group
...
Fix "!" behavior when it is not the first in a group.
Add testcases for "!" and Like.
Change-Id: Ia76fa26722b6546d08dd8842d83f55bb0c0ea5ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148720
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2023-03-16 21:14:20 +00:00
Mike Kaganski
1786ddbde4
Fix build in a specific VS2022 environment
...
Building CppunitTest_basic_macros using VS2022 failed for me reproducibly
for some time, with
make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:841: C:/lo/src/build/workdir/LinkTarget/CppunitTest/test_basic_macros.dll] Error 139
It is caused by linking odbccp32, and legacy_stdio_definitions required
by the latter with current versions of UCRT.
It seems to work OK for others; but being unable to find what's different
on my system, I have this workaround, using run-time loading instead.
Change-Id: Ic4094398f7510bc281dfa96f980f29f12f09d7ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147626
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2023-02-24 17:05:43 +00:00
Andreas Heinisch
522f5ad4d8
tdf#147529 - BASIC MsgBox: Check for missing optional parameters
...
Change-Id: Iecb47e0005c609ee1117d6fb141e810c0166806a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136339
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-06-24 09:20:45 +02:00
Andreas Heinisch
90d33f5945
tdf#148358 - Compare Non-ASCII variable names case-insensitive
...
Change-Id: I761eb27b16c92d58df1be8e6011fc9b94db2a59c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133774
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-05-07 16:00:50 +02:00
Stephan Bergmann
b5ab864096
Just use Any ctor instead of makeAny in basic
...
Change-Id: I21d9679064c4e68a1492d3550f083c3c91b5b43b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133848
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2022-05-05 07:13:54 +02:00
Xisco Fauli
07bf0ce4e7
tdf#148651: basic_macros: Add unittest
...
Change-Id: Iadbe470de5a33dc633fe8f53083520988e497df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133255
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
2022-04-21 19:52:16 +02:00
Andreas Heinisch
3ba8b56b32
tdf#147089 - Round Integral Division (IDIV) literals to Integer values
...
Change-Id: Ia243c6117a437d0c6efb33a4e76c5e9ee539fbdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130302
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-02-21 23:10:46 +01:00
VaibhavMalik4187
8b327cd86d
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
...
Change-Id: I4f5258ca5b37e9b1b4237c5d29e4a9e5362fa855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129116
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Jenkins
2022-02-06 21:38:32 +01:00
Andreas Heinisch
35aa82ef1c
tdf#145693 - Argument name should be 'charcode' instead of 'string'
...
In addition, changed argument datatype from Int to Long.
Change-Id: I702e09b6b8061d7cf00dd403e4681a0ab348d4c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128100
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-01-08 11:48:32 +01:00
Andreas Heinisch
565a5fdee3
tdf#145960 - Return type of boolean operators should be of type boolean
...
In addition, added missing vba test to the test routine.
Change-Id: I3ee837e1eab30f10e0a4169d11014f9b6574ad1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127631
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-12-28 19:54:58 +01:00
Stephan Bergmann
af2d15a494
Fix Windows build
...
...after cf3971a941 "Simplify Sequence in b*"
Change-Id: If8650faa7a45258729e54b3df37e9084221babfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123792
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-10-19 09:14:47 +02:00
Julien Nabet
cf3971a941
Simplify Sequence in b*
...
Change-Id: I0817d9a35a9c3fc43badb6cc60727de69849b063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123720
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-10-17 14:13:10 +02:00
Andreas Heinisch
e090afc29b
tdf#144924 - Change return type of array elements of the split function
...
If VBA is not enabled, allow the assignment of variables with different
data types to the individual array elements created by the split
function.
Change-Id: I7bdd432cdebbfded5f7fb3acc0216474eb6b6821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123122
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-10-07 08:21:58 +02:00
Andreas Heinisch
adb38e36e3
tdf#123144 - Always translate an error number to a vba error message
...
In addition, create a meaningful error message and don't create and
artificial error message if there exists a custom one.
Change-Id: I682e497ee3fdfe4da80fb17ab41c1b4cf90eb2cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122206
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-09-19 18:46:35 +02:00
Andreas Heinisch
092740eddd
tdf#144245 - Added test file to automatic test
...
Change-Id: I92b71b7e7ac8c2262d36875e4b04ed91e17bc495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121791
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-09-07 20:52:00 +02:00
Mike Kaganski
357c0e2a4a
Move utility code out of test directories
...
This simplifies iteration over the test files, and avoids relying
on file URLs being the same (e.g., having no /./ segments).
Change-Id: I227785806e474a3a2dffeb46df21617eae43327e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118329
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Jenkins
2021-07-02 21:53:39 +02:00
Mike Kaganski
97c3280afb
Fix build after 042033f1e6
...
Change-Id: Ifca32f434442f7838aae6f47dc2831dfa6a3f5db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108496
Tested-by: Stephan Bergmann <sbergman@redhat.com >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2020-12-30 14:55:44 +01:00
Stephan Bergmann
042033f1e6
loplugin:stringviewparam: operator +
...
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2020-12-29 16:42:33 +01:00
Mike Kaganski
66b135fa80
Related: tdf#84098 Unify tests
...
Shorten the tools module name; use TestUtil.AssertEqual where applicable;
remove unnecessary variables that only made noise and masked what was
actually asserted; add missing licence headers.
Change-Id: If891ed8ceb38fed18335aad061b2b09d341264f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108118
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-12-22 06:18:50 +01:00
George Bateman
73ba462935
tdf#84098 kill copy+paste in VBA tests
...
Move repeated code into _test_asserts.vb
Change-Id: Idfe124a8dbab4925309fa5f1322e0cce5f097b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107860
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-12-19 23:40:13 +01:00
LibreOfficiant
45435e2ac0
VBA Err object raise method TestCases
...
Err.Raise(#) enables 'User-Defined Exceptions'
Std Basic alternative is: Error # 'without parentheses
which throws pre-defined error codes.
Change-Id: I76229b237066e33229d4d13e6742c660887fda2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-03-24 11:16:21 +01:00
Andreas Heinisch
8e323fcace
tdf#36737 - Initialize default values of optionals
...
Initialize default values of optionals in function headers.
In LO Basic, optional parameters are allowed, but without
any default values. Missing parameters will not be initialized
to their respective default values of its datatype, either.
With option Compatible, optional parameters are allowed
with default values. Missing optional parameters that
don't have explicit default values will not be initialized
to their default values of its datatype.
With option VBASupport, optional parameters are allowed with
default values. Missing optional parameters that don't have
explicit default values will be initialized to their default
values of its datatype.
Change-Id: I57aabae5f70d1cf6c4e8feb95ce0db6af753383c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87550
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-03-02 10:08:58 +01:00
LibreOfficiant
4171b99905
VBA Enum statement TestCases
...
Change-Id: Ib8f730d22bc7de00736c9fb1bb9c1af1784eb5df
Reviewed-on: https://gerrit.libreoffice.org/85074
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Mike Kaganski <mike.kaganski@collabora.com >
2019-12-14 10:40:29 +01:00
lbenes
1b83d562fb
fix windows builds after commit 7ddedd2594
...
Change-Id: I2990da77a91f6c8fdb6fd9e4112d0451bc3342da
Reviewed-on: https://gerrit.libreoffice.org/82547
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-11-13 09:30:46 +01:00
Gabor Kelemen
7ddedd2594
tdf#42949 Fix IWYU warnings in basic/
...
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50
Reviewed-on: https://gerrit.libreoffice.org/82312
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-11-12 09:20:55 +01: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
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
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
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
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