summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2023-07-21tdf#139306 Incorrect nDecPlaces value after clampingVladislav Tarakanov
nDecPlaces clamping diap changed from +-20 to +-309 and buffer is resized for new value Change-Id: Icb2130891598cf02623bbf5bd0273edab529d124 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153815 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 9655e14663419780a74deb87f393ce11e03d0843) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154693
2023-07-10cppunittester: use a dedicated desktop on WindowsMike Kaganski
Since introduction of accessibility tests infrastructure in commit 0185ddd6d5f0324ba57b3fa36229103a6b27138e (Add infrastructure and basic tests including slight UI interaction, 2022-08-01) and the respective tests, running 'make check' on Windows produces pop-up dialogs, while these tests run. These dialogs distract, steal focus, swallow text that I type elsewhere, and may fail the tests if accidental user input interferes with what the tests check. This commit creates a dedicated system desktop for cppunittests, which would be isolated from the active desktop, yet allow creation of windows, thus not preventing accessibility testing. This way, it workarounds unavailability of svp vcl plugin on Windows. Change-Id: I83db54c82bfe98d14171355cc19cdd5767549fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154194 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 1f24d35033c2f02335ce254bbcf6ba89e1b7565e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154189 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-06-02tdf#145538,tdf#147021: qa: range based loopsDr. David Alan Gilbert
A bunch of range based loop changes in various qa sections that also take out about 1% of SAL_N_ELEMENTS Change-Id: I8ef000e9aa400cd8363b48f6175f6ab258cefbd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152422 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-07Revert a thinko from commit 876010cbc4584249e919c694b8b977fd4e83084eMike Kaganski
Indeed, the cDecSeparator and cGroupSeparator require that the buffer uses the proper character type, otherwise it won't be possible to use Unicode separators in rtl_math_doubleToUString. Change-Id: Id26bed72776475c1be5b092e3ffcff0e75ffe557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-06update loplugin:stringview* for o3tl::iterateCodePointsNoel Grandin
And change o3tl::iterateCodePoints to use sal_Int32 for its second param, to integrate better with places where the parameter comes from an UNO API, which cannot use std::size_t Change-Id: I7b9dd2c9bc7f48e6c4a912f039f1b5dae7beae69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151421 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-06Simplify rtl_(u)string_newReplace implementationMike Kaganski
and unify with *ToAscii(Lower/Upper)Case Change-Id: I06999b4f5f34abc8da2860b7f9e279608edb40dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151381 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-06Simplify a bitMike Kaganski
No need to use different temporary objects here Change-Id: I1b47cae8b80adea5426c780003bddf68310a0060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151380 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-05loplugin:unnecessarygetstrStephan Bergmann
The plugin in its current form is probably not intending to find these cases. But it happened to do so on macOS with libc++, where the std::basic_string ctors taking a final defaulted Allocator argument are instead implemented by a pair of overloaded ctors, one taking no Allocator at all (see 671d1c6cd14b28b5960ad56086299bd69533dfd8 "Adapt loplugin:unnecessarygetstr to libc++"). But these changes here are useful regardless, so lets leave it at that. Change-Id: I2776671e2953182bdcad36432951a75f82412ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151410 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-04Provide std::u16string_view based o3tl::iterateCodePointsStephan Bergmann
...as requested in the comments of <https://gerrit.libreoffice.org/c/core/+/151303> "a11y: Fix returning unpaired surrogates when retrieving characters" (incl. the additional preAdjustIndex parameter). The type of the indexUtf16 parameter obviously needed to be adapted to std::u16string_view's std::size_t. But there is no obvious best choice for the type of the incrementCodePoints parameter (int? std::ssize_t?), so lets leave it as sal_Int32. For simplicity of avoiding a Library_o3tl, and to allow o3tl::iterateCodePoints to be used in the implementation of rtl_uString_iterateCodePoints now, o3tl::iterateCodePoints is provided as an inline function defined in the include file. Change-Id: I8280ca11d2a943bd2b7150a266807b358f321a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-02tdf#155122: implement CtrlHandler on WindowsMike Kaganski
Change-Id: Ia766db91030528c320a27a2d608bd0ec0a34f31b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151261 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-02improve windows backtrace_to_stringNoel Grandin
I want to know the symbol address we actually capture, since we seem to getting duplicates in the output of SymFromAddr, I want to know if the fault is in SymFromAddr, or the backtrace capture call. Change-Id: Iece9c204abb780ae6b67a11e6ba77db816351e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-29Simplify strtmpl.hxxMike Kaganski
Replace bulky and difficult-to-read template argument names with clearer ones; remove excessive whitespaces; reorder to avoid forward declarations (these are remnants from the refactor from macros to templates, when I tried to keep the old structure as close to the original as possible). And also a small code simplification in doubleToString. Change-Id: I901cfb86daf410e85269538f36ebb6b553a4be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151125 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-22Introduce sal::systools::CoTaskMemAllocated to use RAII for CoTaskMemFreeMike Kaganski
Change-Id: I5553138bfc8dd989e68b8bcc2be981746e8c1e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150783 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-17loplugin:stringaddStephan Bergmann
Change-Id: I674655aa4bfe38675dd3c9d677a7d7c64b3eaac8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150478 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-12Use o3tl::trim in strtmpl.hxxMike Kaganski
Change-Id: I4de8658c36c21fe07fa45f697cf3145c567a95c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150210 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-11fix dbgutil build on win/aarch64 (print stack from cppunittester)Christian Lohmaier
Change-Id: I632607599060e625bda3dabee627ae1ddd6bd709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150102 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2023-04-10Use of O(U)StringNumber for float/double is actually a pessimisationMike Kaganski
They use rtl_(u)str_valueOf(Float|Double), to fill the buffer, and the latter use doubleToString, which creates an rtl_(u)String, copies to the buffer, and releases the rtl_(u)String. So instead just use the rtl_(u)String from rtl_math_doubleTo(U)String directly. Even when the end result is not needed as O(U)String, this would avoid an extra copy step. Also, this avoids separate LIBO_INTERNAL_ONLY implementations. Change-Id: Ib1d9ecebd7876dfff7dc758f89ee4c1536647a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150150 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-09use more OStringToOUStringNoel Grandin
both because it is more obvious to read, and it takes a string_view, which is handy Change-Id: Ic201cfa0434446f51436d23c33d3f1a919ed65be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150167 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05Simplify O(U)String::number implementationMike Kaganski
Change-Id: I059f0324597a90aee01c95170a48ac5578f3caee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150037 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-04Make O(U)String::boolean also return an O(U)StringNumberMike Kaganski
Change-Id: I184fa0e4e45662e0fac86076d1c8733a0465bb56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149978 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-02Simplify a bitMike Kaganski
Change-Id: Iae784d3ae40cd237c768413c067a2067c608238d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149885 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-25loplugin:stringadd in registry..salNoel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I1658b960d44780f7d9c447246b1178cb70be5e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
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-20rtl_allocateString takes a size_t parameterStephan Bergmann
Change-Id: Ibfdc0e7e3af243f157d5d14e3fbe5ab204c0b8df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149140 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-20Shrink rtl_[u]String allocation size to what's actually neededStephan Bergmann
Change-Id: Ib39caf31b5d2fb06cc81cdeb14578794b35d8ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149120 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-15Related: tdf#152943 Test that a quiet NaN payload is propagatedEike Rathke
Change-Id: Ib98b507db9305ed20e3000f7f457a135a3bb3836 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148936 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-03-09tdf#143148 Use pragma once instead of include guardsYousef_Rabia
Change-Id: I1c175753242783d83b5b1edc9b8b4cee2a5bd277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148449 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-02-28cid#1521506 silence Thread deadlockCaolán McNamara
and cid#1521510 Thread deadlock annotation is getting a bit spamy Change-Id: I3120562c0f7ca996f53d14965efe7af506be6d19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-24Unify osl_{g,s}etThreadTextEncoding implementation across platformsMike Kaganski
... using a static thread_local variable, as already was used on Windows; this replaces the non-Windows implementation based on pthread_setspecific and friends. Change-Id: Iba42510dea90a9e7d1983ba4af674667055f6dfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147624 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-24Simplify osl_getTextEncodingFromLocale on WindowsMike Kaganski
Drop all the complexity of thread-local storage used only to make EnumSystemLocalesW thread-safe. Just create a BCP47 tag, and use GetLocaleInfoEx to get the codepage. Also use locale name API in imp_getProcessLocale, and avoid the deprecated LCID API. Change-Id: I223564cc6d2cc919b0e5aadda1c12beee21e49f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147625 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-16Only specialize CppUnit::assetion_traits<T>::toString member functionsStephan Bergmann
...not the whole CppUnit::assetion_traits<T> classes (where applicable). That avoids spelling out the (identical) equals member functions, and also leaves around the less and lessEqual member functions, in case they want to be used after all. Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-16use std::condition_variable for oslConditionNoel Grandin
which is both faster (because we don't need to allocate a pthread condition) and simpler Change-Id: I0a98432b5106c1c2b8e8ed97cbd779ef2b0c9e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146996 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-14Let +TIMESTAMP and +RELATIVETIMER use the same osl_getSystemTimeStephan Bergmann
...so that the reported numbers add up if you specify both in SAL_LOG. Also make the code look more symmetric. Change-Id: I8b24dbe7cfa4d7aaebd2069db87a4e9d5fe6e3f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147017 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-01Finally drop undocumented rtl_[u]String_newFromStr null argument supportStephan Bergmann
...executing on the TODO left by 4f0c70fb5554325e0cc2129741175bf07de22029 "Avoid calling OString ctor with null pointer" in late 2020. Change-Id: I3db6e2df61ca290948affc5e02ae74757441471d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146428 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-27Remove support for 32-bit S390Stephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_linux_s390 is apparently dead and should thus be removed. However, that was the only bridge implementation for 32-bit S390, which implies that support for the 32-bit S390 architecture as a whole is dead and should thus be removed. Change-Id: I18b3b4fa11df4ce693107bad6bbea2fab1c19f26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-27Remove support for AIXStephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-28Introduce lo_get_app_data_dir() for Emscripten, tooTor Lillqvist
And not just Android. Hardcoded to return "/instdir" to match what is in the emscripten_fs_image. Change-Id: I26d4ec5e02ec9900e35ca47f1565a13ad2b723b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144849 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-12-13Fix the "Found char > 127" warning to check the correct charactersMike Kaganski
Change-Id: Ia4a713c8a5ddda11e9802cbc317dde9ff48b8fd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144026 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-12-13Add Emscripten ifdef to bootstrap_getExecutableFile()Tor Lillqvist
Change-Id: I15d31873a27ace544a76a64fe354edb97b144424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144039 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-12-10Introduce CPPUNIT_PROPAGATE_EXCEPTIONS environment variableStephan Bergmann
Often a developer debugging a failing CppUnit test wants a core dump with the place where an uncaught exception is thrown. So if the newly introduced CPPUNIT_PROPAGATE_EXCEPTIONS environment variable is set (to any value), disable all the protectors that would otherwise catch such exceptions (and just report some limited information about them). Change-Id: I3052f71c0787583c496279a6f5b35a0299c357b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143882 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-04rtl bootsratp : use enum classArnaud VERSINI
Change-Id: Iea433a2a7be9b62f04b57883dbefaf25586f21d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-04osl : remove useless includesArnaud VERSINI
Change-Id: Ic350a924d3e5b58e8f1a60621edc701553d8cbab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-30We won't need Executable_osl_process_child for WASM in the foreseeable futureTor Lillqvist
Change-Id: I479b694cd1d02b39ad54deab8ba69b4eec64d7d4 Signed-off-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143489 Tested-by: Jenkins
2022-11-21sal/osl win32 : use non recursive mutexes in file and threadArnaud VERSINI
Change-Id: I7e0e7f7a8bdc3fa92beca10935bb3c62d57f92fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-17Revert "TempFile: clear handle on close"Stephan Bergmann
This reverts commit 0d9613b77fc653c6144b5e4f0136c0536300c0db: As discussed in the comments at <https://gerrit.libreoffice.org/c/core/+/142344/2#message-c52fe7b2037e717525e89dd20a8f320142654ae0> "TempFile: clear handle on close", that change was intended to reset *pHandle to null in cases where osl_createTempFile returns an error and has already set *pHandle. But that is obviously not what the change actually does, it rather sets *pHandle to null in (only some of the) cases where osl_createTempFile returns an error and has not modified *pHandle. Given that there may potentially be clients that rely on osl_createTempFile not modifying the passed in *pHandle when it returns an error, and given that the sal/osl/unx/tempfile.cxx implementation of osl_createTempFile now inconsistently set *pHandle to null in only some of the cases where it returns an error while the sal/osl/w32/tempfile.cxx implementation of osl_createTempFile never sets *pHandle to null when it returns an error, it appears best to just revert that change. Change-Id: Ia68353d04a488b024573ad03de0c5e5bd6e2a2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142798 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-11Drop useless std::move of const objectStephan Bergmann
...introduced with d8b60f77f389a248f98aa45592e6e1045baafbe1 "rtl_String->OString in DirectoryItem_Impl". (I came across this code with an upcoming loplugin:constmove that flags suspicious uses of std::move involving const-qualified types.) Change-Id: I3df2e6fb9dbf97adba6fbeda51d24cf025f5b207 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142565 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-08A better fix for C++23 P2266R1Stephan Bergmann
After 6d6a143913603b040c10a5db83c2103557899011 "Address some of the sprintf in vcl/source/fontsubset/cff.cxx", --with-latest-c++ builds that pick up a C++23 compiler that implements <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html> "P2266R1: Simpler implicit move" started to fail with something like > vcl/source/fontsubset/cff.cxx:2061:16: error: no viable conversion from returned value of type 'char[64]' to function return type 'OString' > return aDefaultGlyphName; > ^~~~~~~~~~~~~~~~~ [...] > include/rtl/string.hxx:313:5: note: candidate constructor [with T = char[64]] not viable: expects an lvalue for 1st argument > OString( T& value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type = libreoffice_internal::Dummy() ) > ^ etc. So I figured there should be something better than 433ab39b2175bdadb4916373cd2dc8e1aabc08a5 "Adapt implicit OString return value construction to C++23 P2266R1" (which this commit reverts, modulo its conflicts in comphelper/source/xml/xmltools.cxx and sc/source/filter/xcl97/XclExpChangeTrack.cxx) to address the underlying issue in a way that keeps code that works up to C++20 also working in C++23. (The fix is only relevant for non-explicit constructors that involve NonConstCharArrayDetector and non-const lvalue references, not for other functions involving those. OUString has a similar constructor but which is explicit, and OUStringBuffer doesn't have any similar constructors at all, so this only affects OString and OStringBuffer constructors.) Change-Id: I31cf16b9507899f5999243f8467dfa24bc94c5ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142455 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-07file: Use callocDr. David Alan Gilbert
Current code does, malloc->memset, that's what calloc is for. Change-Id: Ie3a4872249f78442b96f98c9dad9d7170afe784c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142345 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-07TempFile: clear handle on closeDr. David Alan Gilbert
If we close the file on error, then clear the handle we returned to the caller so it doesn't try and close it again or do anything else with it. Change-Id: Idd054f92f4f3cbc3427896ec9795e588471292d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142344 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-05-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): salStephan Bergmann
Change-Id: I668a8b4c6ce3458baa6975161be7ed0cb160968f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>