4650 Commits

Author SHA1 Message Date
9522aeae87 tdf#167255: workaround undefined order of module load
The problem is, that there is no definition of resolution of name
visibility, when names are defined in different modules. Before
commit ea2a97438643a440e192dbe30d03988da65c6b18 (Simplify
NameContainer, 2024-12-01), it happened to be the order in which
modules were found in SfxLibraryContainer::init_Impl (it could be
arbitrary in principle).

The said commit changed NameContainer::getElementNames to return
the names in ~arbitrary order (defined by specific unordered_map
implementation).

To workaround the current problem (when 'SBMAXAPPLCOUNT' defined
in 'DialogModul' of 'ImportWizard' library is not visible in its
'Language' module at library load time, specifically on Linux),
just sort the library element names at its loading time. It will
not create performance problem (it is a one-time sort over a small number of elements; having millions of modules in a single library
is not realistic, and would create bigger problems elsewhere).

Change-Id: I93e91ae5f4be12a1bf641fe2d29e0a161589b8af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187081
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e21c27ae301dc1a3d55563e0b7428adc189804bc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187093
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-27 14:13:49 +02:00
d1c9252bf3 tdf#166342: refactor SbxValue::Format again, to handle date/time strings
Commit 81e1e0a2a671f19950c1bd3c69f9aa24b0c562e7 changed string-to-number
procedure from SvNumberFormatter to only use SbxValue::ScanNumIntnl. But
the latter can only handle strings with simple numbers, not with dates,
times and the like.

This change restores use of SvNumberFormatter to convert input strings
to number, when SbxValue::ScanNumIntnl fails. The code is re-structured
for performance, to avoid creating SvNumberFormatter twice, and repeated
calls to GetOUString.

Change-Id: I89a4fc041fe24fe00b099ab4fbee371d1f6b5567
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185047
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 33434f16206aaa07f56af8f4c23b05b3c88a2124)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185065
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-05-15 16:35:05 +02:00
cd99539291 tdf#136112: return 'Date' type from Time()
Change-Id: Id21a4c378ddf9888740b3201f109e1897b722ded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185046
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 5a9c784cba996b599e36965d241509696d19ff3c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185051
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-05-08 17:25:52 +02:00
55161dd3fd tdf#165420: handle empty arguments correctly
Change-Id: Ib30cce816b2af8a780e09fa04a2129afd91fafe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182118
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 37216049f1a699a3269f0e19ee514e814b965266)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182144
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-02-25 13:34:58 +01:00
ba0a55592a tdf#160578: do not modify procedure argument type based on its use
Since the initial import, there is a code in SbiExpression::Term, that
checks if the defined symbol is used as object (e.g., dot notation to
access its members), and then, if its defined type is Variant, then it
is corrected to Object. There is no rationale for this in comments; so
I have no way to know what could break if that core is dropped.

It's obvious that at least for procedure arguments, such correction is
wrong: the argument definition is the procedure's API; and the actual
use of the symbol should not unexpectedly change what is advertised.

This change limits the application of the correction to non-arguments.
If it should be dropped completely is a separate question.

Change-Id: Ia902afa3f744d0d51510ba6903be45f78e2f6429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180665
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
(cherry picked from commit f071292a5af10f4718302a1bf9cc9cdc37528225)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180675
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-23 22:35:53 +01:00
014bd12ed0 tdf#164811: swap the "if IsCompatibility()" branches to match other places
Commit 9cdb73ff28c4cd6380412468f34ff10e46292a07 (INTEGRATION: CWS jl5vba
(1.25.94); FILE MERGED, 2004-03-17) has introduced handling of decimal,
currency, and date for VBASupport mode in sbunoobj.cxx. However, in
getUnoTypeForSbxBaseType, it changed the behavior for date type in the
non-VBASupport mode, obviously by mistake. This change swaps the code
in the 'if' branches, to what appears to be the original intention.

