Commit Graph
4769 Commits
Author SHA1 Message Date
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Xisco Fauli 8a91868e21 drop JSDialog machinery
It's no longer needed and not used internally

Change-Id: Iecb0d1055fd6c61d0c34ffb8afc670ab9d5fe899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205908
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:18 +02:00
AsmatZahra-code d5e4e449d2 return early on invalid input to avoid calculating discarded value
Change-Id: I7391c4f24c39c9c8215225ba08054a33096801ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205585
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-28 10:45:28 +02:00
Furkan Ahmet Kara 49d827b374 tdf#147132: Flatten Basic function implementations in methods1.cxx
Change-Id: I1107266b6a7b33ee3a9a0d69d850bf5b4c203692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204798
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-28 10:11:35 +02:00
Michael Weghorn 336f70f966 weld: Move weld::Label to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ide86f35543468a88288a068cc9f89eaf381ac52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205763
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-27 22:24:37 +02:00
alohapeakina d21d64fc84 tdf#147132 Flatten basic function implementations
Change-Id: I517d188ec029b7ec6e6921f437a8915f8a6c9562
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205376
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-20 09:38:28 +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
Andreas Heinisch d6954bfec1 tdf#143706 - Mark skipped named optional parameters as missing/empty
When calling a Basic procedure using a named argument (for example,
foo(y:=10)), optional skipped parameters were not correctly marked as
missing, causing the function IsMissing() to return incorrect results.

Change-Id: I90a9910165ec00a24deba86f7b3397dbc0720c93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205034
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-05-12 22:40:13 +02:00
Arnaud VERSINI c9d878efcb [basic] Use more constexpr
Change-Id: I79fc5736f0468e4e4c05188a2504d836de0a9781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204721
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2026-05-04 12:37:10 +02:00
bl4ze4447 c15d89a0a6 tdf#166673 Fix Space(-1) behaviour
Change-Id: I3ea3a538dec449f752ca17122091b410221b7fe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203225
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-22 17:46:30 +02:00
Noel Grandin e77b23fa1c Fraction->double in MapMode
Change-Id: I865fe1c2b0377eebda6f9f19e163928cbe7c9056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202631
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-26 13:23:37 +01:00
Simon Chenery 356e1beec2 tdf#154285 Check too many arguments to BASIC FILELEN function
Change-Id: I21704e84bed54ad4295d52d82eb4a92ff70a3abc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201298
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-10 07:47:06 +01:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Noel Grandin d235ca3589 SvStream::ReadUniOrByteString should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: I5b015f12f141a89b176c5a22aeecc4336f0b8f13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:48:47 +01:00
Mike Kaganski 55b9d8607b "CharSet" -> "Encoding" in SvStream
Use the correct term. E.g., Unicode charset has different encodings
like UTF-8 and UTF-16, and we mean encoding here.

Change-Id: I65e90b31cda6e39fdb1584b492e6e0b9821865a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-25 10:33:55 +01:00
Michael Weghorn fbcfd00fb7 weld: Move weld::Dialog to own header/source
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ic47dac553fc065c5c9cddbf31e33012314dbe43d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199073
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-02-11 07:32:57 +01:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-02-11 07:32:45 +01:00
shark eebf036039 tdf#147132 Flatten Basic function implementations
Change-Id: Iae6ec1b9cd524d666dd1076c61fe8d5af2a2189e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198249
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-07 12:33:45 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Gabor Kelemen f8dad0daf9 tdf#146619 Use more forward declarations in include/vcl/svapp.hxx
this was skipped in previous runs, since it contains some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

Change-Id: If1e3e3c7c0fc14ed6e8b51174a0e7f1220fdbc8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197496
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-25 13:31:57 +01:00
kelvin add78db05f tdf#145759 - basic: Replace buffer size magic number with constant
Replace magic number 1024 with DEFAULT_STREAM_BUFFER_SIZE in basmgr.cxx
to make the code more readable and maintainable. The constant clearly
indicates the purpose of this buffer size value.

Change-Id: Ic307c55e2eac563200951c373a0ca545db0a9e7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193382
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-01-24 00:03:04 +01:00
Stephan Bergmann 56a43e0966 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In member function ‘virtual void SbModule::SetParent(SbxObject*)’,
>     inlined from ‘virtual SbxVariable* SbModule::Find(const rtl::OUString&, SbxClassType)’ at basic/source/classes/sbxmod.cxx:653:36:
> basic/source/classes/sbxmod.cxx:671:13: error: array subscript ‘SbModule[0]’ is partly outside array bounds of ‘unsigned char [152]’ [-Werror=array-bounds=]
>   671 |     pParent = p;
>       |     ~~~~~~~~^~~
> basic/source/classes/sbxmod.cxx: In member function ‘virtual SbxVariable* SbModule::Find(const rtl::OUString&, SbxClassType)’:
> basic/source/classes/sbxmod.cxx:651:55: note: object of size 152 allocated by ‘operator new’
>   651 |                     pRes = new SbxVariable( SbxOBJECT );
>       |                                                       ^

