summaryrefslogtreecommitdiff
path: root/linguistic
AgeCommit message (Collapse)AuthorFilesLines
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke2-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>
2018-06-02mergedlibs failure with duplicate SwXStringKeyMapCaolán McNamara2-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>
2018-06-01linguistic: add functionality to change spellcheck colorFred Kruse2-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>
2018-04-16Defer grammar checker thread creation until use.Michael Meeks1-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>
2018-04-15remove some unused comphelper includesJochen Nitschke1-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>
2018-04-14Fix typosAndrea Gelmini1-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>
2018-04-07assert on empty lineCaolán McNamara1-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>
2018-03-25Use for-range loops in some modulesJulien Nabet7-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>
2018-03-12loplugin:redundantfcastStephan Bergmann1-1/+1
Change-Id: I078d226b0cdec46ce1b5e36379cc9144fd865aa2
2018-03-08loplugin:constantparam in linguistic..sfx2Noel Grandin1-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>
2018-03-08loplugin:unusedmethodsNoel Grandin2-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>
2018-02-12cppcheck useInitializationListJochen Nitschke1-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>
2018-01-30Typ-o negativIlmari Lauhakangas1-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>
2018-01-29loplugin:useuniqueptr in SpellCheckerDispatcherNoel Grandin2-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>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-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>
2018-01-12More loplugin:cstylecast: linguisticStephan Bergmann8-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
2018-01-05Add optional title: field to user dictionariesLászló Németh3-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>
2017-12-19inline use-once typedefsNoel Grandin1-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>
2017-12-11loplugin:salcall fix functionsNoel Grandin9-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>
2017-12-07loplugin:salcall handle static methodsNoel Grandin2-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>
2017-11-30xmloff: turn SvXMLImportContext into a no-op base classMichael Stahl2-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
2017-11-22drop duplicate methodCaolán McNamara1-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>
2017-11-17tdf#113739 add "Grammar By" feature to user dictionariesLászló Németh1-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>
2017-11-04loplugin:constparams in various(1)Noel Grandin1-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>
2017-10-31loplugin:constantparam in i18nlangtagNoel Grandin1-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>
2017-10-23loplugin:includeform: linguisticStephan Bergmann27-37/+37
Change-Id: I4a1db5d06511221a656367e7b0457144335ae10c
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-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>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-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>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin1-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>
2017-09-22ofz: don't leak in face of exceptionsCaolán McNamara1-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>
2017-09-18unused nResMaxNumberOfSuggestions in PropertyHelper_SpellNoel Grandin1-4/+1
since commit a111044babf3ee929baf548b7ad29df0a419293b Date: Wed Jul 15 10:49:17 2015 +0200 loplugin:unusedmethods linguistic Change-Id: I329c53b739395e9332b767562a138b52ce2fe588
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-1/+1
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-3/+3
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-3/+3
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:constparams handle constructorsNoel Grandin2-8/+8
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:constparams in linguisticNoel Grandin8-18/+18
Change-Id: I7495c476b52a804971eaa97db011530842025fa9 Reviewed-on: https://gerrit.libreoffice.org/40221 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin1-32/+16
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-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-07-06loplugin unnecessaryparan improvementsNoel Grandin1-2/+2
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: linguisticStephan Bergmann1-5/+1
Change-Id: I9d3a91a15dc748567b03709750e416f5f54cb579
2017-06-25loplugin:oncevar in l10ntools..mysqlcNoel Grandin4-18/+11
Change-Id: Ifd4826f8ba4e10f2e012172fa693794d68bb6b4d Reviewed-on: https://gerrit.libreoffice.org/39188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in jvmfwk..mysqlcNoel Grandin3-9/+2
Change-Id: If9c7a3239fceba9a2db3a5905ccaa7fa9adadb08 Reviewed-on: https://gerrit.libreoffice.org/39099 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin4-23/+24
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke2-4/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin1-1/+1
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke1-1/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin1-8/+5
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-07tdf#108349: fix LanguageType conversions from UNO "short"Michael Stahl1-3/+3
The bugdoc uses LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076). The UNO API uses signed "short" for these in various interfaces, and so the LanguageType constructor complains about out-of-(short)-range values. Avoid this by deleting the problematic constructor, so that the places that currently call it with API parameters can be changed to first cast the parameter to unsigned. (Yes, we need to write "template<>" twice in a row. Don't ask me why, i just work here. sberg says we also need to omit the explict <short>.) Change-Id: I2443a89bc8d579504fc707ded3d145f9a625597a Reviewed-on: https://gerrit.libreoffice.org/38473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-28cleanup unused css/linguistic2/ includesJochen Nitschke10-11/+2
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-18Revert "Fix typos"Stephan Bergmann1-1/+1
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".