Change-Id: I88cddf7cec1a980f56de96ae1c5e64d8e7630b77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180637
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 63e7a70ad1a6a8ec4190ab510f683d2fc9dea417)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180674
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2025-01-23 21:52:33 +01:00
8f41d6650f tdf#164600: Return true from IsNumeric for booleans in VBASupport mode
Change-Id: Ib68f237001389c8f7b9d2771d5162a583b544b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179866
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179935
2025-01-08 13:05:02 +01:00
6d9ecc59fc tdf#164599: Allow space between sign and number in VBASupport mode
Change-Id: Ib9e8c8770f8c2d1b348ff032502467915829c4f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179865
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/+/179934
2025-01-08 13:04:46 +01:00
fdf39c3762 tdf#154284: check if ImpScan found a number at all
Change-Id: Iddc87bd0d04f9b0212b03d63f3177b17bb07d278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179863
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179933
2025-01-08 13:04:34 +01:00
2779673365 Simplify ImpScan
Change-Id: I8928d3c7f0fc6884a75c05e77908df7f482c9e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179246
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179932
2025-01-08 13:04:28 +01:00
d838456399 Simplify a bit
The previous code made sure that cNonIntntlDecSep is always equal to
IntntlDecSep (in the code handling bOnlyIntntl). Frop the redundancy,
and make the variable names simpler.

Change-Id: I31c994cd49bdbf007e110f593297acf112cc420b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179198
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179931
2025-01-08 13:04:21 +01:00
16b35a9ea0 tdf#164446: fix internationalized FP input in Basic IDE Watch
Now that tdf#97983 fix made the default conversion internationalized,
the special handling of the Watch window input needs to do it in the
other direction. Additionally, move ImpConvStringExt to the single
place that uses it.

Change-Id: I18a4043511f4a1b32f79410447e96c7679329886
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179302
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit b01e697b53607fef0ac3ab222b5b25a6eb0257a5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179418
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-12-31 07:11:54 +01:00
c6af2045a4 Fix a copypasta
From commit 9e9f39d171cafa035d7b8e74187e25c3581cb89d (resolved
rhbz#919020 Basic CDbl() and CSng() scan localized number, 2013-03-19)

Change-Id: I871d7fb06ccb5d15723f7acfb57701890607055f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179197
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e40b541d7ae6acdcfda19e54a12a4dbc59bfbd09)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179236
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-12-24 01:00:50 +01:00
0f3f371028 NameContainer need not be an UNO object itself
Change-Id: I56f07a62ed3d2388eede16a85e673027cfed8158
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177616
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 22:44:38 +01:00
297b7a7676 Optimize SfxLibrary / SfxLibraryContainer memory layout a bit
Change-Id: I63ba583ef990dd2bbfb7f44af613fce1d8d1b411
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177608
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 16:06:31 +01:00
d91eca950e Simplify SfxLibrary hierarchy
For some reason, SfxLibrary's own interfaces were used outside of
WeakComponentImplHelper; and derived classes didn't use inheritance
helper.

Change-Id: Ib0b6cf5cfa559fe5eedc4d05247655aca1bfc4b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177607
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-01 16:06:24 +01:00
ac334d5c76 Simplify a bit
Change-Id: Ia48a24d1696aaf2ee7e49f5e8c9f9dcc0ae9e8e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177606
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 16:06:17 +01:00
ea2a974386 Simplify NameContainer
Having a map, two vectors, and a counter for what is a job for a single
map is a bit too much.

Change-Id: I50d29f03a2463e6f63ed8e645c36b4c77aa1413a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177604
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 12:27:02 +01:00
e413d962ac Drop unneeded indirection and unused argument
The extra complexity was introduced for #i94994# in commit
326696598621c5883d7c28f491ca8192e8cfb21c (CWS-TOOLING: integrate CWS
ab61, 2009-02-11).

Change-Id: If5a69984e3c2c963d4eea2824373fbf1e8a47fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177603
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 10:27:16 +01:00
8c1dbd3188 cid#1607542 COPY_INSTEAD_OF_MOVE
and

