Commit Graph
74 Commits
Author SHA1 Message Date
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 260a2036d6 tdf#130426 - Rename file for tdf#145693
Change-Id: I1435f3e8c8ecf41ecd6b2766e19009c6b1783326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128099
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-01-07 12:17:50 +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
Tor Lillqvist 47aabde053 Make the tdf#97983 changes to BASIC optional
If you want to keep the string to floating point conversion semantics
in BASIC as they were in LibreOffice 6, you can either set the
LIBREOFFICE6FLOATINGPOINTMODE environment variable to some non-empty
value, or set the org.openoffice.Office.Scripting/Basic/Compatibility/
UseLibreOffice6FloatingPointConversion flag in the Expert
Configuration. (Or use a registry modification file with that effect.)

Adapt the relevant unit test accordingly. Thanks to Mike Kaganski for
showing how to access the setting in the LibreOffice registry from
Basic.

Change-Id: I13d6d5d834e1bb81ef8df489db2b1da79f01dfc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125756
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-09 12:06:49 +01:00
Andreas Heinisch 67c1591060 tdf#125637 - Correctly hand names ending with an underscore
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>
2021-10-20 20:27:59 +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 ed16602512 tdf#143575, tdf#143974 - Use rtl::math::doubleToUString to convert numbers 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>
2021-09-30 09:26:54 +02:00
Andreas Heinisch e32d864dbe tdf#144353 - Handling of missing optional parameters
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>
2021-09-10 13:28:33 +02:00
Andreas Heinisch a330732cf8 tdf#107953 - Extend significant digits
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>
2021-07-28 09:57:31 +02:00
Andreas Heinisch afddd56a80 tdf#139840 - Use utl::TextSearch to implement the InStr function
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>
2021-07-16 09:29:16 +02:00
Xisco Fauli 0ce3a9dcc0 tdf#111313: basic_macros: Add unittest
Change-Id: Id6f8bc0998d4f79434d46017b998917dcc53ac6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118949
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-15 10:02:00 +02:00
Xisco Fauli f7d128f122 tdf#98778: basic_macros: Add unittest
Change-Id: I35468fb35f5c24af2138688d99af0e41ba672334
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118944
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-14 19:39:07 +02:00
Xisco Fauli c3fc5aaa65 tdf#114011: basic_macros: Add unittest
Change-Id: Ib9a7e87b4c8159fd5fbaaaa66705cddae138fcdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118942
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-14 18:15:28 +02:00
Andreas Heinisch 7e5c9220ef tdf#142487 - use utl::TextSearch in order to implement the replace algorithm
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>
2021-07-12 20:30:19 +02:00
Xisco Fauli 0ad1810a91 basic_coverage: use Option Explicit where possible
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>
2021-07-07 10:01:10 +02:00
Xisco Fauli faaf95859c basic: remove unneeded variable in test
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>
2021-07-06 11:18:15 +02:00
Xisco Fauli 3be3a020d4 tdf#117612: basic_macros: Add unittest
Change-Id: I4189b52be788deafe921c860f807ec5cee8ec667
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118443
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-05 17:48:49 +02:00
Xisco Fauli c6cc94ea78 tdf#134692: basic_macros: Add unittest
Change-Id: I9115eca2fce784cd55a8eb4f1cfd6e614fd3612b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-05 17:35:30 +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 9258f7009e Rename LibreOffice Basic test files from .vb to .bas: they are not VBA
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
2021-07-02 20:48:34 +02:00
Xisco Fauli 79657c9f53 tdf#143081: basic_macros: Add unittest
Change-Id: I2d9fa23627f40a2398288b1ee7f5bfd4de4a6131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118326
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-02 19:36:56 +02:00
Xisco Fauli a6178d172e tdf#84098 kill copy+paste in basic/qa/basic_coverage
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>
2021-07-02 17:50:10 +02:00
Joshua Williams 6cdfd89413 tdf#142180 Swapped comparison operators for static strings
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>
2021-05-23 07:14:07 +02:00
Andreas Heinisch 7a578c0635 tdf#139840 - Case-insensitive operation for non-ASCII characters
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>
2021-05-13 18:36:20 +02:00
Andreas Heinisch a9fcd2cf2b tdf#141201 - Round MOD literals to Integer values
(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>
2021-04-05 16:38:44 +02:00
Alain Romedenne 08151f4827 TypeName, VarType, TypeLen Basic QA test cases
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>
2021-03-29 15:29:39 +02:00
arpit1912 54b3ada2e5 tdf#141050 Accept CCur with negative strings
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>
2021-03-20 11:57:48 +01:00
Andreas Heinisch ac0b6fb384 tdf#141045 - fixed copy paste error in the replace function
Change-Id: Id68670fed89e4cc700c5eea395139914bebdb657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112509
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-03-15 15:16:57 +01:00
Andreas Heinisch 0426748927 tdf#136755, tdf#124008 - delete the variable beforehand REDIM
If an array of objects is passed as an argument to ReDim, delete the
variable beforehand, otherwise the construction of the new variable
fails, because the old one is still on the stack.

Change-Id: Ic863a36f5f2aca658df369f95d275aa287edf795
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106832
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-01-25 07:57:59 +01:00
Andreas Heinisch 48d46bcc90 tdf#85371 - grant write access to the method used as a variable
During the creation of the parameter list of a method, explicitly grant
write access to the method which will used as a variable. Otherwise, the
name of the method can't be used in certain statements, i.e., index in a
for loop or as a dimension in ReDim.

Change-Id: I3e4c49c21fd3345d5ddd69bc31a5823b5de5b8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104696
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-30 05:12:25 +01:00
Andreas Heinisch d6b7cc3f7c tdf#123025 - ReDim Preserve fails if array is filled by Split
The Split function sets the datatype of the array to SbxVARIANT instead
of SbxSTRING preventing any subsequent assignments to the array and to
the elements itself.

Change-Id: Ib099eee7bfd222c97520ac8970352bcf2b44bc3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104039
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-16 12:31:02 +02:00
Andreas Heinisch 698e5d5418 tdf#123025 - fixed broken tests for cverr method
Change-Id: I44eb44107a24207764da24b4e01b407570342013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103956
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-06 17:17:55 +02:00
Alain Romedenne c3c8d2d671 tdf#136112 Unit test for Date() Basic function
Change-Id: Id6660627e766c6dcd107c3ee483bacb046cae7bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102123
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-08 17:18:29 +02:00
Andreas Heinisch 40031dd453 tdf#54912 - with option base arrays should start at index 1
Using option base, every array should start at index 1. Previously, it
needed option VBASupport too. Without option compatible, the upper bound
of an array is increased as well in order to preserve the specified
size.

Change-Id: I52885f14914a4636b98258aa428c2123f62482a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101269
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-01 09:28:46 +02:00
Andreas Heinisch 781b6ac998 tdf#136143 - reset SbxFlagBits::Fixed SbiRuntime::StepPARAM
In order to prevent type conversion errors, reset a variable of type
SbxERROR to not fixed. Variable will be of type SbxERROR, but can be
converted to any requested type.

Change-Id: Ic856376e3f8232577a5e894a2adb2545c8723033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101419
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-27 15:49:16 +02:00
Mike Kaganski e67ffd5a62 tdf#135470: Fix checks
The check should prevent error in case when the variable has
wrong type. IsObject returns false e.g. for arrays, which are
valid iterables. So proper check is using GetFullType, which
will give SbxOBJECT for any variable for which GetObject does
not set error.

"Next" should also generate an error for uninitialized loops.

Regression after 5760c94b88

Change-Id: Ib58e1cc76ef63aa1ff8a86c9d5dc956e4780fb49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100258
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-07 09:43:44 +02:00
Andreas Heinisch 0f6e012057 tdf#133913 - create variable with Variant/Type in StepLOADNC
During the loading of numeric constants in StepLOADNC, create variables
of type Variant and convert them to the requested type, i.e.
Variant/Type in order to prevent type conversion errors, when they are
passed to a method with variant parameter types.

Change-Id: I2ab0111b5b53dd2de9523ba7cf12bd2519d050b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96402
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-16 22:59:30 +02:00
Andreas Heinisch 345cb192f0 tdf#132563 - Convert parameters of type SbxEMPTY
During the construction of the parameter list of a method,
convert parameters of type SbxEMPTY to their requested type,
since missing parameters are handled differently in StepEMPTY,
where separate parameter information (SbxMISSING) is added.

Change-Id: Ie1e027cfdd652404ec29bd3d05e7daf533468936
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96088
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2020-06-11 15:26:22 +02:00
Andreas Heinisch 3ff159d357 tdf#132389 - case-insensitive operation for non-ASCII characters
Support case-insensitive operation for non-ASCII characters in the
Replace function in Basic.

Change-Id: I48069ad7be1ae0f012c52f595cc44e6b50580b94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94580
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21 08:50:23 +02:00
Andreas Heinisch 84b884135e tdf#79426, tdf#125180 - Don't convert missing parameters to requested type
If a particular parameter type is requested during the
construction of a parameter list, don't convert missing
parameters to avoid implicit casting to the specified
data type and value of the method.

Missing parameters are handled in StepEMPTY, where
additional information about missing parameters is added.

Change-Id: Ia413b2996d7d1feecedc1dfefaf6baf0fd9d917e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90215
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-02 12:57:57 +02: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 f9a8d7b5c2 LibO Basic Property Get/Set
Change-Id: I1ef323560ffaacf9e44c8ba9332b825ffc38d59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83943
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-22 11:35:51 +01:00
Stephan Bergmann 5fc8b470f2 tdf#130426 Support Basic Chr(&H8000), ..., Chr(&HFFFF) again
...after it had been broken by d5b7627a0e
"tdf#62326 - Macros: Converting Hex strings of negative value".

The corresponding help update is <https://gerrit.libreoffice.org/c/help/+/89100>
"tdf#130426 Update documentation for Basic Chr and ChrW functions".

Change-Id: I5f08b1ef907d840b491315a1f445f729b4999d0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89090
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-20 15:59:49 +01:00
Andreas Heinisch 4fdc90c51e tdf#97983 - Added localization for numeric types
For numeric types, take into consideration different locales

Change-Id: I815c195e7ef53a7b958f85932415a16c9a8a1e35
Reviewed-on: https://gerrit.libreoffice.org/83683
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-28 10:21:25 +01:00
LibreOfficiant c9c19fed24 Property Get/Let Basic Statement
My very first Basic TestCase: Assistance/mentoring is welcome

Change-Id: I6399fdb603051792d698695fe659e5a12a0c8396
Reviewed-on: https://gerrit.libreoffice.org/83553
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2019-11-23 18:14:10 +01:00
Andreas Heinisch d5b7627a0e tdf#62326 - Macros: Converting Hex strings of negative value
If the value of the hex string lies within the range of 0x8000
(SbxMAXINT + 1) and 0xFFFF (SbxMAXUINT) inclusive, cast the value to 16 bit
in order to get signed integers, e.g., SbxMININT through SbxMAXINT.

Moved unit test to test_scanner.cxx in order to test basic hex
convertations. Removed old vba unit tests.

Change-Id: I247b41c40197afc5328ef5685c758c1dd1cefae5
Reviewed-on: https://gerrit.libreoffice.org/79583
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-27 18:22:26 +02:00
Andrea Gelmini 938d304f0f Removed executable permission on files
Change-Id: Iea2a937559ac8393c0fb5bf9482115ba162c2a6c
Reviewed-on: https://gerrit.libreoffice.org/79079
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-18 10:15:21 +02:00
Tomoyuki Kubota ff6383face tdf#118544 set correct type for optional parameter
Change-Id: Id8840431b9dc1f1e97882c675ebfc6456e33d953
Reviewed-on: https://gerrit.libreoffice.org/77684
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-17 16:33:33 +02:00
Zdeněk Crhonek 834c7c2698 add test for bug tdf#121337
Change-Id: I26d1d426e6a856b09a48efe8e411b8c54e0f35cf
Reviewed-on: https://gerrit.libreoffice.org/64275
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-12-03 17:58:38 +01:00
Stephan Bergmann d3368c174f Add reference to test code
...that had inadvertently been missing from the file's inital commit,
a6a48eeef1 "tdf#121325: Replace all of given
length, even if replacement is shorter"

Change-Id: I2a09e1d1ee94480d5615106a4e28958218d9b4c7
Reviewed-on: https://gerrit.libreoffice.org/63334
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-13 21:45:37 +01:00