summaryrefslogtreecommitdiffstats
path: root/registry
Commit message (Collapse)AuthorAgeFilesLines
* optimise find/insert patternNoel Grandin2019-04-191-4/+1
| | | | | | | | | | if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin constvarsNoel Grandin2019-03-081-1/+1
| | | | | | | | | | | | | | | | | | detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in registry/Gabor Kelemen2019-02-1515-28/+23
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I819bb44e36bdb6ec671cf11bd779085767d82fd0 Reviewed-on: https://gerrit.libreoffice.org/67697 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* loplugin:indentation in registry..saxNoel Grandin2019-02-091-13/+7
| | | | | | | Change-Id: I4b877751818febaec8e64018335dca691a476a43 Reviewed-on: https://gerrit.libreoffice.org/67561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann2019-01-111-1/+2
| | | | | | | | | ...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2018-12-081-1/+1
| | | | | | | | | | ...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* HAVE_CPP_INLINE_VARIABLES is always true nowStephan Bergmann2018-12-071-5/+0
| | | | | | | | | | | | ...but for safety, leave the configure.ac check in for some longer. Also remove now-redundant SAL_INLINE_VARIABLE again (which was LIBO_INTERNAL_ONLY). Change-Id: Id049e0cb84b4f97f5859f1b16b867b39b448dec0 Reviewed-on: https://gerrit.libreoffice.org/64772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:staticmethods improvementNoel Grandin2018-11-161-1/+1
| | | | | | | Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:collapseif in framework..salNoel Grandin2018-11-071-6/+3
| | | | | | | Change-Id: I3068b18f5cff024a48a8f8c68d69cadad30fe4d5 Reviewed-on: https://gerrit.libreoffice.org/62953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fix signatures of deleted copy/assign operatorsNoel Grandin2018-11-022-4/+4
| | | | | | | Change-Id: Id1a0749b78a7021be3564487fb974d7084705129 Reviewed-on: https://gerrit.libreoffice.org/62718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* gbuild: rename value OS=IOS to OS=iOSMichael Stahl2018-11-011-2/+2
| | | | | | | | | | | | | | | | This gets rid of the horrible hack in gbuild.mk to accomodate the case-incorrect iOS platform makefiles that cannot be renamed without upsetting git on file systems that sadly lack the case sensitivity feature. Keep the macro defined to IOS though. Change-Id: I1022bfef4900da00e75fc1ccce786b20f8673234 Reviewed-on: https://gerrit.libreoffice.org/62705 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
* loplugin:useuniqueptr in TypeWriter::createBlopNoel Grandin2018-10-311-3/+3
| | | | | | | Change-Id: Iafc9fdcaeb83d1a383ed60b3b610043d0325cde2 Reviewed-on: https://gerrit.libreoffice.org/62650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski2018-10-271-2/+2
| | | | | | | Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* remove more rtl::OUString and OString prefixesNoel Grandin2018-10-244-30/+30
| | | | | | | | | which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* expression is excessiveCaolán McNamara2018-10-191-1/+1
| | | | | | | Change-Id: I9af0de0d0f3aed565ac396b15821812fd9922779 Reviewed-on: https://gerrit.libreoffice.org/61994 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:constfields in package..registryNoel Grandin2018-10-134-21/+21
| | | | | | | Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d Reviewed-on: https://gerrit.libreoffice.org/61727 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>
* Revert "clang bugprone-unused-return-value"Noel Grandin2018-09-111-1/+2
| | | | | | | | | | | | | | | | | comment from sberg: aren't these changes broken in general, when the called function may throw an exception before it takes ownership of the passed-in pointer? So revert, except for (a) PlainTextFilterDetect::detect, which was definitely a leak (b) SwCursor::FindAll, where unique_ptr was being unnecessarily used This reverts commit 7764ae70b04058a64a3999529e98d1115ba59d1c. Change-Id: I555e651b44e245b031729013d2ce88d26e8a357e Reviewed-on: https://gerrit.libreoffice.org/60301 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang bugprone-unused-return-valueNoel Grandin2018-09-081-2/+1
| | | | | | | | | | | most of these changes just make the change of ownership when using std::unique_ptr clearer, but there is one definite leak fix in PlainTextFilterDetect::detect Change-Id: I8282a68007222a4fee84004f394bde0cca8569e9 Reviewed-on: https://gerrit.libreoffice.org/60159 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in TypeWriter::createBlopNoel Grandin2018-09-051-16/+12
| | | | | | | Change-Id: I33ce7786430d9a8c7cbc835fc5ca381fe5ab8b8f Reviewed-on: https://gerrit.libreoffice.org/59993 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* GCC only supports inline variables since GCC 7Stephan Bergmann2018-08-311-1/+2
| | | | | | | | | | (see also discussion at <https://gerrit.libreoffice.org/#/c/59204/11> "new loplugin:conststringfield" about its changes to registry/source/regimpl.cxx) Change-Id: Id2743adbfeb4d7c42105a65ba8400d7051da2f03 Reviewed-on: https://gerrit.libreoffice.org/59873 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:useuniqueptr in registryNoel Grandin2018-08-301-133/+84
| | | | | | | Change-Id: Ia2f9340183e76e6d46ea51ca62c7a731264f621c Reviewed-on: https://gerrit.libreoffice.org/59773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* replace rtl_allocateMemory with std::mallocNoel Grandin2018-08-294-81/+81
| | | | | | | | | where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin:conststringfieldNoel Grandin2018-08-223-13/+16
| | | | | | | | | | | | | | | | Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* create appendCopy method in OUStringBufferNoel Grandin2018-08-141-1/+1
| | | | | | | | | | | | | | | | so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Add missing sal/log.hxx headersGabor Kelemen2018-07-301-0/+1
| | | | | | | | | | | | | | 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>
* Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara2018-07-271-4/+2
| | | | | | | | Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 Reviewed-on: https://gerrit.libreoffice.org/58093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Related: rhbz#1602589 double_free, convert to std::vectorCaolán McNamara2018-07-261-71/+39
| | | | | | | | Change-Id: I5fa19422d7ee61e7aad74eae86d843072e94016c Reviewed-on: https://gerrit.libreoffice.org/58087 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Related: rhbz#1602589 silence error[memleak]: Memory leak: newValueCaolán McNamara2018-07-261-4/+4
| | | | | | | Change-Id: I2d04c75aa9b5e1d91e06992fdb99899657ecf96d Reviewed-on: https://gerrit.libreoffice.org/58062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:constantparamNoel Grandin2018-06-121-30/+8
| | | | | | | Change-Id: Ia769b3176aea287cd57414d7ce8e88c6da43883e Reviewed-on: https://gerrit.libreoffice.org/55622 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfields in formula..registryNoel Grandin2018-05-171-12/+6
| | | | | | | 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>
* loplugin:constantparamNoel Grandin2018-04-271-4/+4
| | | | | | | Change-Id: I966dcf87be021520e7cc394338b9c0574bb8afee Reviewed-on: https://gerrit.libreoffice.org/53541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constantparamNoel Grandin2018-04-201-5/+5
| | | | | | | Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* More loplugin:cstylecast: registryStephan Bergmann2018-01-154-24/+23
| | | | Change-Id: I2c9436f5f9ea5ef3051d22310dee48ec39fad850
* loplugin:useuniqueptr in comphelper,cppu,registryNoel Grandin2018-01-151-28/+7
| | | | | | | Change-Id: Ib353d901827e417498fe4f8e397f1a57c61a9736 Reviewed-on: https://gerrit.libreoffice.org/47794 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/+3
| | | | | | | | | | | | 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: registryStephan Bergmann2018-01-124-46/+45
| | | | | | | | 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: I496dc091b46b6a67afe52eb12c07824f65f71212
* loplugin:simplifybool for negation of comparison operatorNoel Grandin2017-11-231-1/+1
| | | | | | | Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* improve constparam lopluginNoel Grandin2017-11-025-8/+8
| | | | | | | | | lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constantparam in oox,registry,reportdesignNoel Grandin2017-10-315-16/+11
| | | | | | | Change-Id: I914fa6c6ef2f660eb6b8570c9c5f86cef477be80 Reviewed-on: https://gerrit.libreoffice.org/44093 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:includeform: registryStephan Bergmann2017-10-2310-30/+30
| | | | Change-Id: I499856ba451c71bb53e99d74c5a89f1a185c9386
* overload std::hash for OUString and OStringNoel Grandin2017-10-231-1/+1
| | | | | | | | | 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>
* loplugin:constmethod in codemaker,registry,storeNoel Grandin2017-10-204-82/+82
| | | | | | | Change-Id: Ie75875974f054ff79bd64b1c261e79e2b78eb7fc Reviewed-on: https://gerrit.libreoffice.org/43540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unnecessaryparenNoel Grandin2017-08-181-2/+2
| | | | | | | | | | | look for statements like return (function()); Change-Id: I906cf2183489f87225b99b987caca67e39b26cc3 Reviewed-on: https://gerrit.libreoffice.org/41260 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove unnecessary use of OUString::getStrNoel Grandin2017-08-171-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>
* loplugin:constparams in store,registryNoel Grandin2017-07-174-19/+19
| | | | | | | Change-Id: I5633203b372a9abd0138a396958c235ea8aaf66d Reviewed-on: https://gerrit.libreoffice.org/40039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* extend loplugin useuniqueptr to POD typesNoel Grandin2017-07-141-21/+4
| | | | | | | Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use more OUString::operator== in forms..salNoel Grandin2017-07-131-1/+1
| | | | | | | Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* teach unnecessaryparen loplugin about identifiersNoel Grandin2017-07-101-3/+3
| | | | | | | 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>
* Translate German comments and debug strings (leftovers in r... dirs)Johnny_M2017-06-261-27/+27
| | | | | | | | | | | | | Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "r". Additionally: - Translates test strings in /registry/test/testregcpp.cxx Change-Id: I9fda72a3d1830268c4eb83d67ee7a95e38c31c0d Reviewed-on: https://gerrit.libreoffice.org/39210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>