cid#1606986 COPY_INSTEAD_OF_MOVE
cid#1557969 COPY_INSTEAD_OF_MOVE
cid#1557837 COPY_INSTEAD_OF_MOVE
cid#1557772 COPY_INSTEAD_OF_MOVE
cid#1557735 COPY_INSTEAD_OF_MOVE
cid#1557672 COPY_INSTEAD_OF_MOVE
cid#1557664 COPY_INSTEAD_OF_MOVE
cid#1557650 COPY_INSTEAD_OF_MOVE
cid#1557642 COPY_INSTEAD_OF_MOVE
cid#1557639 COPY_INSTEAD_OF_MOVE
cid#1557628 COPY_INSTEAD_OF_MOVE
cid#1557623 COPY_INSTEAD_OF_MOVE
cid#1557581 COPY_INSTEAD_OF_MOVE
cid#1557489 COPY_INSTEAD_OF_MOVE
cid#1557473 COPY_INSTEAD_OF_MOVE
cid#1557317 COPY_INSTEAD_OF_MOVE
cid#1557261 COPY_INSTEAD_OF_MOVE
cid#1557146 COPY_INSTEAD_OF_MOVE
cid#1557135 COPY_INSTEAD_OF_MOVE
cid#1557134 COPY_INSTEAD_OF_MOVE
cid#1557079 COPY_INSTEAD_OF_MOVE
cid#1557063 COPY_INSTEAD_OF_MOVE
cid#1557052 COPY_INSTEAD_OF_MOVE
cid#1556982 COPY_INSTEAD_OF_MOVE
cid#1556977 COPY_INSTEAD_OF_MOVE
cid#1556950 COPY_INSTEAD_OF_MOVE
cid#1556943 COPY_INSTEAD_OF_MOVE
cid#1556804 COPY_INSTEAD_OF_MOVE
cid#1556736 COPY_INSTEAD_OF_MOVE
cid#1556658 COPY_INSTEAD_OF_MOVE
cid#1556621 COPY_INSTEAD_OF_MOVE
cid#1556590 COPY_INSTEAD_OF_MOVE
cid#1556579 COPY_INSTEAD_OF_MOVE
cid#1556534 COPY_INSTEAD_OF_MOVE
cid#1556524 COPY_INSTEAD_OF_MOVE
cid#1556478 COPY_INSTEAD_OF_MOVE
cid#1556467 COPY_INSTEAD_OF_MOVE
cid#1556422 COPY_INSTEAD_OF_MOVE
cid#1556314 COPY_INSTEAD_OF_MOVE
cid#1556309 COPY_INSTEAD_OF_MOVE
cid#1556258 COPY_INSTEAD_OF_MOVE
cid#1556143 COPY_INSTEAD_OF_MOVE
cid#1556119 COPY_INSTEAD_OF_MOVE
cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1556097 COPY_INSTEAD_OF_MOVE
cid#1556039 COPY_INSTEAD_OF_MOVE
cid#1555966 COPY_INSTEAD_OF_MOVE
cid#1555948 COPY_INSTEAD_OF_MOVE
cid#1555915 COPY_INSTEAD_OF_MOVE
cid#1555836 COPY_INSTEAD_OF_MOVE
cid#1555748 COPY_INSTEAD_OF_MOVE
cid#1555644 COPY_INSTEAD_OF_MOVE
cid#1555582 COPY_INSTEAD_OF_MOVE
cid#1555478 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555409 COPY_INSTEAD_OF_MOVE
cid#1555372 COPY_INSTEAD_OF_MOVE
cid#1555334 COPY_INSTEAD_OF_MOVE
cid#1555330 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE
cid#1555257 COPY_INSTEAD_OF_MOVE
cid#1555247 COPY_INSTEAD_OF_MOVE
cid#1555147 COPY_INSTEAD_OF_MOVE
cid#1555120 COPY_INSTEAD_OF_MOVE
cid#1555059 COPY_INSTEAD_OF_MOVE
cid#1555016 COPY_INSTEAD_OF_MOVE
cid#1554880 COPY_INSTEAD_OF_MOVE
cid#1554824 COPY_INSTEAD_OF_MOVE
cid#1554808 COPY_INSTEAD_OF_MOVE
cid#1546189 COPY_INSTEAD_OF_MOVE

Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 22:39:23 +01:00
78693c376e tdf#108189 inspection of object hangs LO
There is no general solution to this that I am aware of, so just
implement a rather specific solution that will need periodic extending
to check for other dangerous properties

Change-Id: Ie09d89416fea5b7cdf782319ed9921657faa5a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176593
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-14 18:02:03 +01:00
16e3b84d2e Improve loplugin:dyncastvisibility to check for non-inline key functions
This would have caught the issue discussed in
709b1f3ddb87303a2dec6155dbe0106369c151ed "Make sure VCLXPopupMenu has unique
RTTI".  (The commit message talks about RTTI there, while what Clang actually
compared for an optimized implementation of a dynamic_cast to a final class is
vtable pointers, but the overall picture remains the same.  Both RTTI and
vtables are emitted along the key function, and if that is missing or inline,
they are emitted for each dynamic library individually, and as internal symbols
on macOS.)

