summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2022-01-19WASM setup as non-multiuser, desktop buildJan-Marek Glogowski3-4/+13
Change-Id: I2ee6e006554cf1e5e5e42c2f4f73d8788bff8f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128585 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-19WASM more initial bits and piecesJan-Marek Glogowski1-2/+2
All the small stuff, which is needed for the WASM build, but is not really worth an extra patch. * No soffice.sh script needed for WASM * WASM soffice.bin executable extension is html * Some small additional SAL_LOG output * Default to colibre icon theme * Test for qt5 even without X11 * Remove emconfigure artefacts at the end of the configure run * No oosplash for WASM * Disable the Office IPC thread * Suppress -Wno-enum-conversion for Cairo builds * Fix libnumbertext by using gb_EMSCRIPTEN_CPPFLAGS * Map EMSCRIPTEN to LINUX nls * No extra newlines for missing icon theme images * Print the missing dependency in some gbuild error messages * Copy Qt WASM loader, HTML template and SVG logo for binaries * Especially build the vcldemo for Emscripten Change-Id: I356370c72cc09357411e14d0c00762152877a800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128584 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-18Add HAVE_(UNIX_)DLAPI config header defineJan-Marek Glogowski1-23/+27
..., add the configure test flags and rename DLOPEN_LIBS to UNIX_DLAPI_LIBS. Initinally convert two dlsym callers to use HAVE_DLAPI and osl_getAsciiFunctionSymbol. There are a lot of places, which still use -ldl and even more direct dlsym calls; good opportunity for many simple EasyHacks. Change-Id: I4f2d2f7cb079a075af8f9d01eb5ee45de40c7f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128523 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-11Fix ISO C++11 -Wwritable-stringsJan-Marek Glogowski1-2/+2
osl/unx/nlsupport.cxx:863:18: warning: ISO C++11 does not allow \ conversion from string literal to 'char *' [-Wwritable-strings] Change-Id: I45da986ad8992716df9d1f9a0cc443fdb9cd46ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128213 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-10Use one define for the common NLS archsJan-Marek Glogowski1-25/+25
Just some refactoring. Change-Id: I9edae9bce381dcd9fdcb98471d461d00220fea57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128218 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-08Unify condition names and fix "else" pathsJan-Marek Glogowski3-3/+4
Drop Build prefix and settle on Lib and Exe prefixes. Also add a note about the "else" part of the condition and fix offenders. While at it, define COND_LIB_SAL_TEXTENC to be used by sal to prevent diverting coditions in build and cxx code. Change-Id: I944587ca1ccbe46b765d1a631a7214c8126fe951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128136 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-07Use CreateThread instead of _beginthreadexMike Kaganski1-23/+8
Change-Id: I4a106a670daaca85cefed08c7baeaa980841a233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128117 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-07loplugin:redundantcastStephan Bergmann1-1/+1
Change-Id: Ia68f492ebd4ac81feb44e736c53f0f4a2d99274d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128096 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-07Drop unused forward declarationMike Kaganski1-1/+0
Change-Id: Id2053d255624cef365753debea83d4bf1c3d9de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-06Simplify osl_getModuleURLFromAddress a bitMike Kaganski1-7/+4
Change-Id: I71243c99d43b58329317baa250d5b60aa62db360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128030 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-05Simplify osl_getModuleURLFromAddress using GetModuleHandleExWMike Kaganski1-49/+13
Somehow missed that in commit 515d2579d305a6127c6c194319a58eac62437e33 Date Fri Apr 05 13:15:42 2019 +0300 Replace legacy dynamically-loaded functions with statically linked ones Also drop obsolete suppressions of warning not emitted by MSVC anymore. Change-Id: If4a4c2ec76b275fb358b325652422e81e9003eb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128019 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-31gbuild: introduce gb_%_linktarget_targetJan-Marek Glogowski1-2/+1
Just some refactoring. Change-Id: I47adb93f8a413d289f6abb2a48ed3f049f582a46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127799 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-30Add configure test for the backtrace implementationIsmael Luceno4-44/+23
Improve robustness by testing explicitly; instead of assuming based on the OS, test first the libc and then test for libexecinfo. The assumption was wrong for FreeBSD (included since 2017) and for musl-based systems (not in libc). Also, remove INCLUDE_BACKTRACE and clean up a bit. Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220271 Change-Id: Ib4b7fd4fe2cdf5f76babe47a21bd2990fcf42649 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127538 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24Use rtl functions instead of own surrogate checking/combiningMike Kaganski13-115/+48
Change-Id: I3eb05d8f5b0761bc3b672d4c855eb469f8cc1a29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127375 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailedMike Kaganski1-3/+4
Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I66feced8bed05c7859e36a6d2f746a7faf30c7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-16Refactor Library_sal_textenc build conditionJan-Marek Glogowski2-11/+3
... by adding and using gb_CondSalTextEncodingLibrary. Change-Id: I04e8f56bde6296477d449f1c447e8133cdf86e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126788 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-14Drop brittle testStephan Bergmann1-24/+0
Not only did it not work on Windows (witness the #ifdef), it would also fail at least for Linux Flatpak builds (if they did make checks) where creating <file:////tmpname> happens to succeed with E_None. Change-Id: I9b82d500cb37fb80648407d2b4ade5ac85e97a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126831 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-14osl_replaceFile: fallback to osl_moveFile in more cases on WindowsMike Kaganski1-1/+4
E.g., calling it with files residing on different volumes, ReplaceFileW will fail with ERROR_UNABLE_TO_MOVE_REPLACEMENT. Handle that error, and also the two other error codes specifically described at [1], to allow more universal use of osl_replaceFile / osl::File::replace, which is "atomic" on Windows, since it uses ReplaceFileW that is suggested as a replacement for Transactional NTFS [2]. [1] https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-replacefilew [2] https://docs.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf Change-Id: I501c267e5bdd88a33560d2bb916db1a0b6e01831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126800 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-14A more expressive CPPUNIT_ASSERT_MESSAGEStephan Bergmann1-2/+7
Change-Id: I65d64002e5021c84af9ad7b8f5b693f04d79d4ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126797 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-13Refactor some buildsytem stuff (mostly whitespace)Jan-Marek Glogowski1-13/+13
Change-Id: Idfca786ecc7251e08525bd5b45936143727c43d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126731 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-02Fix clang-cl -Zc:dllexportInlines- buildStephan Bergmann1-1/+1
That flag is only supported by clang-cl, not by MSVC, and c7c9f3f57a2feae5d3bc3c47104786883ed09e44 "use clang-cl's -Zc:dllexportInlines- for clang-cl builds" apparently naively assumed that it would work to build LO with clang-cl and that flag without actually trying it out, and 1040228c356d75c5228cde4d6103f9b446848e4b "My clang-cl build does not work with -Zc:dllexportInlines-" effectively disabled it completely. The way to avoid unresolved external symbols during linking of URE libraries (see the 1040228c356d75c5228cde4d6103f9b446848e4b commit message) is apparently to also build libraries that the URE libraries depend on with the flag, hence the change from gb_Library_set_is_ure_library to gb_Library_set_is_ure_library_or_dependency. For now, I only marked those additional libraries (unoil and xmlreader) that actually caused issues when linking the URE libraries. Change-Id: I3a85c73246250981cd86b7ee41f87b41f393a4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126012 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-12-01gbuild: introduce plugin + loader conceptsJan-Marek Glogowski1-4/+2
This introduces two concepts: a plugin and its loader (library) LO currrently has dependency cycles for some libraries. There is scui, which depends on sc, while sc dlopen's scui. There are the various vclplug_*, i18npool plugins, filters/gie, acc, etc. Usually these plugins link to their loader library, because they use its symbols. But as a result there is no sensible way to express the runtime dependency of loaders on the plugins. In GNU libtool plugins are called modules and they are implemented in an IMHO more sensible way by allowing missing symbols at link time. This way you can have a dependency from the loader library to its plugins, as the plugins don't depend on the loader, but you lose the link time detection of missing symbols. While this is in theory possible in LO too, LO currently has plugins, like acc (accessibility), loaded by tk (toolkit), which depends on svt (svtools), which itself depends on tk, so dropping the tk dependency for acc on its own doesn't help :-( And while the dependency of the plugins on their loader is fine for the shared / DYNLOADING build, for the "static" builds you must (somehow) link the plugins into the executables. I also codeified a few rules into the build system along with it: * just plugins are allowed to depend / link other plugins * plugins aren't allowed to be linked into the merge lib * plugin loaders are "limited" to libraries At the high level, this is implemented via new gbuild calls: * gb_Library_set_plugin_for,lib,loader: declare a library to be a plugin of a loader library and add a dependeny from the plugin library to the loader library * gb_Library_set_plugin_for_nodep,lib,loader: ^^^^ without adding the library dependeny * gb_Helper_register_plugins_for_install: "plugin" replacement for gb_Helper_register_libraries_for_install to implement some additional checks in the build system In the end this patch just adds a bit syntactic sugar and nothing changes for any build. Change-Id: I7b01d9c384cbc5838bd2cc93aff18e4868939d6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126163 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-30loplugin:stringliteraldefine in variousNoel Grandin1-4/+4
Change-Id: Ib482e3982128dc47d88a79478d80eef43745d1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26-FIIntrin.h in CC/CXX is no longer needed for my clang-cl buildStephan Bergmann2-4/+0
...at least with Clang 14 trunk now (but I didn't check which llvm commit would be responsible for that, and which version of LLVM that appeared in first). That also means the -D_CRT_RAND_S hack in CXX is no longer needed either. (See the mail thread starting at <https://lists.llvm.org/pipermail/cfe-dev/2015-November/046012.html> "[cfe-dev] clang-cl question".) Change-Id: If1b1b4fa17782161c3b72ac68fdef28b0e044a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125859 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin5-1/+124
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-17Use C++17 hex-exponent floating point literalsMike Kaganski1-5/+5
... instead of some calculated/hardcoded decimal literals. The new syntax represents the power of 2 exponent directly. Change-Id: I826bda6e06ec77f0706bb48abe2934f7289fddc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125359 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-14rtl::Static->thread-safe static in salNoel Grandin2-15/+24
Change-Id: I04f8a05aaa078642ee5e55c777b9b259c089695b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-11Drop the OUString vs. OUStringLiteral comparison operator overloadsStephan Bergmann1-4/+6
...which can be subsumed by their OUString vs. OUString counterparts now that conversion from OUStringLiteral to OUString is cheap since e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString". (The only place that needed adaption was the dubious use of temporary OUStringLiteral instances in sal/qa/rtl/strings/test_oustring_stringliterals.cxx, which now caused "error: conversion function from 'rtlunittest::OUStringLiteral<6>' to 'const rtlunittest::OUString' invokes a deleted function".) Change-Id: I4f0f96efa2d5331ed5cbc9a29bdfdf3c0f4148a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-23move access inside mutex guardLuboš Luňák1-1/+2
Change-Id: I784fbc3b39a645c7984aa836cc32980343ddd1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124095 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22fix std::unique_lock unlockingLuboš Luňák1-1/+1
std: :unique_lock::release() does not unlock. Change-Id: Ida5a28a8b1c275a0a702121bf00faeaf76a57426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124063 Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org> Tested-by: Jenkins
2021-10-22prefer llvm-addr2line to addr2line for backtraces if possibleLuboš Luňák1-2/+16
It's faster, and at least when compiling with Clang it should work fine. Change-Id: I474857c2a54b8032b74202ccd5c67d25f6062790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124055 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22revert part of "Simplify vector initialization in sal"Luboš Luňák1-5/+3
This first allocates space based on the two items, and only afterwards it reserves space for all items, possibly allocating again. This partially reverts commit 8546cdb2ad25b03ac152615357cab00 . Change-Id: I8668cb03881766fc5078ab5e411efe56e6f3009e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124054 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22cache negative addr2line hitsLuboš Luňák1-1/+7
Otherwise we'd be trying to resolve unknown symbols repeatedly. Change-Id: I1c1eb9f97a1f64436ad0858ceff75fa29343979a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124053 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22Optimize assignment from OUStringLiteral to OUStringStephan Bergmann1-1/+2
...by making the OUString's pData point to the OUStringLiteral, instead of copying the contained characters. This is one of the improvements that had not been done as part of e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString": "To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc." (Simply dropping the OUStringLiteral overload was not possible in this case, though, as that would have lead to ambiguities among the various OUString and std::u16string_view overloads.) The now-deleted OUStringLiteral rvalue reference overload means that some existing assignments from ternary-operator OUStringLiteral<N> to OUString no longer compile and had to be replaced with uses of std::u16string_view. Those had not already been replaced in e6dfaf9f44f9939abc338c83b3024108431d0f69 because they happened to use OUStringLiteral instances of identical length N in both arms of the ternary operator, so did not already start to fail to compile back then. Change-Id: I328e25b8324d045774e811d20a639f40d6a9a960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124040 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-18Noop unify style for branchesEmanuel Schorsch1-5/+3
Change-Id: Ifa96b7f273f7c154fdd267efba7271765ff7ae45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123728 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-16Simplify vector initialization in salJulien Nabet2-7/+11
Change-Id: Ia3e4dd8cad79b156d44eb03f1ae3d308204df2e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123691 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15NoOp refactor to make elif clearerEmanuel Schorsch1-32/+29
Change-Id: I05be42fde3f2b66d20c337583d8f8f92143bcb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123032 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-10OSL : remove useless rtl::Static in debugbaseArnaud Versini1-3/+2
Change-Id: I54ef4d1b492409265496c7f2b852568274bcf073 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10OSL : use std::mutex in backtraceapiArnaud Versini1-4/+5
Change-Id: I2df73d7959dd24882f75130f0fd03ff096dce8d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123322 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-05Optimize the whole range of getN10Exp over IEEE 754 doublesMike Kaganski1-10/+60
Needs 5056 bytes of pre-calculated data. Change-Id: I138d9dc80c176f675a6854fe906e235c98efcbc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122947 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-04Use isRepresentableInteger hereMike Kaganski1-53/+47
Change-Id: I8ba202232fa42765a8b04113639fdac4b5724aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122941 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann2-19/+19
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-02Some corner case unit testsMike Kaganski1-0/+12
Change-Id: I43474265a9b3e1d07394c5f7e429e081d67f2eda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122935 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Simplify the code a bit to clarify the logicMike Kaganski1-40/+24
Change-Id: I80201148684f6e297ff0c880c0dbbc346129a557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122864 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Add unit test to catch eae24a9488814e77254d175c11fc4a138c1dbd30Mike Kaganski1-0/+5
Change-Id: I18b98f4be3212199004a1bb8fd8725fe71254ec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122870 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Calculate buffer size correctlyMike Kaganski1-1/+1
A mistake in eae24a9488814e77254d175c11fc4a138c1dbd30 Change-Id: I0da64366e4c39b3f5559e8a1c757a94d811f041f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122869 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Consider leading minusMike Kaganski1-6/+7
An overlook from commit be8da97976658ff19b4dd010bff328cd3f424c1b Change-Id: I2f639a9d865b43b38e19ad35a0a9e6b5bc1c1c8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122863 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Use std::memmove instead of loopMike Kaganski1-7/+1
Change-Id: Ia88ceaaad700bf3c2c8db9bb19146b75146dad3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122861 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01Drop static_cast syntactic noiseMike Kaganski1-33/+29
Change-Id: I699f22aac871fdcef9ee9326ac30091239fa02be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122862 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>