13 Commits
Author SHA1 Message Date
Neil Roberts e2af4c9f81 basic: Add unit test asserting that array arguments can’t have size
Adds a short unit test to assert that if you try to put a size inside
the brackets for the declaration of an array argument to a subroutine
then the compiler will report an error.

See this comment for an example of how it would be easy to break this
behaviour:

https://gerrit.libreoffice.org/c/core/+/203437/comment/749269bd_f55ea943/

Change-Id: I048234c7cf5a13e2ab2b71885ea1c0455566decf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205369
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-19 20:23:21 +02:00
Mo Amr 2dfb9be63e tdf#131818 BASIC: Fix optional array parameters in VBA
Update parser to reject optional array parameters in VBA mode.

Change-Id: Ibf5c47d9d6e0e272f4d21ed18ccba769e542aac3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203437
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-19 12:46:53 +02:00
Ilmari Lauhakangas 15ee592a79 tdf#168520 basic: rename testTdf149157* and testTdf149402* tests to
testTdf149157_continuation_in_comment_after_new_line* and
testTdf149402_continuation_in_comment_ending_with_whitespace*
to make it easier to understand what they are testing.

Change-Id: I6be5883d6cb837ecf2d3208ea1b7c1dabaaec070
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191397
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-09-23 15:25:30 +02:00
Mike Kaganski a4d1a55fa6 Add another test for tdf#166781
Change-Id: I6618f90cd281a982d096060c891234abc1d5623e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186092
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-05-31 21:50:48 +02:00
Mike Kaganski 44cdfa2eee tdf#166781: Emit correct expected token on missing End If
Change-Id: I28fc1822d80c45416204f56a5763a804b2b1f5a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185999
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-05-29 15:02:55 +02:00
Razvan Degeratu 7744d3134b tdf#162986 Restrict ending of Property Let and Set to only End Property
Change-Id: I023dc6399f97dc5ff1ca6503dbbc0cc7a30eea95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185249
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-05-13 12:45:58 +02:00
Alexandru Diaconu 047c84f431 tdf#162983 Restrict closure of Function and Sub to only End Function and Sub.
Change-Id: Ib08b5961e61d7a151fa7c67666b0f5e31a7828b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185185
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-05-12 16:05:27 +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
Luv Sharma a400c865a6 tdf#93727 Syntax Error on # in basic
Change-Id: I400a4061de580a5c91b0e4763cad40ae88a9f738
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162639
Tested-by: Jenkins
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2024-04-22 16:05:53 +02:00
Noel Grandin d9e322d60f replace ErrorInfo with simpler mechanism
Instead of returning ErrCode class everywhere, return a new
class ErrrCodeMsg, which combines an ErrCode with the other
parameters that are used to control the error reporting.

I do not change everything that uses ErrCode here, I started
from SfxBaseController/SfxMedium and worked outwards.

This change serves two purposes

(1) Replace the extremely whacky ErrorInfo mechanism we were
using to smuggle information into the error handler reporting
mechanism with a very straightforward approach of just combining it
into the error class.
(2) Allow us to capture the source location that produced the error,
which makes debugging the source of a problem soooo much easier.

Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03 10:12:41 +02:00
Andreas Heinisch fbce18558a tdf#149402 - BASIC: Don't extend comment if line ends in a whitespace
Change-Id: I8adf530e77a0e65329fa59ac2873b99f48befac4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135336
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-06-06 10:24:20 +02:00
Andreas Heinisch b94275f6d2 tdf#149157 - Break multiline continuation in a comment after a new line
Change-Id: I3dd875152a6f2cfafb67f13f597c36f01a4759b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135018
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-05-31 12:30:21 +02:00
Andrea Gelmini e4ec5a3ee0 Fix typo in namefile
Change-Id: I03dd69ae32b2d619300cdfac3581bebc142437be
Reviewed-on: https://gerrit.libreoffice.org/84708
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-08 18:55:06 +01:00