summaryrefslogtreecommitdiff
path: root/registry
AgeCommit message (Collapse)AuthorFilesLines
2019-10-23size some stringbuffer to prevent re-allocNoel Grandin2-2/+3
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03tdf#127766: Avoid ODR violation for class/struct FieldEntryTor Lillqvist1-0/+2
We had a class FieldEntry in registry/source/reflwrit.cxx and a struct FieldEntry in sd/source/filter/eppt/text.hxx. That causes problems when code from both is linked into one binary, as in the iOS and Android apps. The wrong FieldEntry destructor got called from the code in sd which of course lead to a crash. Fix by putting the one in registry into an unnamed namespace. (I put a large chunk of the source file in it while at it.) Change-Id: I1b32075f7aba256129b36ceb38eba605c882b9ff Reviewed-on: https://gerrit.libreoffice.org/80141 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-10-01loplugin:stringadd in package..saxNoel Grandin2-22/+11
Change-Id: I1f8b626ae99bca6e31e7c4aa9c8a1fc016b76e5c Reviewed-on: https://gerrit.libreoffice.org/79890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-31Add version resource to executables where it was missingMike Kaganski2-0/+4
Change-Id: Iee965c3f720827b20347f6228e891562c8295d22 Reviewed-on: https://gerrit.libreoffice.org/78327 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia40e7a9031ae5a8385a84f177a9444f4d4f348b4 Reviewed-on: https://gerrit.libreoffice.org/77302 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-30Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia5fba032635adbf85bdfcb1eb0b3ffb9cf9d4a6a Reviewed-on: https://gerrit.libreoffice.org/76548 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-23close some more holes in structuresNoel Grandin1-5/+4
and improve the pahole script so I can just run it once over the whole codebase Change-Id: I7e1775974a3a61f8c0e40646158f01163ace60cc Reviewed-on: https://gerrit.libreoffice.org/76122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-07Fix typosAndrea Gelmini2-2/+2
Change-Id: Iec0824418063fa4d146d9d48f3c74561fc0c5a67 Reviewed-on: https://gerrit.libreoffice.org/73631 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-19optimise find/insert patternNoel Grandin1-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>
2019-03-08new loplugin constvarsNoel Grandin1-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>
2019-02-15tdf#42949 Fix IWYU warnings in registry/Gabor Kelemen15-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>
2019-02-09loplugin:indentation in registry..saxNoel Grandin1-13/+7
Change-Id: I4b877751818febaec8e64018335dca691a476a43 Reviewed-on: https://gerrit.libreoffice.org/67561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann1-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>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann1-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>
2018-12-07HAVE_CPP_INLINE_VARIABLES is always true nowStephan Bergmann1-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>
2018-11-16loplugin:staticmethods improvementNoel Grandin1-1/+1
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-07loplugin:collapseif in framework..salNoel Grandin1-6/+3
Change-Id: I3068b18f5cff024a48a8f8c68d69cadad30fe4d5 Reviewed-on: https://gerrit.libreoffice.org/62953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-02fix signatures of deleted copy/assign operatorsNoel Grandin2-4/+4
Change-Id: Id1a0749b78a7021be3564487fb974d7084705129 Reviewed-on: https://gerrit.libreoffice.org/62718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-01gbuild: rename value OS=IOS to OS=iOSMichael Stahl1-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>
2018-10-31loplugin:useuniqueptr in TypeWriter::createBlopNoel Grandin1-3/+3
Change-Id: Iafc9fdcaeb83d1a383ed60b3b610043d0325cde2 Reviewed-on: https://gerrit.libreoffice.org/62650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-27tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski1-2/+2
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin4-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>
2018-10-19expression is excessiveCaolán McNamara1-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>
2018-10-13loplugin:constfields in package..registryNoel Grandin4-21/+21
Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d Reviewed-on: https://gerrit.libreoffice.org/61727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-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>
2018-09-11Revert "clang bugprone-unused-return-value"Noel Grandin1-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>
2018-09-08clang bugprone-unused-return-valueNoel Grandin1-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>
2018-09-05loplugin:useuniqueptr in TypeWriter::createBlopNoel Grandin1-16/+12
Change-Id: I33ce7786430d9a8c7cbc835fc5ca381fe5ab8b8f Reviewed-on: https://gerrit.libreoffice.org/59993 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31GCC only supports inline variables since GCC 7Stephan Bergmann1-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>
2018-08-30loplugin:useuniqueptr in registryNoel Grandin1-133/+84
Change-Id: Ia2f9340183e76e6d46ea51ca62c7a731264f621c Reviewed-on: https://gerrit.libreoffice.org/59773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin4-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>
2018-08-22new loplugin:conststringfieldNoel Grandin3-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>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin1-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>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen1-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>
2018-07-27Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara1-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>
2018-07-26Related: rhbz#1602589 double_free, convert to std::vectorCaolán McNamara1-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>
2018-07-26Related: rhbz#1602589 silence error[memleak]: Memory leak: newValueCaolán McNamara1-4/+4
Change-Id: I2d04c75aa9b5e1d91e06992fdb99899657ecf96d Reviewed-on: https://gerrit.libreoffice.org/58062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-12loplugin:constantparamNoel Grandin1-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>
2018-05-17loplugin:unusedfields in formula..registryNoel Grandin1-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>
2018-04-27loplugin:constantparamNoel Grandin1-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>
2018-04-20loplugin:constantparamNoel Grandin1-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>
2018-01-15More loplugin:cstylecast: registryStephan Bergmann4-24/+23
Change-Id: I2c9436f5f9ea5ef3051d22310dee48ec39fad850
2018-01-15loplugin:useuniqueptr in comphelper,cppu,registryNoel Grandin1-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>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-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>
2018-01-12More loplugin:cstylecast: registryStephan Bergmann4-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
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin1-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>
2017-11-02improve constparam lopluginNoel Grandin5-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>
2017-10-31loplugin:constantparam in oox,registry,reportdesignNoel Grandin5-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>
2017-10-23loplugin:includeform: registryStephan Bergmann10-30/+30
Change-Id: I499856ba451c71bb53e99d74c5a89f1a185c9386
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-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>