summaryrefslogtreecommitdiffstats
path: root/basic/qa
Commit message (Collapse)AuthorAgeFilesLines
* tdf#149402 - BASIC: Don't extend comment if line ends in a whitespaceAndreas Heinisch2022-06-061-0/+41
| | | | | | | | | | Change-Id: I8adf530e77a0e65329fa59ac2873b99f48befac4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135336 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit fbce18558a58cddf910b788a67c2f2d4d25d68e9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135378 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#149157 - Break multiline continuation in a comment after a new lineAndreas Heinisch2022-05-311-0/+40
| | | | | | | | | | Change-Id: I3dd875152a6f2cfafb67f13f597c36f01a4759b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135018 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit b94275f6d2cb4dc28d1563fd7994251042b6d51a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135164 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Test StarBasic's native non-ASCII name syntaxMike Kaganski2022-05-091-0/+28
| | | | | | | | | Change-Id: Ie9f0cd21e59ffc1e3fbe2616e2ae7abbd0169424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133103 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134044
* tdf#147089 - Round Integral Division (IDIV) literals to Integer valuesAndreas Heinisch2022-02-223-0/+62
| | | | | | | | | | Change-Id: Ia243c6117a437d0c6efb33a4e76c5e9ee539fbdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130302 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 3ba8b56b32c203326b776b940d20b16eb2340835) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130315 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#147364: fix function signature to account to calling conventionMike Kaganski2022-02-141-0/+36
| | | | | | | | | | | | | | | | | | First, the integer function result is returned in a 64-bit register (RAX), and truncation it to sal_Int32 breaks any pointer return value. Second, using explicit (not vararg) first function double argument would pass it through XMM0, without also copying it to RCX (which is guaranteed for varargs). Ref: https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention Change-Id: I08212c44d8690d6910068b13c16af2ce899c94f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129808 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 5276177877cc53c53653a87f3038eb208a5580ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129832 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
* tdf#146672 - CDbl: skip spaces and tabs at the end of the scanned stringAndreas Heinisch2022-02-092-15/+32
| | | | | | | | | | Change-Id: Ib7a4e8c7145b549a5327de23549d39d11f8590cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129648 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit a79e7dc9e8097c199e91288027861e3883e14d1b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129620 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#132388: add unit testMike Kaganski2022-02-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I hope that this performance test is OK. I chose 20 s threshold, as it works much faster on my system (under 4 s); it shouldn't be much slower elsewhere; and both the original bug, and the regression that followed the initial fix, made it execute orders of magnitute slower (I expect hours on fast systems). Change-Id: I75ee4c60e562473fe70a203faa94b48c5fbfb4fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Fix format string Change-Id: I18952bf6641175d25128b512ddfb56fd51767038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129083 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Adapt test to slow builds ...like my local ASan+UBSan build, which kept failing with > Failed: TestReplacePerformance (t = 35 s) > Tests passed: 0 > Tests failed: 1 when the machine was under load during a parallelizing `make check` Change-Id: I59c81a61a29df7165f6fad33e3fe3da975f05ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129284
* tdf#145693 - Argument name should be 'charcode' instead of 'string'Andreas Heinisch2022-01-104-0/+65
| | | | | | | | | | | | 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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128212 Tested-by: Jenkins
* tdf#130426 - Rename file for tdf#145693Andreas Heinisch2022-01-101-0/+0
| | | | | | | | | Change-Id: I1435f3e8c8ecf41ecd6b2766e19009c6b1783326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128099 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128211
* tdf#145960 - Return type of boolean operators should be of type booleanAndreas Heinisch2021-12-293-3/+60
| | | | | | | | | | | | 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> (cherry picked from commit 565a5fdee3c00b383b4d36180be845d48fd42556) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127580 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Resolves: tdf#110003 tdf#143128 handle lowercase ß vs uppercase ẞ foldingEike Rathke2021-11-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | Change lowercase ß U+00DF LATIN SMALL LETTER SHARP S from LowerToUpper, ToUpper: SS ToTitle: Ss FullFolding: ss to LowerToUpper, ToUpper: ẞ U+1E9E ToTitle: ẞ U+1E9E FullFolding: ss Add uppercase ẞ U+1E9E LATIN CAPITAL LETTER SHARP S UpperToLower, ToLower: ß U+00DF FullFolding: ss Adjust BASIC Collection test to new reality. Change-Id: I198e06985b81a71e5de94bf7fab7a0dbaf10baef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124988 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* tdf#145371 - Delete array variable only before ReDimAndreas Heinisch2021-10-301-0/+89
| | | | | | | | | Otherwise, global array variables don't maintain their state. Change-Id: I10dafd9e2946630c5476c9858f765d67ef2f6d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124368 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#125637 - Correctly hand names ending with an underscoreAndreas Heinisch2021-10-202-1/+36
| | | | | | | | | | | | If a name is ending with an underscore at the end of the line, it won't be recognized correctly and it will be wrongly interpreted as the respective name without the underscore at the end. Instead of changing the macro source, use a flag in order to correclty identify the line end. Change-Id: I6f933d7382b510bffed3e2692d32c232b7084624 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123833 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* Fix Windows buildStephan Bergmann2021-10-191-2/+2
| | | | | | | | | ...after cf3971a9414f52b116c1c21f267128ffa67f171b "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>
* Simplify Sequence in b*Julien Nabet2021-10-171-3/+5
| | | | | | | Change-Id: I0817d9a35a9c3fc43badb6cc60727de69849b063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123720 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#144924 - Change return type of array elements of the split functionAndreas Heinisch2021-10-073-10/+93
| | | | | | | | | | | 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>
* tdf#143575, tdf#143974 - Use rtl::math::doubleToUString to convert numbers ↵Andreas Heinisch2021-09-302-7/+35
| | | | | | | | | | to strings Change-Id: I1427dbd49af680a1bf386410977c9cb2b0a3961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122831 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#131563 - Add vba color constantsAndreas Heinisch2021-09-271-0/+11
| | | | | | | Change-Id: I59bcd11b5da1450fced77671c2cf6ed44e299a06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122607 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#123144 - Always translate an error number to a vba error messageAndreas Heinisch2021-09-192-0/+35
| | | | | | | | | | 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>
* tdf#144353 - Handling of missing optional parametersAndreas Heinisch2021-09-102-0/+126
| | | | | | | | | | | | Don't assign a missing optional variable to a property and don't allow the computation/comparision including missing optional attributes. In the previous cases a ERRCODE_BASIC_NOT_OPTIONAL is raised. Change-Id: Iab391286fcace16c271ae511304075e2a0c5c651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121794 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* Fixed a copy paste error in the test casesAndreas Heinisch2021-09-071-5/+5
| | | | | | | Change-Id: Ib11b6cfe385542664b28de35897caee67099d22c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121792 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#144245 - Added test file to automatic testAndreas Heinisch2021-09-072-4/+5
| | | | | | | Change-Id: I92b71b7e7ac8c2262d36875e4b04ed91e17bc495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121791 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#144245 - Case-insensitive operation for non-ASCII charactersAndreas Heinisch2021-09-071-0/+73
| | | | | | | | | | | Support case-insensitive operation for non-ASCII characters in the Collection object (VBA). Change-Id: Ie17560cb9aac5bfb32aa041744445dd4839681d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121534 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#143707 - Change strategy to support suffix type charactersAndreas Heinisch2021-08-102-0/+20
| | | | | | | | | | | | | | | | | | | | | | | In order to support the correct data type of numeric constants, booleans, and default values for strings, the strategy to transport the data type character to the runtime has been changed. The type character will be added after the literal and the string termination symbol in order to keep compatibility. This allows to retrieve the correct type in StepLOADNC and in StepPARAM. Any legacy written images are still possible to process, since if there is a suffix type character where the data type character was directly written after the numeric constant, it will be processed in StepLOADNC. Without this fix, an optional parameter of type Variant, would still include the suffixe type character, and will not be converted to the correct type in StepPARAM. Change-Id: I86c8192c6dc28457053fa7b23a073420e45407b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119945 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#107953 - Extend significant digitsAndreas Heinisch2021-07-284-50/+59
| | | | | | | | | | | | | According to https://randomascii.wordpress.com/2012/03/08/float-precisionfrom-zero-to-100-digits-2/ show at least 9 / 17 significant digits for a single / double data type in order to identify the contained value. Change-Id: Id2833fc51ca005bc78b68d6b4cca28f2d95f5a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#143332 - Use utl::TextSearch to implement the InStrRev functionAndreas Heinisch2021-07-191-1/+8
| | | | | | | Change-Id: I2dae038d061f036b3b7c0fbbcb6a821305d4839e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119094 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#139840 - Use utl::TextSearch to implement the InStr functionAndreas Heinisch2021-07-162-0/+12
| | | | | | | | | | In addtion, fixed a crash if the start position is greater than the length of the string being searched. Change-Id: I9bcda1131324bdfac6957018e91b3a36dd2dc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118996 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* tdf#111313: basic_macros: Add unittestXisco Fauli2021-07-151-0/+19
| | | | | | | Change-Id: Id6f8bc0998d4f79434d46017b998917dcc53ac6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118949 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#98778: basic_macros: Add unittestXisco Fauli2021-07-141-0/+22
| | | | | | | Change-Id: I35468fb35f5c24af2138688d99af0e41ba672334 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118944 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#114011: basic_macros: Add unittestXisco Fauli2021-07-141-0/+5
| | | | | | | Change-Id: Ib9a7e87b4c8159fd5fbaaaa66705cddae138fcdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118942 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#142487 - use utl::TextSearch in order to implement the replace algorithmAndreas Heinisch2021-07-121-1/+8
| | | | | | | | | | | | In the old algorithm, some special unicode characters lead to a malfunction of basic's replace function. For instance, replacing a German ß to uppercase in the insensitive case will lead to SS, breaking the replace positions. Change-Id: I4e6f6e5fba3d560b8cfd0786fa2439ed5174a928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118760 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* basic_coverage: use Option Explicit where possibleXisco Fauli2021-07-07136-7/+288
| | | | | | | | | Add missing license headers to a couple of files Change-Id: I7610f922e9ac914ae8fda0d0b6a7ca389401caca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118489 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#142922 fixes Round to follow half-to-even roundingbaltasarq2021-07-061-0/+29
| | | | | | | | | | | | | The LibreOffice's Basic Round function does not return values that are compatible with VBA's Round. This can be easily fixed using rtl/round, which has a flag parameter called rtl_math_RoundingMode_HalfEven which rounds real numbers exactly in the expected way. Change-Id: I2215f08427e5777fc2d35f054b635dfa6247af8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118444 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* basic: remove unneeded variable in testXisco Fauli2021-07-061-1/+1
| | | | | | | | | | Kudos to M. Kaganski for spotting it Change-Id: I04ceea4607cf94a5a84af4f171d6f2b204ef8653 Change-Id: Ie9064d3c12da657ecd82fdab6891bc8703ee6f37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118464 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#117612: basic_macros: Add unittestXisco Fauli2021-07-051-0/+24
| | | | | | | Change-Id: I4189b52be788deafe921c860f807ec5cee8ec667 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118443 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#134692: basic_macros: Add unittestXisco Fauli2021-07-051-0/+29
| | | | | | | Change-Id: I9115eca2fce784cd55a8eb4f1cfd6e614fd3612b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118442 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Move utility code out of test directoriesMike Kaganski2021-07-024-3/+3
| | | | | | | | | | | 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
* Rename LibreOffice Basic test files from .vb to .bas: they are not VBAMike Kaganski2021-07-02145-2/+2
| | | | | | | | Change-Id: I4ff8a8dc855da2c60084318e067d4ec8149d055e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118330 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
* tdf#143081: basic_macros: Add unittestXisco Fauli2021-07-021-0/+4
| | | | | | | Change-Id: I2d9fa23627f40a2398288b1ee7f5bfd4de4a6131 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118326 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* tdf#84098 kill copy+paste in basic/qa/basic_coverageXisco Fauli2021-07-02145-980/+821
| | | | | | | | | | | This also fix the problem of basic_coverage tests not showing the results when they were failing, since doUnitTest returned a Integer Change-Id: I637cd4cfaa34047bc99bfe6e0930f2945f1a9315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118234 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Purge out rtl::math::setInfBaiXiaochun2021-07-011-4/+2
| | | | | | | Change-Id: I71af8273c672a4cbcbfefafffd0003ab266dcce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118132 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#142460: properly handle boolean values in string poolbaltasarq2021-06-251-0/+37
| | | | | | | | | | | | | | | | | | This makes sure that results of comparison of literals have proper boolean type, and that this type is properly stored to/read from the string pool. This introduces a new non-standard "type" character used in the pool: 'b'. It is not a proper type character used in Basic (unlike '%'/'&'/'!'/'@'), but we have to use this trick locally, because we need to pass the type that has no own type character. The change should be backward-compatible: older versions reading the value should just ignore the 'b', and read the value as double. Change-Id: Ibd4a70b366331342346eb171c8ed3c7026279596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117655 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#142180 Swapped comparison operators for static stringsJoshua Williams2021-05-231-0/+19
| | | | | | | | | | | | | It seems that, for some reason, the comparison operators for strings in basic were swapped in the code that evaluates string comparisons at compile-time. This is what caused bug #142180. This commit simply swaps the operators and should fix the bug. Change-Id: I14f90db8598f2f7f8b709e26902986e1f64af576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115983 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#139840 - Case-insensitive operation for non-ASCII charactersAndreas Heinisch2021-05-132-6/+14
| | | | | | | | | | Support case-insensitive operation for non-ASCII characters in the InStr function in Basic. Change-Id: Idb2b8e128adf3596fa49e3e86365d5724ea3e11c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115538 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* Change en_GB calendar StartDayOfWeek to Monday and MinimalDaysInFirstWeek to 4Eike Rathke2021-05-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inherit day, month and era names from en_US but with proper values. See https://lh.2xlibre.net/locale/en_GB/ - Week definition (week) - First day of week (first_weekday) or % LC_TIME=en_US locale -k LC_TIME week-ndays=7 week-1stday=19971130 week-1stweek=1 first_weekday=1 first_workday=2 % LC_TIME=en_GB locale -k LC_TIME week-ndays=7 week-1stday=19971130 week-1stweek=4 first_weekday=2 first_workday=2 This makes it necessary to adapt basic/qa/vba_tests/weekdayname.vb because basic/qa/cppunit/test_vba.cxx sets LANGUAGE_ENGLISH_UK Change-Id: I752bf0e59396f0cbd601beb596c07e77e4e4cfaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115160 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
* tdf#124184 Fixing StrConv VBA Functiontushar2021-05-011-9/+19
| | | | | | | | | | | | | | | | | * vbUnicode/vbFromUnicode considers optional third LCID argument. * LCID is also used for other conversions. * The encoding is decided based on the language defined in LCID, or on program locale when LCID is omitted, using MS default ACP mapping for languages. * Unit testis for vbWide / vbNarrow are changed and enabled. * Unit tests for vbKatakana / vbHiragana are changed and enabled. * Unit test for vbFromUnicode / vbUnicode is changed to rely on en-US locale used in testing, and is enabled. Change-Id: Iabd4153db311cd02c3f3e7247f9fc71ad9f5f682 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112539 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#141201 - Round MOD literals to Integer valuesAndreas Heinisch2021-04-051-0/+25
| | | | | | | | | | (regression from commit I8dbfdf4bb2eceac0b5afbddd3f35e1dcde2db68b "tdf#84435: Mod operator does not deal with decimals as described in help"). Change-Id: I74b231d3814148579a3be0a92b7602fa4387281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113571 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
* TypeName, VarType, TypeLen Basic QA test casesAlain Romedenne2021-03-293-21/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | 1- exhibiting array type names 2- highlighting supplemental libO Basic constants 3- precising data types internal representations I intend to document in help: 1- primitive data types array names: Boolean(), Byte(), … as IsArray() function does not provide such info 2- Publish extra Basic constants for already published values: - V_OBJECT=9, V_BOOLEAN=11, V_VARIANT=12, V_BYTE=17 - not necessarily V_ARRAY=8192, V_ERROR=10 The latter is conditioned to the creation of an enhancement request. FYI, published Vartype() values and constants for VBA and other Basic-like languages: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/vartype-function https://docs.xojo.com/VarType https://help.hcltechsw.com/dom_designer/9.0.1/appdev/LSAZ_DATATYPE_FUNCTION.html Change-Id: I51bac3caf555d94e91de7c6d624b3fca9e73a673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111042 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#88442 SBasic: Don't double-initialize a Global ... As New ...John2021-03-211-0/+86
| | | | | | | | | | "As New" variables use lazy instantiation, but that should not re-apply each time one re-enters the module. If the object is still there, don't replace it. Change-Id: Ic568a56b93db9bc9139d434d97a4a4deb05840df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112018 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#141050 Accept CCur with negative stringsarpit19122021-03-201-5/+11
| | | | | | | | | the ImpStringToCurrency now increment the pointer on finding a '+' or '-' in sbxcurr.cxx file Change-Id: I4a1093ae0b4e52b6a61dc412bd5e7b95b1309e7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112734 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>