summaryrefslogtreecommitdiff
path: root/registry
AgeCommit message (Collapse)AuthorFilesLines
2019-10-04tdf#127766: Avoid ODR violation for class/struct FieldEntryTor Lillqvist1-0/+2
We have 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.) Reviewed-on: https://gerrit.libreoffice.org/80143 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit d97f27133ddc07ca224297a7525dcda6297077bc) Change-Id: I1b32075f7aba256129b36ceb38eba605c882b9ff Reviewed-on: https://gerrit.libreoffice.org/80167 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.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>
2017-10-20loplugin:constmethod in codemaker,registry,storeNoel Grandin4-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>
2017-08-18loplugin:unnecessaryparenNoel Grandin1-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>
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-07-17loplugin:constparams in store,registryNoel Grandin4-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>
2017-07-14extend loplugin useuniqueptr to POD typesNoel Grandin1-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>
2017-07-13use more OUString::operator== in forms..salNoel Grandin1-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>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-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>
2017-06-26Translate German comments and debug strings (leftovers in r... dirs)Johnny_M1-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>
2017-06-23loplugin:unusedfields in registry..saxNoel Grandin1-3/+1
Change-Id: Ie0e2ecaadb49273cb4e78bc894111523940e7c8e Reviewed-on: https://gerrit.libreoffice.org/39098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin1-4/+2
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09More tests to suppress (all .PHONY test targets should be covered now)Stephan Bergmann1-0/+4
Change-Id: Ib948547e5c177ac62506fc42a564368a8d31fa4e
2017-06-05Improved loplugin:cstylecast to reference types: registryStephan Bergmann1-1/+1
Change-Id: I94070f7712604bcd4d118b94cb0f85e0146a9db1
2017-05-27registry: fix indenting caused by automated namespace scripts, etc.Chris Sherlock1-5/+5
Change-Id: Ia14ebebafe957891f8a3f0b1bf8519e906211ef8 Reviewed-on: https://gerrit.libreoffice.org/38076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27registry: remove comment cruft from regimpl.cxxChris Sherlock1-64/+0
Change-Id: Ic728b6d975cfaf59c5d28c5587c488a245b4c961 Reviewed-on: https://gerrit.libreoffice.org/38068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>