Makes them more comprehensible; uses semantic names instead of magic
numbers. Added comments to the constants that are unclear.
Change-Id: Ifcb8a0d93ce057b8af08859b87ad3af8c67479e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171443
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Add new overloads to OUString methods that have a
"OUString* rest" style parameter.
Instead return a view, which does not require allocation.
To avoid overload ambiguity, split the methods into
different variants that do not use default parameters.
Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Align the implementation of the now function in basic with the now function in calc to include the also nanoseconds. The precision is limited to milliseconds to avoid comparision inaccuracies.
Change-Id: Ia85b653898f5849f67a171749725faab976b2a8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168706
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Don't execute On expression GoSub Statement; On expression GoTo
Statement if the expression lies out of range.
Change-Id: I5c1de25918b5e812d7ec82034f8d56351374d56a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165960
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
At least, CppunitTest_basic_macros CPPUNIT_TEST_NAME=Coverage::Coverage_Iterator
(which exercises it in basic/qa/basic_coverage/test_declare_from_dll.bas)
succeeds.
Change-Id: Ife90d5b84d5fb7bb4948cfeaf48180a6929a1dff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166695
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
1. The regex must match the whole input. Thus, the ^ and $ metacharacters
must be replaced with \A and \z, which only match beginning and end of
input, not any line start / end.
2. The * and ? metacharacters of LIKE must match newline character; thus,
search flags must include UREGEX_DOTALL. To avoid changing TextSearch
implementation, I use icu::RegexMatcher directly.
The direct use of icu::RegexMatcher also allowed to simplify the code by
calling icu::RegexMatcher::matches method. This may perform better than
general-purpose utl::TextSearch::SearchForward.
Change-Id: I75776498b36f236da294462362ed5b36ed8cdf68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165700
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The events may be processed after the shell has been destroyed. This is
happening reliably after commit e2bfc34d146806a8f96be0cd2323d716f12cba4e
(Reimplement OleComponentNative_Impl to use IGlobalInterfaceTable,
2024-03-11) when controlling LibreOffice from external Java scripts; but
obviously, it could happen before as well.
Now SotObject inherits from cppu::OWeakObject, instead of SvRefBase.
Change-Id: I73a3531499a3068c801c98f40de39bdf8ad90b2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164458
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
When aLvalue is not a variable, its GetRealVar() returns nullptr.
That was dereferenced unconditionally later in the check of the
variable after NEXT.
Change-Id: Ia46f23a7e720431bf62ace998848b684aa8449e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164002
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Discovered by https://gerrit.libreoffice.org/c/core/+/163717
Like these:
C:\libcmis\inc\libcmis/document.hxx(51): warning C4589: Constructor of abstract class 'libcmis::Document' ignores initializer for virtual base class 'libcmis::Object'
C:\libcmis\inc\libcmis/document.hxx(51): note: virtual base classes are only initialized by the most-derived type
C:\libcmis\inc\libcmis/folder.hxx(58): warning C4589: Constructor of abstract class 'libcmis::Folder' ignores initializer for virtual base class 'libcmis::Object'
C:\libcmis\inc\libcmis/folder.hxx(58): note: virtual base classes are only initialized by the most-derived type
Change-Id: Icc7f94cc02796a86b47b025df69ec3db971ad11e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The LibreOffice Basic specification says CurDir should accept one
argument and in the case of a non-Windows system, ignore that argument
and simply return the current directory. So check that SbRtl_CurDir
accepts a maximum of two arguments.
Change-Id: Ia60114fac31aa4261c8251e26ef172a0370e6abc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163150
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
1. If passed new source URL is expanded (i.e., trying to expand it in
SfxLibraryContainer::checkStorageURL didn't change it), previously
aUnexpandedStorageURL was unchanged. It should be cleared - then it
will be set automatically to the URL to lib info file.
2. Try to create the "variable" path (starting with "$(USER)/basic/")
because this avoids absolute paths to the libraries, which make it
harder to move the profile.
Change-Id: Ie83ea9a32cfddf37727d238547663aeb72487ee3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
since:
commit 9cc8457abcae57c7f9de6e0fbca1fbc2a0cc9892
Date: Fri Dec 15 23:09:19 2023 -0700
tdf#128122 Updated BASIC CCur to reuse SvNumberFormatter
LibreOfficeOssFuzz.conf has --enable-ld=gold and that will just
crash on an unresolved symbol without any explanation, but building
without will give something useful, e.g.
sbxcurr.cxx:(.text._Z14ImpGetCurrencyPK9SbxValues[_Z14ImpGetCurrencyPK9SbxValues]+0x89f): undefined reference to `SbiInstance::GetNumberFormatter()'
/usr/bin/ld: sbxcurr.cxx:(.text._Z14ImpGetCurrencyPK9SbxValues[_Z14ImpGetCurrencyPK9SbxValues]+0xbf7): undefined reference to `SbiInstance::PrepareNumberFormatter(unsigned int&, unsigned int&, unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag> const*, DateOrder const*)'
Change-Id: I4b555760a609ec04fd85f7ba9c198a3d2ac712c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161294
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Previously, BASIC CCur used a custom, single-purpose currency string
parser which did not properly accommodate the user's locale setting.
This change replaces the custom parser with SvNumberFormatter, which
does correctly respect system locale.
Change-Id: I179915eb080e876e5e550dd350fdb86d7fa2bf4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160848
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>