summaryrefslogtreecommitdiff
path: root/i18npool
AgeCommit message (Collapse)Author
2022-08-21tdf#135451 - Change the skipSpace implementation of the break iteratorAndreas Heinisch
Change the ICU whitespace function of the break iterator from u_isWhitespace to u_isUWhiteSpace to include no-break spaces. u_isWhitespace includes Java isWhitespace; Z + whitespace ISO controls but excludes no-break spaces u_isUWhiteSpace includes all code points with the Unicode White_Space property; most of general categories "Z" (separators) + most whitespace ISO controls (including no-break spaces, but excluding IS1..IS4) See https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uchar_8h.html for further details. Change-Id: I21fddefaf2149096824908f644310a59d6e2f38d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137582 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-08-19tdf#91764: Combining marks from “complex” scripts can’t be searched forKhaled Hosny
Don’t skip search results that are in the middle of a grapheme cluster (AKA cell in LO speak). It is not clear why it was done like this, as these checks are present all the way back to the first commit of this file: commit 36eb193f4809221af42c01c5ac226a97cf74ec21 Author: Rüdiger Timm <rt@openoffice.org> Date: Tue Apr 8 15:01:00 2003 +0000 INTEGRATION: CWS calc06 (1.1.2); FILE ADDED 2003/03/26 15:54:42 er 1.1.2.1: #i3393# moved from i18n module, cleaned out tools module usage, and added support for regexp But ignoring such results and only for so-called “complex” scripts seems arbitrary, and as the linked issue shows, people want to be able to search for combining marks. Furthermore, it prevents searching for a base character followed by a combining mark, unless ignoring diacritics is enabled. Change-Id: I530788d928861ddfa18dd7b813d0a13f53c0b77b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138410 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-07-22Resolves: tdf#150011 Add HRK Croatian Kuna conversion to EUR EuroEike Rathke
TODO: switch defaults before 2023-01-01 in i18npool/source/localedata/data/hr_HR.xml Change-Id: Ifc62aefbc8c9fe8bbf044f61ae4fd6eeff692185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137371 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-21elide some makeStringAndClear() callsNoel Grandin
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-11Resolves: tdf#141565 Correct character sequence for Devanagari unique IDEike Rathke
A copy-paste error of the Farsi sequence. Change-Id: Ib19f97f0bc3bf018d659f8e998d0daa71e1d5c24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136958 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-15use stack buffer in transliterateImplNoel Grandin
Change-Id: I7c3e24f3974dafeb9abb2af9e2a986003af7bfc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-15unnecessary reallocNoel Grandin
the transliterate functions will realloc the Sequence, no need to do it here Change-Id: Ia53e79b7586679b5c8a2a47c11b86e336195a4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-11Add English (Mauritius) {en-MU} locale dataEike Rathke
Change-Id: Ib384ceb8bdd3268d8d1e076ea2d2d4baeef1f475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135628 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com>
2022-06-06Resolves: tdf#147390 tag oc-FR to oc-FR-lengadoc, oc-ES to oc-ES-aranesEike Rathke
Change-Id: I849e8e2c6cf2a61b81b25c96b79478bc04907b5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135458 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-05Resolves: tdf#148428 Add Dhivehi (Maldives) {dv-MV} locale dataEike Rathke
Co-authored-by: Adam, M. A. <adam7171@gmail.com> Change-Id: Ia8259d8ad67fd4105bffb752d0442102d6576f33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135438 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-05-26clang-tidy modernize-pass-by-value in i18npoolNoel Grandin
Change-Id: I96d99fbdce2b0432676acec8b327cece7c39bcb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17elide some OUString allocationNoel Grandin
Change-Id: Iadd73477bf3b0edaa0fb7db10f9ffca88fe737e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29tdf#148851 Unmap + close file again in xdictionary dtorMichael Weghorn
The file opened and mapped to memory in the `xdictionary` ctor was never unmapped and closed again, resulting in a memory leak. For Android Viewer, this resulted in the app running out of memory after a while when scrolling up and down in the Chinese sample doc from tdf#148851. On Android, closing the file is actually the relevant part, because the content of files from `/assets` is automatically loaded into memory when the files are opened (s. the call to `openMemoryAsFile` in `openFilePath` in `sal/osl/unx/file.cxx`) and that memory is only freed when the file is closed again (s. `osl_closeFile`). When using the sample doc, the file in question was "file:///assets/share/dict_zh.data", which has a size of 2.2 MB and is therefore actually loaded into memory anew every time, since only files below 50 KiB are handled by the file cache introduced in commit 26a46c1143e34e361d76d6459535c2056c59de77 Date: Fri Dec 20 14:46:36 2019 +0000 android: file-cache to improve performance. Fix the memory leak by unmapping and closing the file again in the dtor. Change-Id: I3388964877080d1f2b3cf2682a41549e0bfb850c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133581 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin
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-15apply ICU test workaround to < 70 to "fix" test with ICU 71Rene Engelhard
See also 263961306ede0656ebb7904034a2172615ce81d0 Change-Id: Ib64ec43dba59ffddb34fe7f1a0f0d2e589c3455c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133063 Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2022-04-13Update remaining DevGuide wiki links.Ilmari Lauhakangas
My Kate editor decided to do some whitespace cleanup, but maybe it's fine as the main changes are not targeting functional bits anyway. Change-Id: I5292e77e43055f94a6256a7f72d49fd59287d194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132928 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-12Pick better type for a variableStephan Bergmann
Change-Id: I30916b188c7f8de06aec0719e79aa134a3250aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132890 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-11use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-12tdf#147905 calc PROPER function doesn't like mulithreadingNoel Grandin
regression from commit dac29c278531d5474289eb54aa03987c4958ac83 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Sep 16 11:03:04 2021 +0200 if you hit Transliteration_casemapping hard enough, like in this test case, the state changes become a problem, so remove that by having multiple copies. Change-Id: I1d795af4370d6f79468387997202ba11c6a9d7b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-10Use icu::UnicodeString directlyMike Kaganski
Change-Id: I41b4e64d6d3a9310d819904c8d32c689e6300bcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131296 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-01fix data races in cclass_UnicodeNoel Grandin
WARNING: ThreadSanitizer: data race (pid=1220516) Write of size 4 at 0x7b1c00035510 by thread T19 (mutexes: write M0): i18npool::Transliteration_casemapping::setMappingType(MappingType, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0xe5685) i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0x792fa) i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0x83855) (libutllo.so+0xc6f42) (libsvllo.so+0xc5823) const&) ??:? (libsclo.so+0x4978f3) const&, std::shared_ptr<oox::xls::RichString> const&) :? (libscfiltlo.so+0x46b354) const&, int) :? (libscfiltlo.so+0x46b44a) (libscfiltlo.so+0x4764a0) :? (libscfiltlo.so+0x4764e9) oox::core::ContextHandler2::endFastElement(int) ??:? (libooxlo.so+0x1a10eb) (libexpwraplo.so+0x2fbdf) (libexpwraplo.so+0x2fb21) char const*, unsigned char const*, unsigned char const*) fastparser.cxx:? (libexpwraplo.so+0x2c255) /build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736 (libxml2.so.2+0x5751a) (BuildId: baaa02c136f3351b1c499bbbbe94450b9b9c0d4e) /build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691 (libxml2.so.2+0x5751a) sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) :? (libexpwraplo.so+0x2972d) sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libexpwraplo.so+0x30e88) oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) ??:? (libooxlo.so+0x1a3220) oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467) oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1) oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642) workbookfragment.cxx:? (libscfiltlo.so+0x4b618d) (libcomphelper.so+0x15e63b) (libuno_salhelpergcc3.so.3+0x5257) #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e) (libuno_sal.so.3+0x67e25) Previous write of size 4 at 0x7b1c00035510 by thread T18 (mutexes: write M1): i18npool::Transliteration_casemapping::setMappingType(MappingType, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0xe5685) i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0x792fa) i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&, int, int, com::sun::star::lang::Locale const&) :? (libi18npoollo.so+0x83855) (libutllo.so+0xc6f42) (libsvllo.so+0xc5823) const&) ??:? (libsclo.so+0x4978f3) const&, std::shared_ptr<oox::xls::RichString> const&) :? (libscfiltlo.so+0x46b354) const&, int) :? (libscfiltlo.so+0x46b44a) (libscfiltlo.so+0x4764a0) :? (libscfiltlo.so+0x4764e9) oox::core::ContextHandler2::endFastElement(int) ??:? (libooxlo.so+0x1a10eb) (libexpwraplo.so+0x2fbdf) (libexpwraplo.so+0x2fb21) char const*, unsigned char const*, unsigned char const*) fastparser.cxx:? (libexpwraplo.so+0x2c255) /build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736 (libxml2.so.2+0x5751a) (BuildId: baaa02c136f3351b1c499bbbbe94450b9b9c0d4e) /build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691 (libxml2.so.2+0x5751a) sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) :? (libexpwraplo.so+0x2972d) sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libexpwraplo.so+0x30e88) oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) ??:? (libooxlo.so+0x1a3220) oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467) oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1) oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642) workbookfragment.cxx:? (libscfiltlo.so+0x4b618d) (libcomphelper.so+0x15e63b) (libuno_salhelpergcc3.so.3+0x5257) #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e) (libuno_sal.so.3+0x67e25) Change-Id: Idf8d9c307c09bc1af8541178331af23d146da927 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-28Remove redundant _test from i18npool/CppunitTest*Hossein
As suggested in <https://gerrit.libreoffice.org/c/core/+/125813>, the name of the CppunitTests contain a redundant '_test'. This patch removes this additional word from the name of all the CppunitTests in i18npool. The new names for the tests in i18npool are: CppunitTest_i18npool_break_iterator CppunitTest_i18npool_calendar CppunitTest_i18npool_characterclassification CppunitTest_i18npool_defaultnumberingprovider (unchanged) CppunitTest_i18npool_ordinalsuffix CppunitTest_i18npool_textsearch Change-Id: Ie613c0048a7f156c7d815620f2ccb6578c069e8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130542 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-25tdf#145759 30.6001 -> monthDaysWithoutJanFebHossein
30.6001 shows month days without Jan and Feb. According to the below link, it is calcuated as (365-31-28)/10 = 30.6 but because of a floating point bug, it was used as 30.6001 as a workaround. "30.6001, 25 year old hack?" https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv011.cgi?read=31650 The value 30.6 is used as i18nutil::monthDaysWithoutJanFeb here instead of 30.6001. The new value is ~30.60000038 which is > 30.6, so the calculations should be correct. In order to make sure, a unit test is added, and part of the values are checked against the values calculated by this website: Julian Day and Civil Date Calculator https://core2.gsfc.nasa.gov/time/julian.html Change-Id: I8cc7e046514dc3de652a1c37399e351cb2b614dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125813 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-02-13tdf#147343: Wrong typo for AM/PM indicator in Spanish localesJulien Nabet
Change-Id: I0cc077a94b6f11f67436981033e024e3097c635a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129793 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-12Resolves: tdf#147053 Add Aranese {oc-ES} locale datajavierde22
Change-Id: Id7f1f11a9ebb6b2ad1484e6ff5cdb9e271fc982d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129178 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-02-10i18npool: fix wrong static function symbolsJan-Marek Glogowski
I build a full-language WASM build and the WASM linker was complaining about mismatching function signatures for get_zh_zhuyin and get_zh_pinyin. Turns out LO has two exported functions with the same name but different signatures. For a static build, these collator functions are renamed, so they don't clash, and this was silently calling the wrong functions from i18npool/source/indexentry. Change-Id: I6afe1c3a289dfccea5a5fec41a9a6db37f4e19bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129741 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-02-07tdf#77803: Use NATNUM12 and NATNUM4 for Chinese NumberringKevin Suo
For Chinese, format code NATNUM7 and NATNUM8 are "short lower case text" and "short upper case text", respectively, see [1]. We need full lower and full upper here for numbering purpose, not "short" form. E.g. for number 100, we need "一百" (lower case) and "壹佰" (upper case), rather than "百" which is in short form. Use NATNUM12 for chinese lower, and NATNUM5 for Chinese upper. See bug 147054 for the reason why we do not use NATNUM4 for Chinese lower. [1] https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html Change-Id: I69c93d62f1026117a6d403ade63a9abfbe5c73f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129143 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-27Recheck modules [i-l]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I758bb27e93779e3df21c463714e49354748f446f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-27Resolves: tdf#146602 Add Pennsylvania Dutch {pdc-US} locale dataEike Rathke
Co-authored-by: info@padutchdictionary.com Change-Id: I420847e2cfe1adc8fec6e30392557c1bc8b21ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128998 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-27Add CIRCLED NUMBER TWENTY ONE through CIRCLED NUMBER FIFTY to numbring listKevin Suo
Previously we only supported CIRCLED NUMBER ONE through CIRCLED NUMBER TWENTY. Unicode aready 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>
2022-01-21Output full non-iso locale names, not just language_scriptEike Rathke
Change-Id: I3639dfff2da10afd711be37b6bfede44266c307f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128713 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-03localedata: keep the intermediate %_new.cxx fileJan-Marek Glogowski
Mike tested it, and I tested it on Windows too. But at least for my Linux static build, these files are auto-removed. So tell GNU make we really want to keep them. Change-Id: I00eb191c4d0086de87f895a6e6fe26d1e405cab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127895 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-01Further separate saxparser run from cmp'n'touchJan-Marek Glogowski
At least on Windows the calls to saxparser almost feel as slow as the compilation. So this adds an intermediate file just for the cmp calls, costing just a bit more filesystem space. This also reverts the gb_MKTEMP usage introduced in commit 14eeed686c5490ddbd356c1ac807b16231e4cb88. Using a fixed name in WORKDIR is easier to debug eventually, then some random mktemp generated file, and is faster anyway. Change-Id: Id4979b75b881e916c209ff0ff8e123536294e93b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127841 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-26Avoid OUStringBuffer::toString where possibleMike Kaganski
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-25Convert i18npool_LD_RULE template to pattern ruleJan-Marek Glogowski
No need for various, evaled custom rules. A normal pattern rule is sufficent for this task. Change-Id: I4f7ad0cafb7fe78fc161eab54bb3170003c83ade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127325 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-20Just recompile changed generated localedataJan-Marek Glogowski
Also use random temporary files. Change-Id: If59a9f3ac8e736272ad51747c6a032351a6bec39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127138 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-20osl::Mutex->std::mutex in lcl_LookupTableHelperNoel Grandin
Change-Id: I76989e1f52be35fad63a090809da950ceed8fc69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in TextSearchNoel Grandin
Change-Id: Id424d7b0d2eee12eb53d9dda4445189526b63d2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127114 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20flatten LocaleDataImpl a littleNoel Grandin
no need to store LocaleDataLookupTableItem separately Change-Id: I06de28518fe80f6ae1a22c20af2ff32245b66acc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127112 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20pass by ref in lcl_LookupTableStaticNoel Grandin
rather than passing by pointer and then asserting that the pointer is not null Change-Id: I8df464ca2ae770ab343417fe1b15c378c88110d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-06gbuild: create services.rdb from built componentsJan-Marek Glogowski
... and introduce the --enable-services-rdb-from-build option. Currently the build handles global build options redundant in a few places: * in Repository*mk + modules - the "real" build dependencies * the full services.rdb generation * the static UNO constructor map generation Also the component files don't reflect the really built components and so the RDB services generation must handle the whole options to select the correct components. So this optionally replaces the latter two by generating the list of components and it's constructors from the build itself. As a consequence, component files must now be split, so they reflect the real components in the libraries, otherwise the static constructor list will have missing symbols. IMHO this is more natural, as it happens in the same place already handling these build options for the sourcecode. This also adds a convenience helper to add multiple component files: gb_Library_set_componentfiles This is WIP and currently just works for the stripped WASM build, which introduces many more split component files in later patches. It also explicitly filters the gb_Rdb__URECOMPONENTS and the CppunitTest related components from the services.rdb. Maybe there is a good way to do this properly. Change-Id: I1b38a6f2c1e5221f18d7e5e756c30263b555d962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126185 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-01gbuild: introduce plugin + loader conceptsJan-Marek Glogowski
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-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
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 Grandin
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 i18npoolHarjot
Change-Id: Id67d8926fdc1616add1bd9de051911b2aae030e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125419 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>