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>
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
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>
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
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>
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>
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>
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>
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>
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>
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
I added the code that I remove here in commit
22d7827c66 (tdf#168569: support date
values in string pool, 2025-09-26), but this is section to handle
old images, after commit 3bcfb1aac1
(tdf#143707 - Change strategy to support suffix type characters,
2021-08-10) the suffixes are written in a way that is handled in
SbiImage::GetString.
Change-Id: Ia2ad05f1e146dc40686f2baf07f178331f1ff4a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191561
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Commit f45463d8e2 (tdf#93727 Support date
literals in basic, 2017-05-24) introduced correct parsing of literals
like #2025-09-26#. However, it didn't retain the value type; there was
a discussion about that in gerrit, but no solution was found, and type
was set to double.
Later, a similar problem (storing type of value in compiled image) was
fixed in commit 5eedb3beea (tdf#142460:
properly handle boolean values in string pool, 2021-06-25).
This change reuses the same method to store date type using 'd' char in
the string pool.
Change-Id: I32e8497ece1f30980ba6d4fca248687b817348f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191555
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
1. If a string is passed as argument, it is returned without any changes.
For that, SbRtl_Str checks argument type, skipping processing for string.
2. Non-negative numbers are preceded by a blank space.
That already was implemented.
3. Negative numbers are preceded by a minus sign.
That was done incorrectly - a space was added for any number.
4. Dates are converted into locale-dependent strings.
That wasn't done at all - dates were converted to strings representing
the serial date. A check is implemented SbxValue::Format, to handle this.
Additionally, Format function was improved to handle such input without
format string (taking into account that it handles strings that can be
converted to numbers differently).
Change-Id: I5ac0429950e4ea8bf69b0091502b4e6dc1f4957d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191549
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Flattens function implementations by returning early when an argument
check fails rather than using if/else blocks.
Change-Id: I5adad466e41ac95ad5bde43d758babf5932ec304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187606
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Without that, there is no code to deliver that value. The call to
SbxValue::Get will eventually get to the SbUnoObject containing a
css::bridge::oleautomation::Date in struct info; and there it will
find that the object's SbxValue points to itself, at which point,
it will error out from SbxValue::TheRealValue.
Change-Id: Ia08fb2a7b1bcd7292faf5a5719a4fad0054a3f5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190384
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
When a value is convertible to number, check if the format string
is for numbers of text (in SbxValue::Format). If the value is not
convertible to number, handle it according to the format string in
printfmtstr.
Change-Id: I6e11aeffd8dd8581ebc868762944e9d6d9393514
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190348
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>