This commit also addresses all the issues found by the improved
loplugin:dyncastvisibility on Linux.  See the newly added TODO in
compilerplugins/clang/dyncastvisibility.cxx and
86b86ac87ea0cc90249f156494c98c3c93e4f3fc "Give DocumentEventHolder (aka
EventHolder<DocumentEvent>) a key function" for an issue with key functions for
class template instantiations.

Change-Id: Ia19155efb1d23692c92b9c97ff17f18ae7a1f3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176576
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 12:49:22 +01:00
354dc28282 tdf#163486: PVS: Identical branches
Change-Id: Ic54a8e009f68ab992831ba849ae1349a6235bedd
V1037: Two or more case-branches perform the same actions. Check lines: 1276 and 1408, 1434 and 1510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175149
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-11-12 01:35:14 +01:00
cc70c63f8f clang-tidy: performance-unnecessary-copy-initialization in basic
Change-Id: I38bc2711bdec2bdaf998401083ff9b62a5595616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176389
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 15:46:52 +01:00
ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
cc9b55e8a8 loplugin:reftotemp in basic
Change-Id: I41385d279cc81de9b5b2e9ff55b0b5c2f40aba66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176244
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-08 08:41:06 +01:00
56f3dbffdf Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08 05:34:20 +01:00
d5b55513cd loplugin:passstuffbyref in basic
Change-Id: I1aee08f0ff2a3dabcedc49a31e7ff4de9428007e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176136
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06 15:45:14 +01:00
4f1c88bb57 Simplify a bit
Change-Id: I2e4635c660a57abefa57b046e3f0da411939cf1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175953
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-02 18:27:22 +01:00
cf14352cd8 no need to heap allocate these
Change-Id: I28127f5943a80aca1689d5982cd1f6e6e11eb2c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175863
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-01 07:27:27 +01:00
de4ef35350 tdf#163680: fix fixed-length strings assignment
Change-Id: I4aa8144df5dfb836ad0689c7855301b8b04da485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175878
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-10-31 20:46:09 +01:00
298feac9c4 No need to heap-allocate it
Change-Id: Ia6bbf6d3f5b9af2a5b52b8c6baec85bdcb579275
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175847
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-31 12:14:18 +01:00
6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
7cf8cffcb8 cid#1633347 COPY_INSTEAD_OF_MOVE
and

cid#1633346 COPY_INSTEAD_OF_MOVE
cid#1633344 COPY_INSTEAD_OF_MOVE
cid#1633343 COPY_INSTEAD_OF_MOVE
cid#1633340 COPY_INSTEAD_OF_MOVE
cid#1608137 COPY_INSTEAD_OF_MOVE
cid#1608131 COPY_INSTEAD_OF_MOVE
cid#1607860 COPY_INSTEAD_OF_MOVE
cid#1607432 COPY_INSTEAD_OF_MOVE
cid#1607394 COPY_INSTEAD_OF_MOVE
cid#1607310 COPY_INSTEAD_OF_MOVE
cid#1607156 COPY_INSTEAD_OF_MOVE
cid#1607093 COPY_INSTEAD_OF_MOVE
cid#1607090 COPY_INSTEAD_OF_MOVE
cid#1607039 COPY_INSTEAD_OF_MOVE
cid#1606709 COPY_INSTEAD_OF_MOVE
cid#1558053 COPY_INSTEAD_OF_MOVE
cid#1558052 COPY_INSTEAD_OF_MOVE
cid#1558042 COPY_INSTEAD_OF_MOVE
cid#1558038 COPY_INSTEAD_OF_MOVE
cid#1558037 COPY_INSTEAD_OF_MOVE
cid#1558034 COPY_INSTEAD_OF_MOVE
cid#1558031 COPY_INSTEAD_OF_MOVE
cid#1558027 COPY_INSTEAD_OF_MOVE
cid#1557994 COPY_INSTEAD_OF_MOVE
cid#1557977 COPY_INSTEAD_OF_MOVE
cid#1557970 COPY_INSTEAD_OF_MOVE
cid#1557966 COPY_INSTEAD_OF_MOVE
cid#1557957 COPY_INSTEAD_OF_MOVE
cid#1557954 COPY_INSTEAD_OF_MOVE
cid#1557941 COPY_INSTEAD_OF_MOVE
cid#1557933 COPY_INSTEAD_OF_MOVE
cid#1557918 COPY_INSTEAD_OF_MOVE
cid#1557907 COPY_INSTEAD_OF_MOVE
cid#1557890 COPY_INSTEAD_OF_MOVE
cid#1557883 COPY_INSTEAD_OF_MOVE
cid#1557881 COPY_INSTEAD_OF_MOVE
cid#1557861 COPY_INSTEAD_OF_MOVE
cid#1557842 COPY_INSTEAD_OF_MOVE
cid#1557840 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE

