summaryrefslogtreecommitdiff
path: root/i18npool
AgeCommit message (Collapse)Author
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>
2021-11-20Change aboveWord and belowWord for Simplified Chinese localeKevin Suo
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 Balabanov
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 Grandin
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_hijriHossein
* 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_hijriHossein
* 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 Rathke
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.01745329251994Hossein
* 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 Grandin
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 Grandin
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 Grandin
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 Glogowski
... 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 Glogowski
... registration. Change-Id: Ice406aa6e8817b4281cc3905d2ba2703ce482c18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124440 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>