summaryrefslogtreecommitdiff
path: root/i18npool/source
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-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-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-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>
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-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-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-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-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>