summaryrefslogtreecommitdiff
path: root/lingucomponent
AgeCommit message (Collapse)AuthorFilesLines
2018-07-16tdf#118647: Improve handling of system spell dictionaries on macOSTor Lillqvist1-12/+100
The system has generic spell dictionaries for languages spoken in many countries, but LibreOffice wants them to correspond to specific language-country combinations. So do it like that then. Change-Id: I9ec4bb4302b2f1eec3ce7b1c1ef8f2be867bad52 Reviewed-on: https://gerrit.libreoffice.org/57220 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/57226 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-18tdf#112442: Use list of available dictionaries, not available localesTor Lillqvist1-8/+14
Also, turn some specific overly generic languages that LO doesn't recognize in this context into the country-specific ones that the dictionary (probably) is for. Skip some odd locales LO doesn't know in this context. In particular, what the system calls the "en" dictionary is for "en_US", and "nb" is for "nb_NO". The "es" one probably is for "es_ES". Also, skip some language-country combinations that LO doesn't recognize in this context. In partiular, "en_JP" and "en_SG". Change-Id: I29450775a263bdc03fd43849380f66e6ffffd09b Reviewed-on: https://gerrit.libreoffice.org/54476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-17loplugin:unusedfields in formula..registryNoel Grandin2-7/+0
Change-Id: I031654d8bb4f1788d364ef4f8d3bf7a05fadb148 Reviewed-on: https://gerrit.libreoffice.org/54454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-12coverity#1430057 rework warning code to use nonwarning patternCaolán McNamara1-7/+6
Change-Id: I1e41e81a88825a7c91ffb9603eb9d769bd41822a Reviewed-on: https://gerrit.libreoffice.org/54143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-07configure option to disable libnumbertextNoel Grandin1-5/+6
Because we get a crash in CppunitTest_sw_odfexport when compiling with clang >= 6.0.0 Also had to fix the ENABLE_LIBNUMBERTEXT being propogated, and the way the code checked it. Change-Id: I68e4a0078016d176f478ca4c1110fc296b6ca921
2018-05-04set -DENABLE_LIBNJUMBERTEXT after pkg-configRene Engelhard1-4/+0
so that we don't "loose" the pkg-config --cflags info. That also makes the #ifdef in lingucomponent/source/numbertext/numbertext.cxx not needed anymore Change-Id: Ia5771859a4a181f1a8a450d9ad4130b1e53abf8e
2018-05-03loplugin:staticaccessStephan Bergmann1-2/+2
Change-Id: Ic62cdd1fd2ba2fe0ecda49505cf7047457d33b87
2018-05-03tdf#117171 support localized number name numbering stylesLászló Németh4-0/+267
in page number, chapter and outline numbering in ~30 languages by integrating libnumbertext library. - offapi: add linguistic2::NumberText New NumberingType constants: - ordinal indicators (1st, 2nd, 3rd...) - cardinal number names (One, Two, Three...) - ordinal number names (First, Second, Third...) Note: these numberings are parts of OOXML, too. Plain text files of Libnumbertext's language data are installed in share/numbertext (similar to share/fingerprint), allowing further customization. Change-Id: I4034da0a40a8c926f14a3f591749a89a8d807d5a Reviewed-on: https://gerrit.libreoffice.org/53313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2018-03-19coverity#1430057 silence Argument cannot be negativeCaolán McNamara1-1/+1
Change-Id: I58bf1a204393ea95c85f51cf9ef3387db1565a4e Reviewed-on: https://gerrit.libreoffice.org/51558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-17loplugin:useuniqueptr in HyphenatorNoel Grandin3-44/+32
Change-Id: Icc45a38858004e1b8ea3a19df40f3cd71c469fdf Reviewed-on: https://gerrit.libreoffice.org/49876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-17loplugin:useuniqueptr in ThesaurusNoel Grandin2-69/+30
Change-Id: I59a2cbeb08242ec1929b0c70f28e1d059dec70ca Reviewed-on: https://gerrit.libreoffice.org/49875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-17loplugin:useuniqueptr in SpellCheckerNoel Grandin2-7/+4
Change-Id: I36a9fe01e228f3f2f5e441c369291da4c461f735 Reviewed-on: https://gerrit.libreoffice.org/49874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-05tdf#108523 Removed @author annotations.Manuj Vashist2-6/+0
Change-Id: I6a60128c413beab6cabb857c073607e15ddbc98f Reviewed-on: https://gerrit.libreoffice.org/49215 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-27lok: Allow whitelisting languages that should be used by LibreOfficeKit.Jan Holesovsky2-0/+8
LOK may get way too many languages if there are dictionaries for them installed which blows the pre-init to >2G easily; let's allow limiting that. Also make the preloading of languages work with the internal spell checking dictionaries and thesauri. Change-Id: I77119970030a7386a5cccbe4fdc89b15eab56ef1 Reviewed-on: https://gerrit.libreoffice.org/48720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-20More loplugin:cstylecast on macOSStephan Bergmann1-2/+2
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870 Reviewed-on: https://gerrit.libreoffice.org/48216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20tdf#112373 Using vector of struct to manage hunspell dictsabstatic2-56/+39
Currently we use arrays allocated on heap for initializing available locales and dictionaries. This patch encapsulates all the different objects related to a dictionary into a strcut dictItem. unique_ptr is used for hunspell, also uses o3tl::make_unique for creating them. Used 'reserve' for better memory allocation of vector. Removed unused member and local variables. Change-Id: I6309c681790cfec4ee9b11119937063bc414cf1f Reviewed-on: https://gerrit.libreoffice.org/48109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-15remove local copies of std::min,std::maxNoel Grandin1-7/+4
Change-Id: I067c4dcabad55180e4734fb06338a8e843713936 Reviewed-on: https://gerrit.libreoffice.org/47692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: lingucomponentStephan Bergmann2-9/+9
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I0aed24dcacb95873df50e34a41a54979ad725e9d
2017-12-15loplugin:salcall (macOS)Stephan Bergmann1-2/+2
Change-Id: I297ac09358ce948acae9b73e8ed605964520c73b Reviewed-on: https://gerrit.libreoffice.org/46437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann1-2/+2
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin4-8/+8
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:salcall handle static methodsNoel Grandin4-12/+12
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01Replace lists by vectors in lingucomponentJulien Nabet5-72/+59
+ use loop ranges Change-Id: I0ae81e3c10a6382d3f5719b2824a70d6e72b1462 Reviewed-on: https://gerrit.libreoffice.org/44169 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-01loplugin:finalclasses in h*,i*,j*Noel Grandin2-4/+4
Change-Id: I3b5f319a88dbe6a9c2ffbfdf991345beda9a2fcd Reviewed-on: https://gerrit.libreoffice.org/44154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-25Related: tdf#80713 allow translation of linguistic service display namesCaolán McNamara3-6/+16
Change-Id: I23309dde1520e20e66d72fe9780454632d5f75b6 Reviewed-on: https://gerrit.libreoffice.org/43718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-24loplugin:includeform: lingucomponent (macOS)Stephan Bergmann1-1/+1
Change-Id: I24d4a68ec7608f6f116337250893d96cdd68b938
2017-10-23loplugin:includeform: lingucomponentStephan Bergmann7-8/+8
Change-Id: I41c38e8dd7b3a782af3f2f5d9f298bca8b633f7a
2017-10-23hardly need a mutex to return a local stringCaolán McNamara1-1/+0
Change-Id: Ic147ad6af32de022802d1d14858197bf61c29a28
2017-10-18strip out trivial indirectionNoel Grandin16-218/+28
Change-Id: If025c6ed77faa52383609367169611c2a3e89360 Reviewed-on: https://gerrit.libreoffice.org/43473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05Fix potential leak in macspellimp.mmJulien Nabet2-6/+4
+ avoid macSpell var I'm not sure to retrieve [NSSpellChecker sharedSpellChecker] in a pointer is a good idea. Most of the examples using sharedSpellChecker just call [NSSpellChecker sharedSpellChecker] each time. If there's a bit more code, at least we're sure we won't leak because of this. Change-Id: I9818bd3d51f26b50849e1a5e69cc705acd92ad29 Reviewed-on: https://gerrit.libreoffice.org/43140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-26Unify hyphenator loading and ensure Unicode paths on WindowsMike Kaganski1-68/+32
Change-Id: I2f910194c541cb0b882c69d03b02749ef9b93d29 Reviewed-on: https://gerrit.libreoffice.org/42777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22loplugin:flatten in framework..packageNoel Grandin1-9/+6
Change-Id: Ide8a97eae6e2fdc7d2dcccba1480ac55a9b555bc Reviewed-on: https://gerrit.libreoffice.org/42593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18Related tdf#112425: fix another leak in MacSpellCheckerJulien Nabet1-4/+3
Apply the same changes in GetProposals than GetSpellFailure Change-Id: Id78966568833f29c21f44724974254218636597d Reviewed-on: https://gerrit.libreoffice.org/42397 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-16tdf#112425: fix leak in MacSpellCheckerJulien Nabet1-4/+3
by using "autorelease" keyword with init vars Change-Id: I056282460b94f8052287f5ad29d26a4870cd06a5 Reviewed-on: https://gerrit.libreoffice.org/42361 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-22loplugin:constparams in editeng,lingucomponentNoel Grandin4-12/+12
Change-Id: I99d9153e3fd1fead34c856ac68a120bb06a003d3 Reviewed-on: https://gerrit.libreoffice.org/40296 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:constparams in soltools and variousNoel Grandin1-2/+2
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1 Reviewed-on: https://gerrit.libreoffice.org/40279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin2-5/+3
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-12loplugin:useuniqueptr in lingucomponentNoel Grandin2-5/+4
Change-Id: I5d668718620114cb8b9d53375497a4d0b1759abb Reviewed-on: https://gerrit.libreoffice.org/39852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin2-2/+2
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-30loplugin:oncevarStephan Bergmann1-4/+2
Change-Id: I285296913f469aa624ececefab488ff4c456f05a
2017-06-29loplugin:oncevar variousNoel Grandin1-2/+1
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6 Reviewed-on: https://gerrit.libreoffice.org/38766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28cleanup unused css/linguistic2/ includesJochen Nitschke8-9/+1
Change-Id: Ifd4b495f965f948d37557d83a03a38df9322039a Reviewed-on: https://gerrit.libreoffice.org/38109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-21cppcheck: unusedStructMemberJochen Nitschke1-16/+1
Change-Id: I1e2859e7a12a61db953be12f11149aaecb462b5b Reviewed-on: https://gerrit.libreoffice.org/37871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-16loplugin:checkunusedparams variousNoel Grandin9-18/+12
Change-Id: I5d1cc807134230d86e0226a12fada204004312d3 Reviewed-on: https://gerrit.libreoffice.org/37675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-05Fix typosAndrea Gelmini4-4/+4
To complete commit 0ef94e2b559547bc4e906e7f24e57ff5d642e108 and f12096272e684ddcd8ffa4e34dcb0a680cc594c2 Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03 Reviewed-on: https://gerrit.libreoffice.org/37199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-04-29Move getProcessWorkingDir from tools to unotoolsChris Sherlock1-2/+2
Change-Id: Ifd86ab3c89c285ad5329fc86cc57967ebd1af91a Reviewed-on: https://gerrit.libreoffice.org/37100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-28loplugin:salunicodeliteral: lingucomponentStephan Bergmann3-12/+12
Change-Id: I130ca7e2d98626f0d187eb69e6ea4b0554f1bd00
2017-04-26use strong_int for LanguageTypeNoel Grandin4-11/+11
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky4-4/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>