summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin1-5/+5
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-15Introduce rtl::createUriCharClassStephan Bergmann2-152/+30
...to make those char class array initializations more readable. (Making the corresponding variables constexpr is mostly done so that failures in the provided `unencoded` arguments, like non-ASCII characters or duplicate character typos, would lead to compile-time errors also for !HAVE_CPP_CONSTEVAL. And assigning to a sal_Bool std::array needs another hack to avoid false loplugin:implicitboolconversion warnings.) Change-Id: Ieb8827f69f55f1212a9428817d5331fcb18ef1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin1-2/+2
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12tdf#143148 Use pragma once instead of include guardsShady Mohamed2-8/+2
Change-Id: I6262d64edcff4e73f2b148e98a62ee8d4b0d3294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132839 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-10Move impl functions to the only place they are usedMike Kaganski3-38/+34
Change-Id: I6871bfc0ae3d2427a4cd135cb37aad76dac0d7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132706 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin1-2/+3
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10osl signalshared : use std::mutex instead of oslMutex.Arnaud Versini2-40/+18
It also avoids possible double signal init and deinit. Change-Id: I4a24a011ee82d885e7a42abedea6a9fd96d3cab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-09add a more complete o3tl::getTokenNoel Grandin1-1/+2
so we avoid OUString copying (mostly when doing stuff like parsing numbers of out of strings) Change-Id: I4ef6ac23671c0b40807a22158e655e92dfad4af6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-01Use some more string_viewStephan Bergmann1-18/+20
Change-Id: I630c573eedfcc9d8678fda0466ddcc1902fac0f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132417 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-31A string_view is not necessarily NUL-terminatedStephan Bergmann3-0/+65
Regression introduced into LIBO_INTERNAL_ONLY code with 1da69081732c8a429840edaaf10cfb789ea68df8 "add string_view variants of methods to O[U]StringBuffer". And add some tests. Assigning an OStringChar to an OStringBuffer also uses the std::string_view assignment operator, so also test that with testOStringChar, even though there it is relatively likely that the OStringChar temporary is followed by null bytes, which could make the test happen to erroneously succeed. But at least tools like ASan or Valgrind could catch that. On the other hand, assigning an OUStringChar to an OUStringBuffer does not use the std::u16string_view assignment operator (and rather uses a ConstCharArrayDetector-based one, which was similarly broken and has been fixed in b66387574ef9c83cbfff622468496b6f0ac4d571 "Fix -Werror=array-bounds"), so there's no test for that here. Change-Id: I7cf10ee5ce0e4280a91d116cd82d4871a0f44af6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132363 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-31Fix -Werror=array-boundsStephan Bergmann1-0/+5
> In file included from svtools/source/svrtf/parrtf.cxx:28: > In member function ‘typename rtl::libreoffice_internal::ConstCharArrayDetector<T, rtl::OUStringBuffer&>::TypeUtf16 rtl::OUStringBuffer::operator=(T&) [with T = const rtl::OUStringChar_]’, > inlined from ‘virtual int SvRTFParser::GetNextToken_()’ at svtools/source/svrtf/parrtf.cxx:183:94: > include/rtl/ustrbuf.hxx:352:20: error: array subscript ‘unsigned int[0]’ is partly outside array bounds of ‘rtl::OUStringChar [1]’ {aka ‘const rtl::OUStringChar_ [1]’} [-Werror=array-bounds] > 352 | std::memcpy( > | ~~~~~~~~~~~^ > 353 | pData->buffer, > | ~~~~~~~~~~~~~~ > 354 | libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 355 | (n + 1) * sizeof (sal_Unicode)); //TODO: check for overflow > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > svtools/source/svrtf/parrtf.cxx: In member function ‘virtual int SvRTFParser::GetNextToken_()’: > svtools/source/svrtf/parrtf.cxx:183:94: note: object ‘<anonymous>’ of size 2 > 183 | aToken = OUStringChar( static_cast<sal_Unicode>(nTokenValue) ); > | ^ as seen with recent GCC 12 trunk in an --enable-optimized build. And add a test, even though it is relatively likely that the OUStringChar temporary is followed by null bytes, which would make the test happen to erroneously succeed. But at least tools like ASan or Valgrind could catch that. (For the corresponding OStringChar and OStringBuffer scenario, this issue does not arise, as OStringChar is not covered by ConstCharArrayDetector, so the correpsonding OStringBuffer assignment operator is OK memcpy'ing n+1 elements. There /are/ similar issues with string_view assignment operators for both O[U]StringBuffer, which will be addressed in a later commit.) Change-Id: Ia131d763aa5f8df45b9625f296408cc935df96ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132354 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-31-Werror,-Wunused-but-set-variableStephan Bergmann1-2/+1
...ever since 24b06b9c6bdb777dff385b0fbfc81d55d3d013a1 "log access violation on windows tinderboxen" Change-Id: I8a26135131774d0c9fd160b805a3ab798a216cf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132349 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2022-03-29Add back the opportunity to leave O[U]StringLiteral's buffer uninitializedStephan Bergmann2-0/+35
...once we have a C++20 baseline, which would render uses of the consteval O[U]StringLiteral ctors ill-formed if we accidentally failed to write to all of buffer's elements. This had been broken (and the TODO comments had become misleading) with 21584b304b21bfe6b99b6f29018c6b754ea28fc0 "make OUString(OUStringLiteral) constructor constexpr" and bca539e889d40e06cb3275442622cb075b2484a2 "make OString(OStringLiteral) constructor constexpr". Also add corresponding test code. Change-Id: I2bc680282c717d403a681ff4b9396580c8382de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132275 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-24-Werror,-Wunused-functionStephan Bergmann1-87/+0
...after 92e835dbf00590c9c29509d2995cc7918a9bbb90 "tdf#98705 Replace GetCaseCorrectPathName with GetLongPathNameW" Change-Id: If7fc8b656f7f0736edeb3b7617044a032d1481f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132017 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-24-Werror,-WformatStephan Bergmann1-1/+1
Change-Id: Ifb282ae907495ab21f3a91b1cae1c34443cb3626 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132018 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-23try to improve stack dumping on windowsNoel Grandin1-5/+36
noting that this commit is completely blind. But we're not getting good stacks on jenkins, and it doesn't look right to me that we're using 64-bit functions on 32-bit stacks, so make the 32-bit paths consistently use 32-bit functions and structures. Change-Id: I413ab97001246c442df151700cc618df4391e03b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-22tdf#145614 Convert #define to enum or constexprDeep171-2/+2
Change-Id: I3090ae3421ae55b7c546d82aeb49a56e93c9f02c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131913 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-21Removed duplicated includesAndrea Gelmini1-1/+0
Change-Id: I22b71580a79500e169ed9cab775501583975d67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131911 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-21Move implementation of doubleToString to sal/rtl/strtmpl.hxxMike Kaganski4-492/+387
... to reduce inter-relations between compilation units, and drop *StringTraits from sal/rtl/math.cxx. Change-Id: I0d7544dead03651dc71ec923cab10580f15cf49a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131895 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-21Reorganize the code a bit to drop some detail::* helper functionsMike Kaganski2-139/+117
Change-Id: Iee7402f5de7287678e1691b48b6493d3131ef7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131883 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-18tdf#145614 Convert #define to enum or constexprDeep171-2/+2
Change-Id: Ie039a828b09aacc68ef2f95f495284d554122940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131510 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-15set LO_TESTNAME on startup on all platformsLuboš Luňák1-1/+4
c0b1d1bf5701d5f94b618f70da8e863d32d97ab4 did this only for UNX for no apparent reason. Solves CppunitTest_sc_tablecolumnsobj asserting on it not being set. Change-Id: Ia9484e5c90bef18450addcf9429f9a27d575c3b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131631 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-11Remove redundant checkStephan Bergmann1-7/+0
The precondition `nIndex >= 0` is already asserted at the top of the function. Change-Id: I7436ce923b19aa81f08d1fb20680308f609d2242
2022-03-09Drop misguided test added in 82a1d32d3d3ac1b4b0a6d4cfaca791c77d9b3c03Mike Kaganski3-12/+8
The documented precondition is that index must not be greater than the length of string. Just assert that, and fix the found misuse. The added test is for in-place replacement, just in case. Change-Id: I3c545a6f0bf913fe93e2bef83ce733359c193065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131232 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-03-09Simplify getTokenMike Kaganski2-37/+49
It should not attempt to dereference pointers when nIndex is negative. Properly handle too large nIndex. Also it is not necessary to parse the string when nToken is negative. Related to commit be281db569bafaac379feb604c39e220f51b18c4 Author Rüdiger Timm <rt@openoffice.org> Date Mon Sep 20 07:43:20 2004 +0000 INTEGRATION: CWS ause011 (1.18.22); FILE MERGED 2004/08/18 11:47:54 sb 1.18.22.1: #i33153# Made getToken more robust. Change-Id: I6fc77a5b70308ccca08cb2132bd78d024bd7e3e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131221 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-08Fix --with-latest-c++ buildStephan Bergmann1-0/+1
> In file included from workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:8, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCase.h:6, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:5, > from workdir/UnpackedTarball/cppunit/include/cppunit/extensions/HelperMacros.h:9, > from sal/qa/rtl/oustring/rtl_ustr.cxx:25: > workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h: In instantiation of ‘typename std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string<char> >::type CppUnit::StringHelper::toString(const T&) [with T = char16_t; typename std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string<char> >::type = std::__cxx11::basic_string<char>]’: > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:74:50: required from ‘static std::string CppUnit::assertion_traits<T>::toString(const T&) [with T = char16_t; std::string = std::__cxx11::basic_string<char>]’ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:168:58: required from ‘void CppUnit::assertEquals(const T&, const T&, SourceLine, const std::string&) [with T = char16_t; std::string = std::__cxx11::basic_string<char>]’ > sal/qa/rtl/oustring/rtl_ustr.cxx:696:17: required from here > workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h:25:9: error: use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char16_t) [with _Traits = char_traits<char>]’ > 25 | ost << x; > | ~~~~^~~~ > In file included from include/rtl/ustring.hxx:34, > from sal/qa/rtl/oustring/rtl_ustr.cxx:22: > ~/gcc/trunk/inst/include/c++/12.0.1/ostream:558:5: note: declared here > 558 | operator<<(basic_ostream<char, _Traits>&, char16_t) = delete; > | ^~~~~~~~ Change-Id: I70ae970c10650d0e6efa5ced3a354090642d5387 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131164 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-07Add unit tests for searching empty substring / zero characterMike Kaganski3-429/+171
Related to commit 713c83c0fc4a0d9950cfa0b598d7c5f4bae15755 Add checks to avoid finding empty substring / zero character This activates tests in sal/qa/rtl/oustring/rtl_ustr.cxx Change-Id: Iab176e6583dc383a7a3413b0e19cc8f0d09b2824 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131087 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-05Add checks to avoid finding empty substring / zero characterMike Kaganski1-0/+9
... which changed in commit 281989007fd7dea997ed9a65f513f80b1aff67dd Author Noel Grandin <noel@peralex.com> Date Tue Jul 01 13:17:01 2014 +0200 Use standard library optimised routines for OUString/OString for optimized cases: strchr/wcschr/strrchr/wcsrchr find trailing zero character, and strstr/wcsstr find empty string; previous/unoptimized code does not find these. This introduced inconsistency between char and sal_Unicode functions on non-Windows, and for sal_Unicode between Windows and non-Windows (because on Windows, optimized code is used for sal_Unicode, while on other platforms, unoptimized code is used). Change-Id: I68529c91b26f4113d9bd7777fc5ac4809349864b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131064 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-05Fix typosAndrea Gelmini1-2/+2
Change-Id: I87f35153bbf53f58d6c8ca7b14a7fd09fec4372f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131052 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-04Remove useless comment on a commented line since always (sal/w32/file_dirvol)Julien Nabet1-3/+0
git history gives: commit b76cb86eaa0aec1d02c5ff29c5a43e1e7a675b27 Author: Oliver Bolte <obo@openoffice.org> Date: Wed Sep 9 09:38:41 2009 +0000 CWS-TOOLING: integrate CWS mhu20 where it was already commented and from sal/osl/w32/file.cxx then digging a bit more gives: commit 73cd79644d4355de483b0d0c04fba034ac02795b Author: Rüdiger Timm <rt@openoffice.org> Date: Mon Oct 17 13:52:03 2005 +0000 INTEGRATION: CWS perform05 (1.5.52); FILE MERGED where it's also already commented. => No need to keep this Change-Id: I3e8892e8c8f4e76d2e05a8bd158e77418a12eb38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131030 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-04Avoid "ThreadSanitizer: unlock of an unlocked mutex"Stephan Bergmann1-1/+10
...in (somewhat contorted) test code Change-Id: I247a30e580b3d458eb748a833100a662c9890d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130991 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-04tdf#98705 Replace GetCaseCorrectPathName with GetLongPathNameWKunal Pawar3-143/+15
Change-Id: I1d03267cd67da4c155248b585ca59dc5191d28f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130144 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-04Drop commented out wrong testsMike Kaganski1-95/+0
Change-Id: Ief086996f94978d2ffd6879a6c3e5b0b2312dffe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130962 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-04Enable tests in rtl_str.cxxMike Kaganski2-223/+160
And disable the tests that try to use nullptr where it's not accepted. Change-Id: I1cd031e371485fdd57e7691565376253a01049c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130938 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-03Deduplicate some char replacement functionsMike Kaganski3-125/+47
Change-Id: Ie65224066941dbab89abb6fc91e6cbfbc45bf201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130901 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-03-03Use a more conventional begin() / end() syntaxMike Kaganski1-17/+23
Also would potentially enable use in std range algorithms that take different end sentinel type. Change-Id: Ia75005caa7ce44302fc8612f5717a41d11087622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130902 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-02Unify normal/shortened, null-terminated/with-length comparisonsMike Kaganski3-165/+131
Change-Id: Ie154efd1e0d9b49601200ac896d5d5dd0422d504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130832 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-02Drop useless indirection and unused templateMike Kaganski3-62/+20
Change-Id: Icbcf56c30c9d901a4436f56a1648a7c8e7504848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130817 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-02Unify and deduplicate to[U]Int[_WithLength]Mike Kaganski1-89/+56
Change-Id: I05e71b36030da0a91c24b3926ee1d069912849f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130815 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01No need to memset the allocated buffer in new_WithLengthMike Kaganski1-3/+1
Other places that allocate, specifically newFromStr_WithLength and ensureCapacity, don't initialize the memory. Change-Id: Iad5301313312aac24948afefb27925d52fe3c673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130762 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28Use 'assert' where appropriateMike Kaganski1-2/+2
Change-Id: Id7ecf874745fb32406bcd2250a954aaf3a345103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130667 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28Deduplicate string buffer codeMike Kaganski5-303/+162
Change-Id: Ia23974ad3a827c84bb1a5d633a953625aea2576a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130663 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-27More replacement functions deduplicationMike Kaganski1-86/+46
Change-Id: I700074cddf1be937f5fdaf90e6cc0b533a3c57ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130633 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-27Unify creation of character string copyMike Kaganski3-87/+34
Change-Id: Ifef89cfd98771f247a308fab58da410a7079ecfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130632 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-27Deduplicate newToAscii*CaseMike Kaganski3-129/+47
Change-Id: I55f4f43375037ad4247f592bc981d8718c12de68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130631 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-27Simplify newTrimMike Kaganski1-17/+2
Change-Id: I36e2f8b0f0f4829fba32e637fe61cebe9e67cf91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130630 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-27Deduplicate more comparison functionsMike Kaganski3-232/+154
Change-Id: I93aba36b7cde268e358bd96b55183533ddc70b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130603 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-26Slightly cleanup newReplaceStrAtMike Kaganski2-25/+6
Change-Id: I230aa635aa797038055bdbc9453a5daa98412f93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130465 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-25Slightly optimize newReplaceAllFromIndexMike Kaganski1-5/+7
Change-Id: Ie73a5e8c44458123ef03096e3e8f6c9e41c48814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130466 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-25Deduplicate rtl_uString_newReplaceFirst*Mike Kaganski2-117/+38
Change-Id: I6e09fd8e8acc06290423c1c44cc0c175b0c47e0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130547 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>