Change-Id: If5ee3396eafdb8b338d9e6cf0705be6e2b431fd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175577
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-25 10:48:12 +02:00
ee4554b0ac cid#1555259 COPY_INSTEAD_OF_MOVE
and

cid#1555264 COPY_INSTEAD_OF_MOVE
cid#1555280 COPY_INSTEAD_OF_MOVE
cid#1555303 COPY_INSTEAD_OF_MOVE
cid#1555313 COPY_INSTEAD_OF_MOVE
cid#1555314 COPY_INSTEAD_OF_MOVE
cid#1555323 COPY_INSTEAD_OF_MOVE
cid#1555333 COPY_INSTEAD_OF_MOVE
cid#1555338 COPY_INSTEAD_OF_MOVE
cid#1555349 COPY_INSTEAD_OF_MOVE
cid#1555364 COPY_INSTEAD_OF_MOVE
cid#1555379 COPY_INSTEAD_OF_MOVE
cid#1555398 COPY_INSTEAD_OF_MOVE
cid#1555410 COPY_INSTEAD_OF_MOVE
cid#1555411 COPY_INSTEAD_OF_MOVE
cid#1555416 COPY_INSTEAD_OF_MOVE
cid#1555429 COPY_INSTEAD_OF_MOVE
cid#1555434 COPY_INSTEAD_OF_MOVE
cid#1555441 COPY_INSTEAD_OF_MOVE
cid#1555446 COPY_INSTEAD_OF_MOVE
cid#1555480 COPY_INSTEAD_OF_MOVE
cid#1555490 COPY_INSTEAD_OF_MOVE
cid#1555524 COPY_INSTEAD_OF_MOVE
cid#1555527 COPY_INSTEAD_OF_MOVE
cid#1555531 COPY_INSTEAD_OF_MOVE
cid#1555578 COPY_INSTEAD_OF_MOVE
cid#1555581 COPY_INSTEAD_OF_MOVE
cid#1555591 COPY_INSTEAD_OF_MOVE
cid#1555614 COPY_INSTEAD_OF_MOVE
cid#1555619 COPY_INSTEAD_OF_MOVE
cid#1555633 COPY_INSTEAD_OF_MOVE
cid#1555654 COPY_INSTEAD_OF_MOVE
cid#1555707 COPY_INSTEAD_OF_MOVE
cid#1555712 COPY_INSTEAD_OF_MOVE
cid#1555746 COPY_INSTEAD_OF_MOVE
cid#1555763 COPY_INSTEAD_OF_MOVE

Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-22 17:53:07 +02:00
2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
8816296222 Resolves tdf#163515 - Basic Macro Organizer: After renaming a
document macro library the original library also remains

Change-Id: Ife89e1e164d288702d30e6b79f5e703ab9467e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175182
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2024-10-21 14:09:32 +02:00
c2308be747 tdf#163486: PVS: Identical branches
Change-Id: I01aae9395213eb09c8bea990b2b6a811f7ab2ee2
V1037: Two or more case-branches perform the same actions. Check lines: 1249, 1277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175150
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-19 19:52:19 +02:00
ff3791f67a tdf#163219: only create local With variable for function results
The problem is, that having a local variable referring the same value
as the original expression 'foo' is not the same as referencing 'foo'
itself. After 'foo' is re-assigned, the local variable still refers
to the original value, not the new one.

It seems impossible to implement the reference using existing codegen
primitives, to imitate the true reference to 'foo', not to its value.
If we implement it by changing the runtime, the bytecode won't work
identically in older versions; if we introduce a new bytecode, that
would be an incompatible change.

