summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)AuthorFilesLines
3 daysWaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara2-6/+8
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
3 daysuse more OUString literal in getBasicTypeNameNoel Grandin1-41/+41
Change-Id: I6e307e4387cbecac6391000b9ca7e632b2152b24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166979 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
8 daysUse Windows dllmgr-x64 also for aarch64Stephan Bergmann3-4/+4
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
12 daystdf#93727 Syntax Error on # in basicLuv Sharma2-7/+83
Change-Id: I400a4061de580a5c91b0e4763cad40ae88a9f738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162639 Tested-by: Jenkins Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2024-04-09tdf#147132 Flatten Basic function implementationsTuukka Orava1-97/+81
Change-Id: I077e042c82cbefd1d46db5ca8d5983a0870a296c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165903 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-08tdf#147132 Flatten Basic function implementationsAmandaQuaresmaCoutinho1-27/+15
Change-Id: Ife7a94cdfa8b31ba2a2bcbdf28c9620bbc5348ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165641 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-03Simplify VBALikeToRegexp a bitMike Kaganski1-65/+30
This cleans up some unnecessary escaping both inside and outside [] groups. Change-Id: I5abcf0fce634f0d8809bf4d318f61b8c8f69a318 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165703 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-02tdf#160478: fix Basic LIKE operatorMike Kaganski3-16/+41
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>
2024-04-02tdf#146619 Drop unused 'using namespace' in: basic/Gabor Kelemen7-9/+0
Change-Id: I55bd0c89880dd97307dde5a5b670e63f3ea66355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165536 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-29convert NameContainer to comphelper::WeakImplHelperNoel Grandin2-22/+31
Change-Id: If89ee5bf200affc04704b7f075f25cbf599c1e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-27tdf#147132: Flatten Basic function implementationsU-Aarons_Laptop\Aaron1-73/+47
Change-Id: I9fcbc87b7ce01d96ffb45ddd3a525831c7cdcdaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165357 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-03-11basic : use OUstring literal for XServiceInfo implementationArnaud VERSINI2-6/+6
Change-Id: Ic4501ec887bb3f1249ab4a8da1eae07f6b2a22ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164305 Tested-by: Jenkins Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-03-11Use weak reference to SfxObjectShell in SfxEventHint to avoid use-after-freeMike Kaganski3-11/+11
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>
2024-02-28tdf#149714 BitsPerPixel property of Graphic has Boolean UNO typeAdam Seskunas3-0/+87
- vcl change UNO type of UnoGraphicProperty::BitsPerPixel to sal_Int8 instead of sal_uInt8 which maps to BOOLEAN causing Basic to convert non-0 values to True - basic add CppUnitTest since thats where the problem was occuring Change-Id: I0111199151fb5e001b6362e1359ad90bb039f064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163899 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-27Simplify a bitMike Kaganski1-2/+2
Change-Id: Id9640825e117531ed1b67db9e83349c556f291c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164004 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-27Typo: alredy->alreadyJulien Nabet1-1/+1
Change-Id: I67fa846c71cf91563c3457cec98195b1886e3fa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164025 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-27tdf#159908: return early to avoid nullptr dereferenceMike Kaganski1-0/+5
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>
2024-02-23Fix warning C4312 when building with MSVC without -Wv:18Mike Kaganski1-1/+1
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/sw/source/ui/dbui/addresslistdialog.cxx(426): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size Change-Id: Idbfbe8add89c8e219bdabcf28b741e2e31a5e345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163781 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23Fix warning C4459 when building with MSVC without -Wv:18Mike Kaganski1-10/+10
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/oox/source/export/shapes.cxx(2411): warning C4459: declaration of 'XML_line' hides global declaration Change-Id: I74738753254ad1c468025d25bfb0bfe21787180f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163779 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23Fix warning C4589 when building with MSVC without -Wv:18Mike Kaganski1-5/+1
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>
2024-02-17tdf#158890 Replace '?' with figure blankLaurent Balland1-1/+2
...instead of regular blank Do not modify other blanks (thousand separator, fraction separator) Change-Id: I82f8023a4e55d8091545191dee55a88aba25dbdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161737 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2024-02-13tdf#154285 Check upper bound of arguments in SbRtl_CurDirAdam Seskunas1-0/+3
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
2024-02-09tdf#147132 tdf#154285 basic: Flatten and check param count of Is* fnsAron Budea1-109/+81
Change-Id: I6d27dd49613a5cc26f4244dadc9bdd65361a0475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162657 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2024-01-31Related: tdf#159458 Move variable URL re-creation to a central placeMike Kaganski1-12/+10
Change-Id: Ib73ae476f308b2579a15c9b2474a55e3558c134c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162786 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-31tdf#159458: make sure to update unexpanded URL when renaming libraryMike Kaganski1-4/+23
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>
2024-01-12cid#1545535 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1545526 COPY_INSTEAD_OF_MOVE cid#1545442 COPY_INSTEAD_OF_MOVE cid#1545426 COPY_INSTEAD_OF_MOVE cid#1545425 COPY_INSTEAD_OF_MOVE cid#1545387 COPY_INSTEAD_OF_MOVE cid#1545379 COPY_INSTEAD_OF_MOVE cid#1545337 COPY_INSTEAD_OF_MOVE cid#1545334 COPY_INSTEAD_OF_MOVE cid#1545289 COPY_INSTEAD_OF_MOVE cid#1545282 COPY_INSTEAD_OF_MOVE cid#1545270 COPY_INSTEAD_OF_MOVE cid#1545237 COPY_INSTEAD_OF_MOVE Change-Id: Iae44a7347c85ae2e367bf672214b2013f30466f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161968 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-29ofz#65329 Fuzzing build failureCaolán McNamara2-4/+11
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>
2023-12-23tdf#128122 Updated BASIC CCur to reuse SvNumberFormatterJonathan Clark4-61/+162
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>
2023-12-19cid#1557601 COPY_INSTEAD_OF_MOVECaolán McNamara2-5/+3
and cid#1546498 COPY_INSTEAD_OF_MOVE cid#1546384 COPY_INSTEAD_OF_MOVE cid#1546376 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546373 COPY_INSTEAD_OF_MOVE cid#1546368 COPY_INSTEAD_OF_MOVE cid#1546365 COPY_INSTEAD_OF_MOVE cid#1546356 COPY_INSTEAD_OF_MOVE cid#1546340 COPY_INSTEAD_OF_MOVE cid#1546266 COPY_INSTEAD_OF_MOVE cid#1546236 COPY_INSTEAD_OF_MOVE cid#1546188 COPY_INSTEAD_OF_MOVE cid#1546178 COPY_INSTEAD_OF_MOVE cid#1546166 COPY_INSTEAD_OF_MOVE cid#1546156 COPY_INSTEAD_OF_MOVE cid#1546144 COPY_INSTEAD_OF_MOVE cid#1546143 COPY_INSTEAD_OF_MOVE cid#1546100 COPY_INSTEAD_OF_MOVE cid#1546078 COPY_INSTEAD_OF_MOVE cid#1546041 COPY_INSTEAD_OF_MOVE cid#1546036 COPY_INSTEAD_OF_MOVE cid#1546033 COPY_INSTEAD_OF_MOVE Change-Id: Ib3586d93198992e206baf5c2de5a663d5574aa3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-16cid#1545970 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545957 COPY_INSTEAD_OF_MOVE cid#1545944 COPY_INSTEAD_OF_MOVE cid#1545939 COPY_INSTEAD_OF_MOVE cid#1545931 COPY_INSTEAD_OF_MOVE cid#1545926 COPY_INSTEAD_OF_MOVE cid#1545909 COPY_INSTEAD_OF_MOVE cid#1545899 COPY_INSTEAD_OF_MOVE cid#1545896 COPY_INSTEAD_OF_MOVE cid#1545894 COPY_INSTEAD_OF_MOVE cid#1545858 COPY_INSTEAD_OF_MOVE cid#1545823 COPY_INSTEAD_OF_MOVE cid#1545820 COPY_INSTEAD_OF_MOVE cid#1545819 COPY_INSTEAD_OF_MOVE cid#1545772 COPY_INSTEAD_OF_MOVE cid#1545749 COPY_INSTEAD_OF_MOVE cid#1545743 COPY_INSTEAD_OF_MOVE cid#1545739 COPY_INSTEAD_OF_MOVE cid#1545635 COPY_INSTEAD_OF_MOVE cid#1545603 COPY_INSTEAD_OF_MOVE cid#1545602 COPY_INSTEAD_OF_MOVE cid#1545592 COPY_INSTEAD_OF_MOVE cid#1545544 COPY_INSTEAD_OF_MOVE cid#1545532 COPY_INSTEAD_OF_MOVE cid#1545520 COPY_INSTEAD_OF_MOVE cid#1545512 COPY_INSTEAD_OF_MOVE cid#1545490 COPY_INSTEAD_OF_MOVE cid#1545483 COPY_INSTEAD_OF_MOVE cid#1545467 COPY_INSTEAD_OF_MOVE cid#1545461 COPY_INSTEAD_OF_MOVE cid#1545458 COPY_INSTEAD_OF_MOVE cid#1545428 COPY_INSTEAD_OF_MOVE cid#1545394 COPY_INSTEAD_OF_MOVE cid#1545385 COPY_INSTEAD_OF_MOVE cid#1545383 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545357 COPY_INSTEAD_OF_MOVE Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-13loplugin:unusedfieldsNoel Grandin1-12/+10
The sPassword field in SvtHistoryOptions became redundant after commit c0fffdc36df687fe8e4eff49e5a00d3a3c1eb370 Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Date: Mon Oct 2 12:35:21 2023 +0200 [API CHANGE] Remove deprecated Password config item Change-Id: Ie0c4597da5cd510f405400c215110c1e357cb497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-11Clean up SvStream API a bitMike Kaganski2-2/+3
Change-Id: Ic9847185e8f551eeb05715902374d7a9a9032f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160546 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-09cid#1556778 COPY_INSTEAD_OF_MOVECaolán McNamara1-5/+4
and cid#1546474 COPY_INSTEAD_OF_MOVE cid#1546473 COPY_INSTEAD_OF_MOVE cid#1546469 COPY_INSTEAD_OF_MOVE cid#1546467 COPY_INSTEAD_OF_MOVE cid#1546458 COPY_INSTEAD_OF_MOVE cid#1546448 COPY_INSTEAD_OF_MOVE cid#1546446 COPY_INSTEAD_OF_MOVE cid#1546441 COPY_INSTEAD_OF_MOVE cid#1546424 COPY_INSTEAD_OF_MOVE cid#1546377 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546352 COPY_INSTEAD_OF_MOVE cid#1546334 COPY_INSTEAD_OF_MOVE cid#1546328 COPY_INSTEAD_OF_MOVE cid#1546310 COPY_INSTEAD_OF_MOVE cid#1546303 COPY_INSTEAD_OF_MOVE Change-Id: I8a43fdd574857ba1d3ec416f23c8269a9a08e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160515 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-20Extended loplugin:ostr: basicStephan Bergmann1-2/+2
Change-Id: I041913b1fe2722145d770e5cdcf90cdf22957873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159728 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-18c++20: use std::erase instead of std::removed followed by erase (part 1)Julien Nabet1-1/+1
Change-Id: I8d038fc37a4de25bdeff2e2cc55775e3981240b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159610 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-10loplugin:fieldcast in ModuleSizeExceededNoel Grandin1-12/+2
Change-Id: I1903967d94fcd738b9e2ed8de9a19d42614a749e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in SbModuleNoel Grandin1-1/+1
Change-Id: I92084a1cf31832404aca43f0c8e2137a33978976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-01tdf#156449 Preserve '0' or '?' in exponentLaurent Balland1-1/+1
Exponent in scientific number may use '?' as blank like in format "0.00E+?0" This change: - adds interpreatation of '0' and '?' in exponent - adds "blank-exponent-digits" attribute to scientific number for import and export to ODF - prevents using exponent with only '?'. There must be at least one '0' in exponent - adds QA test of such format and test import/export/import to ODF and OOXML - corrects one basic test Change-Id: If52edc632a161f842270bb2fd77af535e2b978d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154986 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann1-1/+1
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: basicStephan Bergmann8-28/+28
Change-Id: Ic82e02ff43db09174a74f4e584e2ce50e8983556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158145 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Suppress some upcoming loplugin:ostr OUStringLiteral -> OUString rewritesStephan Bergmann1-0/+4
...which would not work, as calling constexpr SbxVariable::MakeHashCode on those vars would no longer be constant expressions Change-Id: Ib848a6405dc270a1a5b9a92084fa2d063ea37892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158134 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann1-20/+20
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-13tdf#147132 tdf#154285 Flatten and check param count of IsMissing fnAron Budea1-9/+5
Change-Id: I17d79dcedf2b2e1cd45ef2eb82ff5e89a9bb2b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155028 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann2-2/+2
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07tdf#147132 Flatten Basic function implementationsOmkarAcharekar1-16/+8
Change-Id: I91ab40003011a7c537faa40daf3db85a13946c69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157669 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin6-32/+34
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-20basic : remove useless allocation in BasicDLLImplArnaud Versini1-5/+4
Change-Id: I8e2628da08cb621087915dcfb4d55ddacfeaabc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10using decls should come after #includeNoel Grandin2-9/+7
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-03Revert "tdf#130924 replace '*printf' with 'SAL_*' logging macros."Ilmari Lauhakangas3-12/+14
My mistake, did not notice https://bugs.documentfoundation.org/show_bug.cgi?id=130924#c5 We shouldn't hide test output. This reverts commit df0db4132428e95d276e923d8d5fb603dbb7f7bb. Change-Id: Ieac40effb57333322f8db8ead093a83765d17a09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156479 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-08-31tdf#130924 replace '*printf' with 'SAL_*' logging macros.sahil3-14/+12
Change-Id: I5bb4052ded82c355f7d71e4f38ebdefe3fcc25da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156283 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>