summaryrefslogtreecommitdiff
path: root/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski1-1/+1
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-23cid#1546006 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545999 COPY_INSTEAD_OF_MOVE cid#1545995 COPY_INSTEAD_OF_MOVE cid#1545994 COPY_INSTEAD_OF_MOVE cid#1545989 COPY_INSTEAD_OF_MOVE cid#1545982 COPY_INSTEAD_OF_MOVE cid#1545977 COPY_INSTEAD_OF_MOVE cid#1545970 COPY_INSTEAD_OF_MOVE cid#1545856 COPY_INSTEAD_OF_MOVE cid#1545845 COPY_INSTEAD_OF_MOVE cid#1545838 COPY_INSTEAD_OF_MOVE cid#1545776 COPY_INSTEAD_OF_MOVE cid#1545774 COPY_INSTEAD_OF_MOVE cid#1545744 COPY_INSTEAD_OF_MOVE cid#1545719 COPY_INSTEAD_OF_MOVE cid#1545716 COPY_INSTEAD_OF_MOVE cid#1545687 COPY_INSTEAD_OF_MOVE cid#1545648 COPY_INSTEAD_OF_MOVE cid#1545643 COPY_INSTEAD_OF_MOVE cid#1545641 COPY_INSTEAD_OF_MOVE cid#1545604 COPY_INSTEAD_OF_MOVE cid#1545531 COPY_INSTEAD_OF_MOVE cid#1545530 COPY_INSTEAD_OF_MOVE cid#1545524 COPY_INSTEAD_OF_MOVE cid#1545516 COPY_INSTEAD_OF_MOVE cid#1545501 COPY_INSTEAD_OF_MOVE cid#1545486 COPY_INSTEAD_OF_MOVE Change-Id: Idcf3e27bb9e81b6a77d5ef75c9376eb1d6aff8c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2022-06-10new loplugin:moveitNoel Grandin1-1/+1
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27Recheck modules [i-l]* with IWYUGabor Kelemen1-6/+0
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>
2021-08-02convert #defines to OUStringLiteralNoel Grandin1-1/+1
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski1-1/+1
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel1-1/+1
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11loplugin:stringviewNoel1-4/+4
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02Use the new single-instance="true" attribute in lingucomponentStephan Bergmann1-3/+2
Change-Id: I802ee5ac618aa706b126630c8bb4e7e2e83c59f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103852 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-20fix SAL_WARN when instantiating ThesaurusNoel Grandin1-1/+4
Before commit 3fbadfa1ad41a3477804c592e06caec708c05218 lingucomponent: create instances with uno constructors Thesaurus was constructed but Thesaurus::initialize was NOT being called from GetAvailLocales. However, we have some code marked "HACK" in cppuhelper/source/servicemanager.cxx i.e. ServiceManager....::createInstanceWithArguments which DOES call initialize. And we have code in GetAvailLocales which passes what Thesuarus considers an invalid number of arguments, because all the other similar services DO take 2 args (even though they don't use the second arg!) So we have a bunch of temporary hack and backwards compat stuff interacting, causing a SAL_WARN. So make Thesauras::initialize a little more tolerant, which means we're now initialising it, which is a change in behaviour, so if this commit comes up a regression, we will need find another warn to stop the warning. Change-Id: I60e0ed1bd2d4fbccbc539b5536aba055a7dfc6c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99039 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-14lingucomponent: create instances with uno constructorsNoel Grandin1-37/+8
See tdf#74608 for motivation. Change-Id: I11770c8873d14cfd0e438fb580d8d0ea9e99f594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98709 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of whitelist with allowlistThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-07loplugin:flatten in lingucomponentNoel Grandin1-16/+16
Change-Id: Ic0bf912a22e8efeae1a4f4864397f3f3d474c632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-19sal_Char->char in idlc..linguisticNoel Grandin1-1/+1
Change-Id: Ib30fe34123ad7e5d892e8db9c742e08c4ca8fcd2 Reviewed-on: https://gerrit.libreoffice.org/85477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-24cppcheck: performing init in init list (hwpfilter, i., l.)Julien Nabet1-4/+2
Change-Id: Idf5b7be45d48076fbe191fbf1a2fa63c6da71902 Reviewed-on: https://gerrit.libreoffice.org/83617 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-30Simplify Sequence iterations in lingucomponent..lotuswordproArkadiy Illarionov1-40/+23
Use range-based loops, STL and comphelper functions. Change-Id: I975a9c09265976d5ce4a1d7ac2023cbb75bb7f28 Reviewed-on: https://gerrit.libreoffice.org/78242 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I72cc7132721706b3a5e06480efbae42065c36661 Reviewed-on: https://gerrit.libreoffice.org/77319 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-29loplugin:sequentialassignNoel Grandin1-5/+3
Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f Reviewed-on: https://gerrit.libreoffice.org/76501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-21loplugin:referencecasting in variousNoel Grandin1-1/+1
Change-Id: Id4e3d9d1bbfd47181299568afec45e996eb1eed5 Reviewed-on: https://gerrit.libreoffice.org/76071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-17Use hasElements to check Sequence emptiness in [l-r]*Arkadiy Illarionov1-7/+7
Similar to clang-tidy readability-container-size-empty Change-Id: Idd67f332b04857a39df26bad1733aae21236f105 Reviewed-on: https://gerrit.libreoffice.org/71764 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-1/+1
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04tdf#42949 Fix IWYU warnings in include/linguistic/Gabor Kelemen1-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iec1ca76e9b3a0896a732ab2b7fd34dd5a7f219fb Reviewed-on: https://gerrit.libreoffice.org/68367 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-1/+1
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-1/+1
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-17loplugin:useuniqueptr in HyphenatorNoel Grandin1-1/+0
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 Grandin1-63/+19
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-01-27lok: Allow whitelisting languages that should be used by LibreOfficeKit.Jan Holesovsky1-0/+4
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-12More loplugin:cstylecast: lingucomponentStephan Bergmann1-5/+5
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-11loplugin:salcall fix functionsNoel Grandin1-2/+2
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 Grandin1-3/+3
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 Nabet1-15/+14
+ 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-10-25Related: tdf#80713 allow translation of linguistic service display namesCaolán McNamara1-2/+6
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-18strip out trivial indirectionNoel Grandin1-3/+6
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-07-22loplugin:constparams in editeng,lingucomponentNoel Grandin1-3/+3
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-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-1/+1
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-05-28cleanup unused css/linguistic2/ includesJochen Nitschke1-0/+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-16loplugin:checkunusedparams variousNoel Grandin1-1/+1
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 Gelmini1-1/+1
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-26use strong_int for LanguageTypeNoel Grandin1-6/+6
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-03-02Fix typosAndrea Gelmini1-1/+1
Change-Id: Ic6c41fbcc36c11a7528cde0986593a39c2d6738b Reviewed-on: https://gerrit.libreoffice.org/34803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-12/+0
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, lingucomponentStephan Bergmann1-0/+1
Change-Id: Iebd0a98c86803342ee54f30c848e7194a752335f
2016-12-12remove useless Mutex guardsNoel Grandin1-1/+0
Change-Id: Ib1edb681b47ce98e2e810d15111932002786aa51 Reviewed-on: https://gerrit.libreoffice.org/31875 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-24we shouldn't need explicit lt_rtl_OUString, etc things anymoreCaolán McNamara1-2/+2
Change-Id: Ibeec3fcc353e07e61fb2c838b318e0a04081ce2c
2016-07-20The thesaruses are in mythes formatCaolán McNamara1-1/+1
Change-Id: Idf633d7d310c920ae605b7a1996d251352fad079
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-14/+14
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-1/+1
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-16no need to take a mutex when only dealing with stack-local dataNoel Grandin1-4/+0
Change-Id: Ie45e626aad55a8174a53b769a98601bf54dedf65 Reviewed-on: https://gerrit.libreoffice.org/19979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>