Change-Id: I0823b28063b6e224f9cc28aee55fd21e2f21aa1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197833
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:48:32 +01:00
Simon Chenery 58da9d878d tdf#154285 Check too many arguments to BASIC INT function
Change-Id: Ia0d71efc326fcfad13bc8edc9d15d5ef491db265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197702
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-01-21 08:25:45 +01:00
Gabor Kelemen 47fe1cce1b tdf#146619 Use more forward declarations in include/vcl/[h-p]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[n-p]*

Change-Id: If6436f3ef8300693c3869c2521e2fa2aa8a4edc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196397
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-14 10:19:31 +01:00
Gabor Kelemen b63115f3fa tdf#146619 Use more forward declarations in include/vcl/[d-g]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[d-g]*

This shaves off about 150M input

Change-Id: I2b15257451d4b392dca3e5d07f4a443ee653b04c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196395
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-11 21:38:37 +01:00
Michael Weghorn ffc8326e99 weld: Move weld::Entry to own header/source
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I27033905fe8be1c3646c8cf08799c9bf53eeb471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196448
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-01-04 15:03:39 +01:00
Tejas Shukla 0ba7e16543 tdf#147132 Flatten Basic function implementations
Change-Id: I076e21eb71a636093b51280356d5fc2e58d327ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196245
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-28 11:42:04 +01:00
Mike Kaganski 8e23c94043 Drop a convenience function used only once
Change-Id: If49b4dc658e953e86d87a76300a9517d6bb896b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196042
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-21 14:44:22 +01:00
Simon Chenery 74d678191a tdf#168771 Convert enum to enum class in methods1.cxx
Change-Id: I7f9894db5ce74ca507ad05967a08dd7fab6ad33d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195608
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2025-12-20 17:30:10 +01:00
Michael Weghorn 5454b7ed94 weld: Move weld::DialogController and subclasses to own header/source
This is also in preparation of moving weld::Builder to
its own header.

Change-Id: Icb65ee85376d17e1abead2c6339f78b129112d0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195841
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-12-18 19:44:41 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
Vaibhav Singh a47949fece tdf#154285 Check upper bound of arguments in implChr function
Change-Id: I081ff9874b4fc00ff791cb5ae9ce5a27a6d6778c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195731
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-12-17 11:50:04 +01:00
Vaibhav Singh 0e6c78dcd6 tdf#154285 Check upper bound of arguments in SbRtl_CreateObject
function

Change-Id: I64ada278c0ba8d178f62f28c4e4e9911ce3f5d1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195732
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-12-17 09:27:11 +01:00
Mike Kaganski 7b04ef05cd Drop some uses Sequence::getConstArray
Similar to commit b280efcb9b
(Drop some uses Sequence::getConstArray, 2025-12-07).

Change-Id: Ieac325a660fe64e8172c5ed139380caa3d26a73c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195200
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-08 10:00:21 +01:00
Simon Chenery 01d31536b5 tdf#154285 Check too many arguments to BASIC EXP function
Change-Id: I9963267c9b910a2a2346e27e7c8cb4220c0ab964
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195205
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-12-08 05:16:29 +01:00
Stephan Bergmann 1fc95f3bfa !HAVE_FEATURE_SCRIPTING apparently needs SbiRuntime::isVBAEnabled now
...after 76aafa18b7 "tdf#162711 - VBASupport
requires banker’s rounding for integer conversions", as linking started to fail
with

> wasm-ld: error: /home/sberg/lo-wasm-upstream/core/instdir/program/libsblo.a(sbxint.o): undefined symbol: SbiRuntime::isVBAEnabled()

Change-Id: I579f300390eabfefd5f02c277771d5f8c937105c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194734
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-11-28 00:12:07 +01:00
Andreas Heinisch 76aafa18b7 tdf#162711 - VBASupport requires banker’s rounding for integer conversions
Change-Id: Ife3f7aae3ba094fe83a5eda6b3d50d9358cc1184
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194286
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2025-11-24 20:42:41 +01:00
Daniel Lee 96ad8c680c tdf#82580 Remove prewin.h/postwin.h headers
Change-Id: Ic15376d38ad8dc5ede3bbb90c9021c5d4496b5d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194297
Tested-by: Jenkins
Reviewed-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-24 00:23:03 +01:00
Simon Chenery aa886d1e3e tdf#154285 Check too many arguments to BASIC ATN function
Change-Id: I521b62358ad810f778c96c90c48ff8a9fe2a3ae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194224
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-20 06:12:31 +01:00
Ludwig Temmel 5d8fe7fbc7 tdf#147132 Flatten Basic function implementations
Flattened SbRtl_FileExists()

