summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)AuthorFilesLines
2023-08-18use more Reference::query instead of UNO_QUERY_THROWNoel Grandin1-8/+1
since querying with exceptions is consideably more expensive Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-30Log SSL default verification path for mailmerge debugThorsten Behrens1-0/+8
related: follow python recommendation and pass SSL contexts Change-Id: I992535a7fbe0bd21ff1de8241715babc0cb5cdc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155050 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-07-29follow python recommendation and pass SSL contextsCaolán McNamara1-5/+5
i.e. https://docs.python.org/3/library/ssl.html#security-considerations Change-Id: I67a0f9e1c25abc6644412b014f30933a7e681da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155016 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-04-30Use getXWeak in scriptingMike Kaganski4-5/+5
Change-Id: I4370c0bfaa75b150bd05f03a5961e7152ac41e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150864 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-18Avoid NullPointerExceptionStephan Bergmann1-3/+5
...when dispose is called without a preceding call to initialize (as would happen with an improved CppunitTest_services) Change-Id: Ic632d736ecb27509b092ef526cf0dfc964023663 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin1-4/+2
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-20Fix some errors in the scripting module's XInputStreamImpl:Damjan Jovanovic1-3/+9
- Check the loop termination in readBytes() properly: currently it increments totalBytesRead while also decrementing nBytesToRead, so when compared to each other, the loop terminates when the buffer is half full. Only check for nBytesToRead instead. - Deal with the possibility of available() returning 0 in readSomeBytes(). Patch by: me Cherry-picked from https://github.com/apache/openoffice/commit/7e29bacc90c4b1b9788c3b71dfacd17daecde7a7 "Fix some errors in the scripting module's XInputStreamImpl:" Change-Id: I951dc10565afa3519b0ddf98de559a7b585b1627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149156 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-02-13Fix/simplify some vnd.sun.star.expand: handlingMike Kaganski1-3/+2
The vnd.sun.star.expand: payload must be URL-decoded prior to passing it to expandMacros; the protocol must be checked case-insensitively. Use startsWithIgnoreAsciiCase for that. Change-Id: I2be993a0400a27cb7dc57207cd0824b4505afd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146855 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-12tdf#153571: properly unquote (URL-decode) vnd.sun.star.expand payloadMike Kaganski1-2/+3
Similar to what is done in bootstrap_expandUri, expandUnoRcUrl, UrlReference::expand, JavaLoader.expand_url, and is documented in XVndSunStarExpandUrl interface. Change-Id: I65349b52734f212e6a04e615d39fa2563f62d472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146840 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-12-16check SfxObjectShell::Current()Caolán McNamara1-2/+1
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22loplugin:unusedfieldsNoel Grandin1-5/+3
Change-Id: I4a7276ffc36b4f954fe1fa39fb5666fa184e66e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-22use more TempFileFastService in scriptingNoel Grandin2-27/+16
Change-Id: Ic04abad55e655fa0e0434bd09f797c6f1b2cc245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-17use more string_viewNoel Grandin2-17/+18
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-07tdf#151076 Create callable Python script using InsertTextRafael Lima1-0/+7
As reported by the user, if you go to Tools - Macro - Run Macro and select the InsertText macro (under Application Macros), you'll get an error. The reason for this is that the InsertText macro is not meant to be called from the Macro Selector since it requires 1 positional argument. Therefore, this patch creates a simple callable Python macro that uses the InsertText funcion, so that this error message no longer happens. Change-Id: I63f766795bda2d2ae1b95a7c0d8110f41f9fbea2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140384 Tested-by: Jenkins Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann7-7/+7
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-23clang-tidy modernize-pass-by-value in scriptingNoel Grandin11-30/+37
Change-Id: I95e2a391a984905cac5cbf3f1bb640e1157fafd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10LanguageTool Grammar Checker implementationMert Tumer1-0/+1
Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135178 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-06-10new loplugin:moveitNoel Grandin1-2/+2
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31tdf#145527 Revert "Related tdf#116767: Call URLClassLoader.close"Stephan Bergmann2-52/+43
This reverts commit 418533f0af7cd303d559c8fb136c49e7e9fb0d79. Turned out that closing the given URLClassLoader once the script's main class has been loaded prevents the script from loading further classes located next to that main class. So abandon the Coverity suggestion that such class loaders should be closed promptly to avoid resource leaks. Change-Id: I1bcf83117836cfe317eac9850d413f2c3767bd8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135158 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-20new loplugin:unnecessary lockingNoel Grandin2-4/+0
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12speed up simple use of NamedValueCollectionNoel Grandin1-2/+1
where instantiating and allocating a whole map just to extract a single key is way inefficient Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11in SetGlobalUNOConstant, only retrieve old value if we need itNoel Grandin1-1/+1
removes some unnecessary Find() work Change-Id: I6af9c4d9a043d4361fcca1a034b2025fe7c10c28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in scriptingStephan Bergmann8-13/+13
Change-Id: I611640a6fb7061fbb6a239034f75e006db075989 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133786 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-29use more string_view in INetURLObjectNoel Grandin4-10/+10
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin3-12/+12
which converts to std::string_view::substr() Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using compareToNoel Grandin1-2/+2
which converts to compare Change-Id: If03c790ea113a7caedbe89f926b29055c9ec1e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-20Remove special-casing Windows stderr handlingMike Kaganski1-79/+68
Since commit 506173a7f42f34821238a63f3f8c7362c9fae9d9 Date Mon Nov 19 13:07:20 2018 +0300 tdf#112536 related: make soffice.bin a proper console application on Win and commit ab0942240507e9be81dbe43e8d69b7f9273b124f Date Wed Jan 22 22:13:25 2020 +0300 Make unopkg.com proper launcher for unopkg.bin on Windows there *is* stderr on Windows, so we can revert commits a34c9a8065c90250f7389cdea660a49e84289098 Date Tue Aug 02 09:52:37 2011 +0100 can't use set_debuglevel under windows and a1775d69e8cccb827331c1984313d2d26ddadadb Date Tue Aug 02 09:57:59 2011 +0100 make logging less painful under windows Change-Id: I5698a69130e55094508d5ca22411e861ffeeed8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131877 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-14Recheck modules s[a-c]* with IWYUGabor Kelemen1-1/+0
See tdf#42949 for motivation Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-02-03tdf#146742 - Move the initialization code of a method to SbMethod::CallAndreas Heinisch1-5/+0
Change-Id: I516bacdcd22ed094a0e9b6e125e941f32fe88c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129238 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-01-14make comphelper::OInterfaceContainerHelper4 more threadsafeNoel Grandin2-40/+33
(*) make all the methods that require an external mutex take a std::unique_lock as a parameter, so that call sites cannot forget (*) make the forEach method drop the lock when firing listener methods, to reduce the odds of deadlock Change-Id: I0a80e3b3d1c1c03b7de4a658d31fcc2847690903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-04osl::Mutex->std::mutex in StringResourceImplNoel Grandin2-59/+39
Change-Id: I6a724976f96df43c666a783634fcda0eb4ff789c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127918 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22tdf#143582: Avoid error on clearing leftover return value of a methodMike Kaganski1-0/+3
SbxValue::Clear happens to not error out on clearing string and some other types of objects, but for the rest, it calls SbxValue::Put, and the latter errors out if not CanWrite(). The original test implemented in commit 24d24debef4cda7de702c4b470a3707f1aae3ea3 only checked string return value, so happened to miss this problem. See similar code in SbiRuntime::FindElement. Change-Id: I7c17137cc9e7ee3133ee86a9f701559df66e53b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127248 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18use more cppu::BaseMutexNoel Grandin3-14/+4
Change-Id: I679e9027f9550fefc0b4ced555f8ffb89bc9491a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127079 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann13-19/+11
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-03Fix --disable-scripting for DESKTOP buildJan-Marek Glogowski1-1/+1
Unfortunatly we cannot add --disable-scripting to sub_conf_defaults, because Java currently has no equivalent to the PYTHON_FOR_BUILD setting. Change-Id: I89938a17307a363f5de808200914940503312829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126186 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-28use more OInterfaceContainerHelper2 in scriptingNoel Grandin2-10/+6
and remove unnecessary guards, OInterfaceContainerHelper3 will already take the mutex Change-Id: I951d9e02582768c5da9a7a3cc8412381f9f7e9fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-24Fix typos and translationsAndrea Gelmini1-1/+1
Change-Id: Ic358f008e09718b6f726a55edfe3a3f78bba2942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125728 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-11-23Add more beanshell samplesSamuel Mehrbrodt13-0/+328
For Writer & Calc Change-Id: I85815acf11b750ec76d138ff8fe72cc4791e9038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125689 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin1-2/+2
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07Typo: implemnented->implementedJulien Nabet1-1/+1
Change-Id: I3171c95523408b69587aaa2bb064c750bc56c55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124809 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-30Prepare for removal of non-const operator[] from Sequence in scriptingMike Kaganski9-59/+49
Change-Id: Ia85fe6de38674c7982b0f983a798a4d99ec1fb70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124384 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-18Revert incompatible ScriptEditor changeStephan Bergmann5-59/+84
...from interface to abstract class, in 1c42afc194da2288c5a738b727952e80c323885c "Respect DisableMacrosExecution option in javascript editor". It caused 3rd- party code like ScriptProviderForooRexx.oxt to fail to install. Change-Id: I532f27fdce806e471a8551646adbb3aecf80bcee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123745 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski2-2/+2
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski5-5/+5
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01loplugin:constmethodNoel Grandin2-2/+2
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann1-1/+1
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20Make some scripts more portableIlmari Lauhakangas1-1/+1
Change-Id: Ia89059eea51ca396a7c74143625ac9a6706de198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120773 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin1-0/+1
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-04tdf#143582 - Clear return value of the method before calling itAndreas Heinisch1-0/+2
Otherwise the function keeps a copy of its return value, which may be used in an upcoming call. Change-Id: I4977c39e1ce48cfd5ab067a4df4783f10505a9ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119905 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin2-4/+4
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>