Commit Graph
687 Commits
Author SHA1 Message Date
Caolán McNamara d2dc813469 coverity#1430057 silence Argument cannot be negative
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-03-19 21:19:36 +01:00
Noel Grandin c503df794f loplugin:useuniqueptr in Hyphenator
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-17 07:07:02 +01:00
Noel Grandin abf173db4b loplugin:useuniqueptr in Thesaurus
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-17 07:06:55 +01:00
Noel Grandin 35ba29e093 loplugin:useuniqueptr in SpellChecker
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-17 07:06:49 +01:00
Manuj Vashist 68d9583db4 tdf#108523 Removed @author annotations.
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-02-05 11:19:23 +01:00
Jan Holesovsky 3a68b21c21 lok: Allow whitelisting languages that should be used by LibreOfficeKit.
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-27 11:04:32 +01:00
Stephan Bergmann fc528a4680 More loplugin:cstylecast on macOS
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "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-20 10:45:48 +01:00
abstatic 4edc58af36 tdf#112373 Using vector of struct to manage hunspell dicts
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-20 07:26:55 +01:00
Noel Grandin 34d8710fff remove local copies of std::min,std::max
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-15 10:36:17 +01:00
Stephan Bergmann 4b557ffbcc More loplugin:cstylecast: lingucomponent
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
2018-01-12 20:20:29 +01:00
Stephan Bergmann f97125829c loplugin:salcall (macOS)
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-15 08:48:12 +01:00
Stephan Bergmann 6f4f5677ac No need to keep these whitelisted functions decorated with SAL_CALL
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, 3af500580b
"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-14 13:03:06 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
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-11 12:13:46 +01:00
Noel Grandin dd0dceb511 loplugin:salcall handle static methods
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-12-07 11:25:55 +01:00
Julien Nabet a14892eda2 Replace lists by vectors in lingucomponent
+ 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-01 20:37:54 +01:00
Noel Grandin dd8060ddc4 loplugin:finalclasses in h*,i*,j*
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-11-01 13:30:59 +01:00
Caolán McNamara 57f649dc9a Related: tdf#80713 allow translation of linguistic service display names
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-25 11:09:16 +02:00
Stephan Bergmann ed8cdc0946 loplugin:includeform: lingucomponent (macOS)
Change-Id: I24d4a68ec7608f6f116337250893d96cdd68b938
2017-10-24 11:54:56 +02:00
Stephan Bergmann c8ea69a2fb loplugin:includeform: lingucomponent
Change-Id: I41c38e8dd7b3a782af3f2f5d9f298bca8b633f7a
2017-10-23 22:46:02 +02:00
Caolán McNamara daa6fe9f04 hardly need a mutex to return a local string
Change-Id: Ic147ad6af32de022802d1d14858197bf61c29a28
2017-10-23 13:14:16 +01:00
Noel Grandin 5cff38911c strip out trivial indirection
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-18 10:53:02 +02:00
Julien Nabet cfce9b4180 Fix potential leak in macspellimp.mm
+ 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-10-05 06:38:00 +02:00
Mike Kaganski d46ae90809 Unify hyphenator loading and ensure Unicode paths on Windows
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-26 14:06:28 +02:00
Noel Grandin b63609ba54 loplugin:flatten in framework..package
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-22 08:30:10 +02:00
Mike Kaganski afeff9102c Use even more WIN32_LEAN_AND_MEAN
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-18 01:13:30 +02:00
Julien Nabet 11fcdecb63 Related tdf#112425: fix another leak in MacSpellChecker
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-18 00:11:42 +02:00
Julien Nabet 83288332f7 tdf#112425: fix leak in MacSpellChecker
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-09-16 22:54:56 +02:00
Noel Grandin c82cf38427 loplugin:constparams in editeng,lingucomponent
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-22 09:12:56 +02:00
Noel Grandin ec340697d6 loplugin:constparams in soltools and various
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-21 17:11:15 +02:00
Noel Grandin db3860062e extend loplugin useuniqueptr to OUString pointers
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-17 07:23:22 +02:00
Noel Grandin 0088f365b1 loplugin:useuniqueptr in lingucomponent
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-12 15:52:28 +02:00
Noel Grandin 4250b25c6a teach unnecessaryparen loplugin about identifiers
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-10 09:57:24 +02:00
Stephan Bergmann d6db18316b loplugin:oncevar
Change-Id: I285296913f469aa624ececefab488ff4c456f05a
2017-06-30 09:55:00 +02:00
Noel Grandin 71112060e0 loplugin:oncevar various
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-06-29 08:18:35 +02:00
Jochen Nitschke 2e0444d316 cleanup unused css/linguistic2/ includes
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-28 17:27:45 +02:00
Jochen Nitschke c8d8b9b70e cppcheck: unusedStructMember
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-21 16:15:31 +02:00
Noel Grandin 6df22f0ec5 loplugin:checkunusedparams various
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-16 14:20:27 +02:00
Andrea Gelmini a940826162 Fix typos
To complete commit 0ef94e2b55
and f12096272e

Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03
Reviewed-on: https://gerrit.libreoffice.org/37199
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-05 23:35:06 +02:00
Chris Sherlock ad3e1afe59 Move getProcessWorkingDir from tools to unotools
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-29 18:38:09 +02:00
Stephan Bergmann 6d4a0474b3 loplugin:salunicodeliteral: lingucomponent
Change-Id: I130ca7e2d98626f0d187eb69e6ea4b0554f1bd00
2017-04-28 18:26:58 +02:00
Noel Grandin c70d49c7c8 use strong_int for LanguageType
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-26 08:50:54 +02:00
David Ostrovsky de030cd7a2 gbuild: Remove MSVC 2013 legacy code
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>
2017-04-21 18:18:44 +02:00
Andrea Gelmini 98ef3edb8a Fix typos
Change-Id: Id5811d092917c872715559f4508d01e4173d090c
Reviewed-on: https://gerrit.libreoffice.org/35636
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 11:02:47 +00:00
Stephan Bergmann 7778d9f51b Prevent calls to rtl/character.hxx functions with (signed) char arguments
...that would implicitly be sign extended (for plain char only if it is signed),
so non-ASCII char values would trigger the isUnicodeCodePoint assert.

Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91
Reviewed-on: https://gerrit.libreoffice.org/35523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-22 09:00:57 +00:00
Andrea Gelmini 5bea199bae Fix typos
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-03-02 12:39:35 +00:00
Stephan Bergmann 4520435ad5 Clean up use of integer types
Change-Id: I06364be5bbbe7862d20ea24ee155cf468f63f0b0
2017-02-25 16:50:23 +01:00
Khaled Hosny 2d028dfe84 Prefix members
Change-Id: I342ac49877c928c52eb3001f5a7bab07588636fa
Reviewed-on: https://gerrit.libreoffice.org/34463
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-02-20 14:36:01 +00:00
Stephan Bergmann 6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Stephan Bergmann e57ca02849 Remove dynamic exception specifications
...(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-26 12:54:43 +00:00
Stephan Bergmann 2d26f7fb7f loplugin:dynexcspec (macOS), lingucomponent
Change-Id: I11f7419babd1ceb158ab0a329dd3d8699b7b2702
2017-01-20 13:00:07 +01:00