Change-Id: I5e635d5c05ad7b4f1497530f075e580935870608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194081
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-17 05:21:28 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
kelvin c6c9d9e393 tdf#145538 Convert iterator loop to range-based for loop
Replace traditional SbxParams::const_iterator loop with modern range-based
for loop in SbxVariable::GetName() for better readability and modern C++
style while preserving the comma-separation logic between parameters.

Change-Id: Ib978b29b70bf6a0a85bf94be1a3dd67fea45529d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193379
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-05 18:04:20 +01:00
Mike Kaganski 3ab2560526 tdf#169147: handle errors creating icu::RegexMatcher
Regression after commit 38f731ff67
(tdf#160478: fix Basic LIKE operator, 2024-04-02).

Change-Id: I4fae01e56cb91d54adba54c3787f576f60f8b1f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193202
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-10-30 18:18:57 +01:00
Sergey Anisimov e789e9135d tdf#145614 - Convert #define to enum or constexpr
Change-Id: I8b08c068b096a19febf88d70a23959e572b96640
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191982
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2025-10-30 14:16:40 +01:00
Jesus Solis 21ffeffaf6 tdf#154285 check for too many arguments in BASIC cos function
Change-Id: I3d4e1b059e5a8d4223b476df1805ed38d2e653be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192420
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-15 08:18:28 +02:00
Sergey Anisimov 520d75f9d2 tdf#158237 - Use C++20 contains() instead of find() and end()
Change-Id: I2f8497f20acd72653530d60fec738dcbd4b1af10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192318
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-10-15 00:44:52 +02:00
Mike Kaganski af599940e3 Get rid of some unneeded intermediate variables.
The "is p equal to pDeletedBasic" check doesn't need a dynamic cast
to StarBASIC*.

Change-Id: I13bee0791d95f045beacad11b0d97e6fd616d636
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192112
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-09 22:06:39 +02:00
Mike Kaganski e16910adad SbModule: [GS]etSource32 -> [GS]etSource
The *32 methods were initially introduced in a series of "Basic Modules > 64K"
commits (2003), in addition to the pre-existing [GS]etSource methods. Then, in
commits d41b8ac9e5 (callcatcher: shave off a few
more, 2015-02-02) and 919375354c (GetSource32
and GetSource are identical, 2019-12-09), the original methods were dropped.
Now the '32' suffix to the methods makes no sense.

Change-Id: I9dc172ce973b1b49511518f184d174ea68227cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192086
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-09 22:06:25 +02:00
Mike Kaganski 79a2e1d861 tdf#168750: Make sure that class module is recognized on load
The problem appeared, when a macro loaded a library with a class module,
that had a public element (e.g., a function) with the same name, as used
for a local variable in the macro without a prior DIM.

Normally, there is a precaution in SbModule::Find, which hides the names
in class modules. However, this precaution failed during load.

The reason was, that the flag identifying the module as a class module
was set only when the module got compiled. It turned out, that first, it
is parsed in SbModule::SetSource32 only partially, with minimal work to
recognize the names (and a few other small things). At this stage, it is
not marked as class module yet; and when the clashing name is looked up,
it gets found in the module. Then its value is requested; at this point,
the module gets compiled, and the "class module" flag is set; then, if
the class module element tries to use another name from the same module,
it fails, which produces visible error message.

This change makes sure, that the initial fast parse stage also checks
Option ClassModule, to set it properly. Also it drops redundant variable
bIsProxyModule from SbModule, because mnType already contains the needed
type information. And lastly, it reorders SbModule::Find a bit, to avoid
searching a module, only to discard the result immediately, because it's
a class module.

Change-Id: I8add9873bf31fb767b64d27a36aef8e3a89a0de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-10-09 05:57:56 +02:00
Caolán McNamara 41a20e67c8 cid#1421169 Uncaught exception
and

cid#1421161 Uncaught exception
cid#1421146 Uncaught exception
cid#1421145 Uncaught exception
cid#1421100 Uncaught exception
cid#1659879 Uncaught exception

Change-Id: Ib117e8f2de0d51189d7277d3eec8a1ed685f0724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-06 11:22:08 +02:00