summaryrefslogtreecommitdiffstats
path: root/linguistic
Commit message (Collapse)AuthorAgeFilesLines
* tdf#42949 Fix IWYU warnings in include/svl/*Gabor Kelemen2018-11-143-0/+3
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ide75232858599c275e023c2300201090acd22307 Reviewed-on: https://gerrit.libreoffice.org/63237 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Simplify and fix Java UNO API test makefilesJan-Marek Glogowski2018-11-091-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Originally I just wanted to add the juh.jar to the list of jars of the UNO API tests, but this became tedious work, so after the first few files I decided to replace the similiar makefiles with a common define for the *_unoapi* tests. This patch adds two new make defines to be used used by Java UNO and UNO API tests: - gb_JunitTest_set_unoapi_test_defaults - gb_JunitTest_set_unoapi_test_class_and_jars The first one will deduce most defaults from the test name, but still allows to optionally override most settings. If a test doesn't match the default at all, the 2nd define still shares the common jar files and the main Java UNO class, so the second define adds these to your makefile. The real fix is to add juh.jar to gb_JunitTest_use_jars. Change-Id: I4342fdac5e31f85ea18fb4268e13c287a7adc2b7 Reviewed-on: https://gerrit.libreoffice.org/63118 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski2018-11-041-7/+2
| | | | | | | Change-Id: I3432afca1ee9bf9e8adce1d55d58d57bf1a09cb4 Reviewed-on: https://gerrit.libreoffice.org/62847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* fix signatures of deleted copy/assign operatorsNoel Grandin2018-11-021-2/+2
| | | | | | | Change-Id: Id1a0749b78a7021be3564487fb974d7084705129 Reviewed-on: https://gerrit.libreoffice.org/62718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy performance-unnecessary-copy-init in idl..reportdesignNoel Grandin2018-10-231-4/+3
| | | | | | | Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfields improvemementsNoel Grandin2018-10-221-2/+0
| | | | | | | | | | treat fields touched in operator== as not being important, which finds some more stuff (but also adds some false+) Change-Id: I3f5d504d7dec7945a917afbcd58c92df74f03645 Reviewed-on: https://gerrit.libreoffice.org/62020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy readability-container-size-emptyNoel Grandin2018-10-191-1/+1
| | | | | | | Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy readability-redundant-smartptr-getNoel Grandin2018-10-173-11/+11
| | | | | | | | | redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:singlevalfieldsNoel Grandin2018-10-171-11/+2
| | | | | | | | | tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann2018-10-091-1/+1
| | | | | | | | | | | | | | | | ...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen2018-10-083-0/+3
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* New loplugin:externalStephan Bergmann2018-09-1710-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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>
* tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen2018-09-131-0/+1
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen2018-09-105-0/+6
| | | | | | | | | | 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>
* clang-tidy performance-inefficient-vector-operationNoel Grandin2018-09-051-1/+2
| | | | | | | Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in LngSvcMgrNoel Grandin2018-08-152-37/+24
| | | | | | | Change-Id: I3c8046a70ffce402d52caf2e7b77fa9951103f99 Reviewed-on: https://gerrit.libreoffice.org/59011 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:returnconstant in linguistic,lotuswordproNoel Grandin2018-08-131-37/+29
| | | | | | | Change-Id: If5c7d936020e5470b09c2fe54d41fb006c296a34 Reviewed-on: https://gerrit.libreoffice.org/58877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Add missing sal/log.hxx headersGabor Kelemen2018-07-3011-0/+11
| | | | | | | | | | | | | | rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* Fix typosAndrea Gelmini2018-07-181-1/+1
| | | | | | | Change-Id: I5195d13b351c0eebad1eae901f7ce8408a9e5c92 Reviewed-on: https://gerrit.libreoffice.org/57028 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
* tdf#117620 Localize the temporary IgnoreAllList dictionarys nameGabor Kelemen2018-06-263-8/+10
| | | | | | | | | | Also give it a human readable original name Change-Id: I86060badac145e7b60cf7dc2e67e16e7c84c2837 Reviewed-on: https://gerrit.libreoffice.org/56143 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
* tdf#42949 remove unused compheler includes ..Jochen Nitschke2018-06-052-2/+0
| | | | | | | | | and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* mergedlibs failure with duplicate SwXStringKeyMapCaolán McNamara2018-06-022-13/+13
| | | | | | | | | just rename this one for a quick fix Change-Id: Iae9152356640c3454a73b56f7e097d084d8eb3a0 Reviewed-on: https://gerrit.libreoffice.org/55210 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* linguistic: add functionality to change spellcheck colorFred Kruse2018-06-012-0/+90
| | | | | | | | | | | This adds a way for the grammar checker extension to change color and line type of the 'wiggly lines' LibreOffice uses to highlight spelling or grammar errors. Change-Id: Idd669cf362da34f8cfcdcec14f1f80df1ddb1f9e Reviewed-on: https://gerrit.libreoffice.org/54927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* Defer grammar checker thread creation until use.Michael Meeks2018-04-161-1/+3
| | | | | | | | | Avoid this thread being started and stranded in the forkit. Change-Id: Ia79cdac729a85960c2b5a83af265d67af07b74aa Reviewed-on: https://gerrit.libreoffice.org/52980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* remove some unused comphelper includesJochen Nitschke2018-04-151-1/+0
| | | | | | | | | and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
* Fix typosAndrea Gelmini2018-04-141-1/+1
| | | | | | | Change-Id: I28d9591517c324e995691139582c77b5cfdc9d77 Reviewed-on: https://gerrit.libreoffice.org/52211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* assert on empty lineCaolán McNamara2018-04-071-1/+1
| | | | | | | | Change-Id: Ifa3cccb13a3595998d4c85957a69fb7ecb047dd0 Reviewed-on: https://gerrit.libreoffice.org/52525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Use for-range loops in some modulesJulien Nabet2018-03-257-43/+27
| | | | | | | | | | jvmaccess, jvmfwk, l10ntools, libreofficekit and linguistic Change-Id: I9d290d1098b25ccb3aee19d2df18c18f4aa65105 Reviewed-on: https://gerrit.libreoffice.org/51495 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:redundantfcastStephan Bergmann2018-03-121-1/+1
| | | | Change-Id: I078d226b0cdec46ce1b5e36379cc9144fd865aa2
* loplugin:constantparam in linguistic..sfx2Noel Grandin2018-03-081-5/+5
| | | | | | | Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedmethodsNoel Grandin2018-03-082-10/+0
| | | | | | | Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cppcheck useInitializationListJochen Nitschke2018-02-121-2/+0
| | | | | | | | | | unique_ptr don't need explicit nullptr initialization, same goes for VclPtr in ImpEditEngine. Change-Id: Id8f3163c2719bee6ee2724cae98449d564be5535 Reviewed-on: https://gerrit.libreoffice.org/49559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Typ-o negativIlmari Lauhakangas2018-01-301-3/+3
| | | | | | | | | Fixed some typos and translated a couple of German words Change-Id: I24ae28dd537ba283a9480413659f85bd6711acad Reviewed-on: https://gerrit.libreoffice.org/48892 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:useuniqueptr in SpellCheckerDispatcherNoel Grandin2018-01-292-11/+8
| | | | | | | | | | the call to ClearSvcList() was also unnecessary, the map will get cleared by the destructor anyway Change-Id: I24a077143c0cd57b0cfef721169c62f5b283b9c9 Reviewed-on: https://gerrit.libreoffice.org/48739 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* convert a<b?a:b to std::min(a,b)Noel Grandin2018-01-151-2/+1
| | | | | | | | | | | | with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* More loplugin:cstylecast: linguisticStephan Bergmann2018-01-128-33/+33
| | | | | | | | 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: Ic1b6e8fbf3ba8d3477ee3f5539667427d26c2f43
* Add optional title: field to user dictionariesLászló Németh2018-01-053-8/+43
| | | | | | | | | | | | | | | | LibreOffice stores the title of an user dictionary only in its file name, but special characters in file names can result configuration problem for user dictionaries shipped with LibreOffice. Optional "title:" field of user dictionaries supports custom titles with spaces and other UTF-8 characters. Change-Id: Idbc4c41a2e08f50cfc0fc0d25e960084f5773bec Reviewed-on: https://gerrit.libreoffice.org/47397 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
* inline use-once typedefsNoel Grandin2017-12-191-2/+1
| | | | | | | Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:salcall fix functionsNoel Grandin2017-12-119-18/+18
| | | | | | | | | | 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>
* loplugin:salcall handle static methodsNoel Grandin2017-12-072-2/+2
| | | | | | | 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>
* xmloff: turn SvXMLImportContext into a no-op base classMichael Stahl2017-11-302-2/+2
| | | | | | | | | | | | | | | | Fix the non-obvious and potentially dangerous recursion that is implicit in xmloff's context code. SvXMLImportContext::CreateChildContext() now always creates a SvXMLImportContext, does not delegate to SvXMLImport. Rename CreateContext to CreateDocumentContext, to make its purpose of creating only the top-level context more obvious. With the previous changes to CreateContext overrides in sw, reportdesign and dbaccess, this hopefully shouldn't break anything. Change-Id: I9e147bf6297bbac9e8470454881da73f6e39db0a
* drop duplicate methodCaolán McNamara2017-11-221-3/+3
| | | | | | | Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#113739 add "Grammar By" feature to user dictionariesLászló Németh2017-11-171-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Language-specific user dictionaries (en-US, de-DE, etc.) have got a new "Grammar By" field to specify optional automatic affixation and compounding of the new words by adding an example dictionary word. Test example: Create an en-US user dictionary. Add the new word "crowdfund" to it, also an example, the Hunspell en-US dictionary word "fund" in the optional "Grammar By" field. This way, the word "crowdfund" will be recognized by the spell checker with suffixes of the word "fund", too: crowdfund’s, crowdfunds, crowdfunder, crowdfunders and crowdfunding. Hunspell dictionaries with compound flag usage (German, Hungarian, etc.) can support automatic compounding of the new words, too. Change-Id: Id70dbee4544643967153f730ae64938e5cee0c82 Reviewed-on: https://gerrit.libreoffice.org/44562 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
* loplugin:constparams in various(1)Noel Grandin2017-11-041-1/+1
| | | | | | | Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b Reviewed-on: https://gerrit.libreoffice.org/44261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constantparam in i18nlangtagNoel Grandin2017-10-311-25/+17
| | | | | | | Change-Id: I148a47a9b63b78651ec18cd947f45b8f4dbb9345 Reviewed-on: https://gerrit.libreoffice.org/44094 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:includeform: linguisticStephan Bergmann2017-10-2327-37/+37
| | | | Change-Id: I4a1db5d06511221a656367e7b0457144335ae10c
* overload std::hash for OUString and OStringNoel Grandin2017-10-231-2/+2
| | | | | | | | | no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* add << operator for css::uno::ExceptionNoel Grandin2017-10-041-3/+2
| | | | | | | Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
* loplugin:flatten check for throw in then clauseNoel Grandin2017-09-291-5/+3
| | | | | | | | | | | also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* ofz: don't leak in face of exceptionsCaolán McNamara2017-09-221-8/+8
| | | | | | | | Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2 Reviewed-on: https://gerrit.libreoffice.org/42587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>