As a workaround, only create the local With variable, when the block
variable is created using some function (as much as known by parser).
I think that there would be cases when this would still not work as
intended: an example is a property implemented using getter function;
the parser would likely treat the property as a variable, and avoid
creation of the local variable; and the getter would be called every
time a dot access will happen (which was the essence of tdf#132064).
However, this seems a better alternative to the bug fixed here.

Change-Id: I50bf679762fd2e73f215a000fa0ab60fd6ae7453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174564
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-07 09:38:38 +02:00
fe40a5ca03 Simplify assignment of Nothing
In commits f3f46b5fe729876d128f63f7ab158954ab6657d7 (tdf#132064: make
With statement only evaluate its argument once, 2024-04-18) and
40d0e6f4c4ca31f6525b4c84924f2330a166182c (tdf#162962: always create a
local "Nothing" for the "WITH" variable, 2024-09-16), I used hacks to
emulate the global Nothing.

This change implements it properly, I think, It makes sure to use the
RTL's Nothing; this saves compile-time checks, strings in pool, and
makes code cleaner.

Change-Id: I3d007c5aa187e9aa61c1c369511be969b8cf57f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174553
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-10-06 16:40:42 +02:00
f65b204942 no need to do UNO_QUERY here
Change-Id: I52d13a7e4806d8fc34c4ff6f4cc5ab1e785a8b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173729
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-20 19:12:27 +02:00
4506cd04c7 tdf#162431 - Check for missing parameters
Don't silently convert missing parameters including their error code to the request target typen when the target type can't handle the conversion.

Change-Id: I2300aa594ae3cc1045a6397c1195718b6662aa61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172593
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2024-09-20 16:56:34 +02:00
c54b8e5682 Avoid -Werror,-Wunused-function
Change-Id: I95ca13db07a778fc260cbb78364916cc7400e378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173590
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-18 20:12:09 +02:00
f48c9d59cc use more concrete UNO in basic
Change-Id: I6606008d9b45e00295cf441a7321a677d62317f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173581
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-09-18 15:02:58 +02:00
539856dbb7 Fix formatting of dates
Redression after commit 81e1e0a2a671f19950c1bd3c69f9aa24b0c562e7
(Refactor SbxValue::Format, 2024-09-13).

Change-Id: Ie7eb50c32f3c1a3aec73fc882dc33cce42734747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173449
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-17 05:55:13 +02:00
71ea7520eb Related: i#109051 There's no "Exit Let/Get/Set"
Before, these incorrect combinations were allowed, together with
the correct "Exit Property", which had been implemented in commit
5ed103d2dd5f8ee2f13183263c0930f84437bdc7 (mib16: contributed
bugfixes and various new symbols in VBA compatibility
implementation, 2010-06-15).

Change-Id: Ic132c0860bb04007766977975a6ce9c8887138dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173427
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-17 05:54:24 +02:00
196c89fc9d i#109051: also handle Exit Property for Property Set
An omission from commit 5ed103d2dd5f8ee2f13183263c0930f84437bdc7
(mib16: contributed bugfixes and various new symbols in VBA
compatibility implementation, 2010-06-15)

Change-Id: I1e08406eb1dcb64eeef5d925d22475f1b9f74de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173426
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-17 05:54:15 +02:00
40d0e6f4c4 tdf#162962: always create a local "Nothing" for the "WITH" variable
Other "WITH" blocks create the symbol that can be found by pPool->Find,
but can be not accessible at the call site.

Change-Id: I85ecc763a1bb3fd692c2c98e674047fdbde3f8f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173417
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-16 12:58:52 +02:00
47a348bb0f tdf#162935: use PUTC for WITH variable assignment: it doesn't copy value
SbiRuntime::StepPUT, SbiRuntime::StepSET, SbiRuntime::StepVBASET call
checkUnoStructCopy eventually, which copies the UNO struct by value.
This is not what we need. On the other hand, SbiRuntime::StepPUTC only
makes the by-ref assignment, and makes the reference const; but Basic
code never assigns anything to the internal variable itself, only to
its members.

I hope that this time, I get it right.

Change-Id: I2b4a51a2dca9e7106e14e03360ef0d5a50b60079
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173305
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-13 01:55:07 +02:00
81e1e0a2a6 Refactor SbxValue::Format
Change-Id: I1a55f2c6148246733699c1ff1086436af9d450b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173254
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-13 00:23:09 +02:00