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>
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>
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>
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>
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>
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>
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>
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
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>
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
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>
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
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
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>
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>
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>
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>