summaryrefslogtreecommitdiff
path: root/i18npool
AgeCommit message (Collapse)AuthorFilesLines
2022-02-14tdf#147343: Wrong typo for AM/PM indicator in Spanish localesJulien Nabet11-22/+22
Change-Id: I0cc077a94b6f11f67436981033e024e3097c635a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129793 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit d582bc9735022996a317ed661388621edabf78cc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129843 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-29Add CIRCLED NUMBER TWENTY ONE through CIRCLED NUMBER FIFTY to numbring listKevin Suo1-1/+31
Previously we only supported CIRCLED NUMBER ONE through CIRCLED NUMBER TWENTY. Unicode already has CIRCLED NUMBER TWENTY ONE through CIRCLED NUMBER FIFTY. This improves Circled Numbering, especially for CJK. E.g. ➀, ➁, ➂, ... ㉑, ㉒, ㉓, ... ㊽, ㊾, ㊿. Change-Id: I7c4c851f03522fef9d44163da7450cf69aab3889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129015 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 7e380a76e1f0faa90fdf8f0575053d4a1ca6e1de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129068 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin3-7/+7
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-22osl::Mutex->std::mutex in TransliterationImpl::loadBodyNoel Grandin1-2/+3
Change-Id: I15441110bf27c3f2ad9a61389339c55b9c4c3bb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21tdf#143148 Use pragma once in i18npoolHarjot43-173/+44
Change-Id: Id67d8926fdc1616add1bd9de051911b2aae030e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125419 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-11-20Change aboveWord and belowWord for Simplified Chinese localeKevin Suo1-2/+2
Per Wechat discussion by our Simplified Chinese l10n team. 上方 and 下方 are written languages which are more suitable for cross-reference context, while 上面 and 下面 are spoken languages. Also in this way they are consistent with MS Word. Change-Id: Iccf8c330b2e5a04be3916b810a29ea0d62f26225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125533 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-20Fix the above/below words for BulgarianMihail Balabanov1-2/+2
Change-Id: Ib81da535411b07596785b06d7a5dac36a8a2ee28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124704 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-19loplugin:stringliteraldefine in i18npoolNoel Grandin2-3/+3
Change-Id: I8a56d5d6d201ac5ae65dc46ef4838a0e41af587e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125530 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-19Cleanup locally used variables in Calendar_hijriHossein2-31/+6
* Some variables that were only used in the calendar_hijri.cxx are now moved out of the header file, and they are no loner member variables of the the class Calendar_hijri. They are now placed in the the i18npool namespace. * Removed unused variables SynMonth, EveningPeriod and LeapYear * Moved a global variable definition to the member function that was the only place it was used. It is now a local variable. Change-Id: I8a8b25765bd8ed5640b1a0cfa46ec9903b460a53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125433 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-18Cleanup Calendar_hijriHossein2-12/+0
* Removed the static member variable SA_TimeZone, which is not used elsewhere * It is write-only according to the clang compilerplugins output: compilerplugins/clang/unusedvarsglobal.writeonly.results * Time zone should not be allocated as a constant * Removed unused local variables commented out 15 years ago to avoid warnings in: 4170cbdbdfc9ceb282d25e1e19cd7b4d178436bf Change-Id: Ifc24651ae0aee33dd6a01c77c919ce0cb0426366 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125432 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-16Update to ICU 70.1Eike Rathke1-0/+12
Unicode 14, 5 new scripts, 12 new Unicode blocks. In i18npool/qa/cppunit/test_breakiterator.cxx TestBreakIterator::testLao() had to be disabled/adapted. Needs to be investigated, see comments there. As is, Lao script word break has regressions. Correct UBLOCK_TANGUT_SUPPLEMENT Unicode range endpoint to 0x18D7F, see https://www.unicode.org/versions/Unicode14.0.0/erratafixed.html for which ublock_getCode(0x18D8F) now returned UBLOCK_NO_BLOCK and thus luckily the assert in svx/source/dialog/charmap.cxx hit. Change-Id: I4bad16ecfab3f44be365b8f884c57f34af68218e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125322 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-11-16Use basegfx::deg2rad instead of *0.01745329251994Hossein2-10/+5
* Replaced multiplying by magic number 0.01745329251994 with basegfx::deg2rad() which is equal to M_PI/180.0 * Instances of this could be found using: git grep 0.01745329251994 *.cxx *.hxx Change-Id: Ib813251f6223e4218fe977c0211732c22199295d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125294 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11rtl::Static to thread-safe staticNoel Grandin2-8/+9
Change-Id: I98909614d4a8d4317867036678c7202e28dcf285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10new loplugin:stringliteraldefineNoel Grandin1-1/+1
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03Silence spurious Werror=maybe-uninitialized in transliterateImplNoel Grandin1-0/+4
only seen in optimised build Change-Id: Ibf344efa034feefdc6e03d489a0a6b28461b76e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-01Group per-locale functions instead by typeJan-Marek Glogowski1-261/+176
... and also sort them. Gets rid of a lot of #ifdef cpp macro lines. Also unifies the macros as "MACRO( id )" for easier readability. Additionally drops the "// add here new services !!" comment at the end of the transliteration instance list, as items were added all other the place in various patches. Change-Id: I040b3b0952ec2aef2d1d10e7282cfd11afa6b702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124441 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-31Prevent many -Wunused-function in i18npool serviceJan-Marek Glogowski1-0/+32
... registration. Change-Id: Ice406aa6e8817b4281cc3905d2ba2703ce482c18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124440 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-30Prepare for removal of non-const operator[] from Sequence in i18npoolMike Kaganski10-127/+154
Change-Id: Ib4c59c45098376f2e0a610a8ffefb4af5306bd6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29fix comparison when searching cacheLuboš Luňák1-1/+1
This made the cache always fail and re-cache, making CJK text layout slower over time. A mistake from ef513fd4b049b214a03fbe6e that converted !strcmp() to != instead of ==. Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-25Missing `static`Stephan Bergmann1-1/+1
...from aa2064c5c5f23f6f4b7bc44e12345b37f66995bc "Improve loplugin:stringliteralvar", similar to 8b32a3edad52f8ac5e5f0f49b4f4e80954c2fd25 "Fix stack-use-after-scope" (though this case doesn't appear to have caused any actual issues). (After manual inspection, there appear to be no further missing `static` at least in aa2064c5c5f23f6f4b7bc44e12345b37f66995bc "Improve loplugin:stringliteralvar".) Change-Id: I2b3d0d8d2af1d65f0c5bef8a858107020a620974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124137 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-21loplugin:flattenNoel Grandin1-11/+12
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-19Resolves: tdf#145173 Add English (Israel) {en-IL} locale dataEike Rathke3-1/+46
Mainly inherit from he_IL but the calendars from en_US that also already define the Jewish calendar items with English names. Jewish calendar date formats also from en_US LC_FORMAT_1. Change-Id: I0907898190adcd46687ca1308fe6785fd9c9c4ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123845 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-19Related: tdf#145173 Sort he_IL by formatindex and split NatNum to LC_FORMAT_1Eike Rathke1-81/+95
... keeping all LC_FORMAT as non-NatNum elements and separating all NatNum into LC_FORMAT_1, to be able to separately inherit LC_FORMAT. Change-Id: I42387432205862ca6416e6a3d020a923408c7b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123844 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-19Related: tdf#145173 Handle two independent ref=... for LC_FORMAT...Eike Rathke1-1/+2
Change-Id: I6313d9e573e653c9a97171ca8c2f6176d7ad6a3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123843 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski10-17/+17
... 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-14[API CHANGE] Fix all bad UNOIDL identifiers across offapiStephan Bergmann1-18/+18
Identifiers containing underscores must start with an uppercase letter. (So that the UNO implementation can use identifiers containing underscores and starting with a lowercase letter for internal purposes, see e.g. the static_type member functions in the C++ *.hdl files. idlc checks that with the -cid option, while unoidl-write silently allows bad identifiers for now, see the TODO in unoidl/source/sourceprovider-scanner.l, which can be dropped after this change.) All of the affected identifiers were present since early OOo times, but none of them appear to be used much, at least not across LO itself, so there is hope that we can get away with these incompatible changes. (For the constant group members, we could roll this out in two steps, introducing the new members alongside the old ones and deprecating the old ones in a first step, then removing the old, deprecated ones in a second step, so that third-party code would have more time to adapt. But that would not work for the enum members and interface methods, so just do all of this in one breaking step.) udkapi happened to not contain any bad identifiers. Change-Id: If2d4c16563606f9efb48b937c76af54746377428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121725 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski8-54/+38
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-05drop 'using namespace std' in h* i* j*Julien Nabet1-4/+3
Change-Id: I3c28651779f17e1a410505ffaa863b4773037ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123119 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann2-3/+3
...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-01loplugin:constmethodNoel Grandin11-18/+18
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-09-30Resolves: tdf#144697 Format out-of-bounds date(+time) as #FMT errorEike Rathke1-17/+36
i.e. < -32768-01-01 or > 32767-12-31 They couldn't be input or stored as proleptic Gregorian in file formats anyway. Additionally in i18npool handle the absolute year values casting conversion int32 <-> int16 where era 0 BCE year 32768 is fielded as -32768 but still is a valid year for our proleptic Gregorian, so it isn't displayed as --32768. Change-Id: Ifdd482f07e04c2a4296fd0556bbef7f1d3e15676 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122835 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-09-18remove some allocationsNoel Grandin3-8/+10
where we could be calling static methods Change-Id: I9efef083e6ff307441fb36c19eac9134d960edec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-18cid#1491946 and cid#1491949 deference before null checkNoel Grandin4-64/+62
after commit c7551e8a46e2f9f8142aa7921a0494221ae096e8 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Sep 16 10:36:48 2021 +0200 speedup CharacterClassificationImpl::toUpper Change-Id: If09857f89a4fa7de56831ea16d0b3ec8c50cfaf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122295 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-17Fix calculation of alloca'ed memory sizeStephan Bergmann1-3/+2
...after 16d645e5b8f11b4ddb49a2b58bde388b28960abc "speedup Transliteration_body::transliterateImpl", which caused dynamic-stack-buffer-overflow (<https://ci.libreoffice.org/job/lo_ubsan/2137/), > ==4003==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7fffe890f7d2 at pc 0x0000004b1c2d bp 0x7fffe890f490 sp 0x7fffe890ec40 > WRITE of size 2 at 0x7fffe890f7d2 thread T0 > #0 0x4b1c2c in __asan_memmove /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc:30 > #1 0x2b8b4222ef65 in char16_t* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<char16_t>(char16_t const*, char16_t const*, char16_t*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368:6 > #2 0x2b8b4222eec0 in char16_t* std::__copy_move_a<false, char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:385:14 > #3 0x2b8b4222d9be in char16_t* std::__copy_move_a2<false, char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:422:18 > #4 0x2b8b4222d2be in char16_t* std::copy<char16_t const*, char16_t*>(char16_t const*, char16_t const*, char16_t*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:454:15 > #5 0x2b8b4222cf43 in char16_t* std::__copy_n<char16_t const*, signed char, char16_t*>(char16_t const*, signed char, char16_t*, std::random_access_iterator_tag) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:782:14 > #6 0x2b8b4222b495 in char16_t* std::copy_n<char16_t const*, signed char, char16_t*>(char16_t const*, signed char, char16_t*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:806:14 > #7 0x2b8b42225872 in i18npool::Transliteration_body::transliterateImpl(rtl::OUString const&, int, int, com::sun::star::uno::Sequence<int>*) /i18npool/source/transliteration/transliteration_body.cxx:145:13 > #8 0x2b8b42236f35 in i18npool::transliteration_commonclass::transliterateString2String(rtl::OUString const&, int, int) /i18npool/source/transliteration/transliteration_commonclass.cxx:109:12 > #9 0x2b8b41fbc740 in i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) /i18npool/source/characterclassification/cclass_unicode.cxx:67:19 > #10 0x2b8b41fbc7b2 in non-virtual thunk to i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) /i18npool/source/characterclassification/cclass_unicode.cxx > #11 0x2b8b41ff1335 in i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) /i18npool/source/characterclassification/characterclassificationImpl.cxx:47:63 [...] Change-Id: I5273e234c8921f635e31c414cb0e427ee8b04a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122234 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-09-16expand out unnecessary macroNoel Grandin2-40/+36
Change-Id: Id812b720413bfe9ea678910fc8d9d0a64dd32d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-16speedup Transliteration_body::transliterateImplNoel Grandin1-2/+5
use alloca in Transliteration_body::transliterateImpl to avoid over-allocating stack-space (which tends to unnecessarily flush some cache) Change-Id: I1843fdcb830a3e948a8bbd0a9c7eb143b21a804c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-16speedup CharacterClassificationImpl::toUpperNoel Grandin22-128/+128
remove empty sequence creation in CharacterClassificationImpl::toUpper, rather pass a pointer, so it can be nullptr. Which results in a fair degree of cascading change. Change-Id: Ie56d49dc71480195c1807764b0d5124f0019f30b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-06clang-tidy:clang-analyzer-optin.performance.PaddingNoel Grandin1-3/+5
noting that XMLTokenEnum was already being treated as being limited to 32-bits, we bitmask it together with namespaces Change-Id: Ic48f2a662452d1b8e022078d31a723d2ac65aef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin2-3/+1
Change-Id: I78339f1df1f0c55c7edaa552940b07d1ada3aeb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-26tdf#144089: Revert "tdf#137737 i18n search: don't expand start/end with ↵Xisco Fauli1-2/+2
regex ^ or $" This reverts commit a511bffd67a9cebfdc878766581ac08c79d7ff51. Reason for revert: See https://gerrit.libreoffice.org/c/core/+/120981 Change-Id: If8a445448976a9963f76623d3d968b8d5e3d74dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120990 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-25tdf#137737 i18n search: don't expand start/end with regex ^ or $Justin Luth1-2/+2
If the regex starts with ^, that means that it matches only at the beginning of the content. So don't expand the beginning of the content or else it won't match anymore. Similarly, $ indicates matching at the end of the content. For the unit test I just randomly guessed at SearchItem.AlgorithmType, and it kinda worked. I love black boxes... I hope I remember what i learned about TransformParameters() which was parsed in sfx2/source/appl/appuno.cxx, splitting the "variable" into Item.PropName = PropValue. That is definite black magic. Change-Id: Ie1640821a7a430e78dbe72c57a92aeaa9b5272a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120410 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-08-19tdf#143526 add Korean Numbering test case & fix Hanja number codepointDaeHyun Sung2-2/+284
add Korean Numbering test cases 1. koreanCounting 2. koreanLegal 3. koreanDigital 4. koreanDigital2 fix Korean Hanja number codepoint for Zero(0) Following MS Office's numFmt Strng example https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/a1bb5809-e361-4e49-8e16-7f1a67da4121 Korean Hanja notation for Hanja is `零 U+96F6` on MS Word 2019 and that document. So, fix the Korean Hanja number code pointfor Zero(0) `零 U+96F6` Change-Id: I1a5b95640a93e7fbc3a0e724b154587877b198a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120676 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-08-11no need to allocate the lookupTableItem separatelyNoel Grandin6-27/+27
Change-Id: I43919a002df01c6329ee483bf69f04669cdce1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin2-6/+6
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>
2021-08-03Related: tdf#143664 Change {de-*} March "Mrz" to "Mär"Eike Rathke2-2/+2
Change-Id: Id4a4ebe432bf5badae96eadb723336648d2ce690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119917 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-31tdf#143295 fix DateAcceptancePattern in KoreanDaeHyun Sung1-0/+5
In Korean, both "YYYY-MM-DD"(ISO8601) and "YYYY. MM. DD."Hangul orthography(한글맞춤법)" are public and usually use in Korean. So, I fixed DateAcceptancePattern elements in Korean on i18npool/source/localedata/data/ko_KR.xml Change-Id: Iae3dfc63f4c67f4e1a74df7686daf2c2187c0b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118708 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-29Make duplicate generated numbering identifiers unique, tdf#143526 follow-upEike Rathke2-4/+17
Change-Id: I28366c4e868e97b70e016b056b73b88b4cc8b812 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119677 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-29Add NumberingIdentifier unit test, tdf#143526 relatedEike Rathke1-0/+61
Change-Id: I9d4df6f63dc9ebc90e99fecce14b3551c74f7f1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119675 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-29tdf#143526 fix and add Korean numberingDaeHyun Sung1-0/+55
fix Korean NumberFormat, compare with MS Word change mapping of style::NumberingType::NUMBER_HANGUL_KO, from "koreanLegal" to "koreanCounting" "koreanDigital" add new reserved words "일, 일영, 일영영, etc" - style::NumberingType::NUMBER_DIGITAL_KO "koreanLegal" is new reserved words "하나, 둘, 셋, 넷, 다섯, 여섯, 일곱, 여덟, 아홉, 열" - style::NumberingType::NUMBER_LEGAL_KO "koreanDigital2" is new reserved words "一, 一零, 一零零, etc" - style::NumberingType::NUMBER_DIGITAL2_KO Reference: 1: "[MS-OE376]: Office Implementation Information for ECMA-376 Standards Support" https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/a5deef83-bb01-410f-bde0-9c35abe4ca52 2.1.350 Part 4 Section 2.13.5.30, numberingChange (Previous Paragraph Numbering Properties) 2: "[MS-DOCX]: Word Extensions to the Office Open XML (.docx) File Format" shows example of not only Korean Numbering also others Numbering examples. https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/b839fe1f-e1ca-4fa6-8c26-5954d0abbccd 2.4 numFmt Extensions https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/a1bb5809-e361-4e49-8e16-7f1a67da4121 Change-Id: I535b2aa3cf4111d86b9b7b788afe4aa64e8e4545 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119518 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-07-23do not use "using namespace std" in headersCollabora2-1/+1
It's a bad style, doing that in headers can affect many source files (especially with PCH used). Change-Id: Ic9091a1d018e74606c9fa95df71a55faaa93d4ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>