summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin2-9/+3
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin6-87/+73
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:singlevalfieldsNoel Grandin2-7/+4
tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 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 Bergmann2-3/+3
...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-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-01loplugin:useuniqueptr in hierarchy_ucp::DataSupplier_ImplNoel Grandin1-16/+3
Change-Id: I56259038649419b5ef02d911c20358d8a8d56917 Reviewed-on: https://gerrit.libreoffice.org/61118 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-01loplugin:useuniqueptr in package_ucp::DataSupplier_ImplNoel Grandin1-35/+15
Change-Id: Ib0eb89748aa0afd3826252f7f8fec43837fa4b5e Reviewed-on: https://gerrit.libreoffice.org/61116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-01loplugin:useuniqueptr in gio::DataSupplierNoel Grandin2-12/+3
Change-Id: Ie0633d26d858c25e355f49597352d6b29c8c6c0f Reviewed-on: https://gerrit.libreoffice.org/61115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26loplugin:constfields in ucbNoel Grandin38-56/+56
Change-Id: I81a4b6241d6ff2e04903ddf2955463514d04ac0b Reviewed-on: https://gerrit.libreoffice.org/60986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-25loplugin:useuniqueptr in cmis::DataSupplierNoel Grandin2-14/+6
Change-Id: If12889ffe320c6a2e2808709ce53438e92077a58 Reviewed-on: https://gerrit.libreoffice.org/60958 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24missing includes (--with-webdav=serf)Stephan Bergmann3-0/+8
Change-Id: I021b378b2ae001a38c8f84a71e90ec4f14c905e6 Reviewed-on: https://gerrit.libreoffice.org/60928 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-24loplugin:simplifyconstruct (--with-webdav=serf)Stephan Bergmann1-1/+1
Change-Id: I3a52b0e2517cfd88f661dde2b01b2e6bc6913ba2 Reviewed-on: https://gerrit.libreoffice.org/60927 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-20Replace SAL_OVERRIDE with override in internal codeStephan Bergmann1-1/+1
Change-Id: Ifa446647b11fd1f1b0dc6a991b752480545634db Reviewed-on: https://gerrit.libreoffice.org/60788 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-18Missing forward declarationStephan Bergmann1-0/+4
...found by <https://ci.libreoffice.org//job/lo_tb_random_config_linux/1485/> Change-Id: Id58b86b561ebe10e23c14130bd5f3efe10f95be5 Reviewed-on: https://gerrit.libreoffice.org/60656 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann12-28/+56
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen47-0/+81
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-12loplugin:simplifyconstruct in toolkit..ucbNoel Grandin20-75/+29
Change-Id: Ica3efbdbf05a8161861b8be1ccdc62ab4aec1d69 Reviewed-on: https://gerrit.libreoffice.org/60371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-10wrap GlobalNeonMutex as local staticCaolán McNamara4-20/+27
Change-Id: I8d879877c93ce4d3a8f52fc707f94f2f095227d6 Reviewed-on: https://gerrit.libreoffice.org/60262 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-10add mutex guard to new methodsCaolán McNamara1-0/+6
Change-Id: I4d6ae0622107df6f619f945575687f616f184ccc Reviewed-on: https://gerrit.libreoffice.org/60260 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-10suspicious MutexGuard placementCaolán McNamara1-2/+2
Change-Id: I3b5cf5984a1a852d2482b8a417fc46c836ea2dc2 Reviewed-on: https://gerrit.libreoffice.org/60258 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-10bounce callback functions back into class methodsCaolán McNamara2-82/+124
Change-Id: I5e449768f867d3d08ced830f9ea36f6519f4276a Reviewed-on: https://gerrit.libreoffice.org/60259 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen8-0/+8
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@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-07loplugin:useuniqueptr in NeonSessionNoel Grandin1-5/+3
Change-Id: I8ff5c031ddd6cf6546c6e4eee60cbe9f60d4fb5f Reviewed-on: https://gerrit.libreoffice.org/60114 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin2-39/+32
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-04loplugin:cstylecast (--with-webdav=serf)Stephan Bergmann1-2/+2
Change-Id: Ic8d62e4e8bad28a45fad28aa5a4e6e56e89e7bd3 Reviewed-on: https://gerrit.libreoffice.org/59963 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-04-Werror=return-local-addr (-with-webdav=serf)Stephan Bergmann2-2/+2
Missing adaption after 2e142c0ee54744d35517f0b9c49a24302fb32d47 "tdf#114227: Add support for PAC to ucbhelper::InternetProxyDecider on Windows", found by <https://ci.libreoffice.org//job/lo_tb_random_config_linux/1456/>. Change-Id: I5093827035a9bbc31f3d8d2262e14df55fa610aa Reviewed-on: https://gerrit.libreoffice.org/59961 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-04loplugin:salcall (--with-webdav=serf)Stephan Bergmann2-2/+2
Change-Id: Idc3e3513a664eea1cb786a3caa5ea41909491182 Reviewed-on: https://gerrit.libreoffice.org/59966 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-04loplugin:simplifybool (--with-webdav=serf)Stephan Bergmann1-1/+1
Change-Id: I473854cfd45a99879b8965225d3058af08061567 Reviewed-on: https://gerrit.libreoffice.org/59962 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-04loplugin:unnecessaryparen (--with-webdav=serf)Stephan Bergmann1-1/+1
Change-Id: If5b05772f2195244e509d7464f5ac3d59280c807 Reviewed-on: https://gerrit.libreoffice.org/59965 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin1-2/+2
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-44/+30
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-22loplugin:useuniqueptr in DynamicResultSetNoel Grandin3-4/+5
Change-Id: I1c34dbe81a6909bfbc4d62f5f9f73e7b9114e58c Reviewed-on: https://gerrit.libreoffice.org/59362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-21loplugin:useuniqueptr in PropertyChangeNotifierNoel Grandin3-6/+5
Change-Id: Ibfbee5d4c9378778ee4a8d70ee1501444f071003 Reviewed-on: https://gerrit.libreoffice.org/59360 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-08-03inline RegexpMapIterImpl into RegexpMapConstIterNoel Grandin1-143/+63
no need for header only classes to have an Impl Change-Id: I66236e3f9137320cfe39d4312cf7682c1d808815 Reviewed-on: https://gerrit.libreoffice.org/58561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-03inline RegexpMapImpl into RegexpMapNoel Grandin1-68/+34
no need for header-only classes to have Impl's Change-Id: I65b7f84ebd9eec67ad8be694b7752da59af39a9d Reviewed-on: https://gerrit.libreoffice.org/58560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen38-0/+41
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 test to vbahelper Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737 Reviewed-on: https://gerrit.libreoffice.org/58225 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-31loplugin:returnconstant in ucbNoel Grandin7-15/+11
Change-Id: I2810468e64bba8bc9f8af4dff170bc1ab310fe2f Reviewed-on: https://gerrit.libreoffice.org/58337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30loplugin:stringloop in svgio..xmlsecurityNoel Grandin1-4/+4
Change-Id: I1b2fe5674c8350690efc3d3219b9273cc61d5b0c Reviewed-on: https://gerrit.libreoffice.org/58332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29cppcheck: useInitializationList in test to xmloffJochen Nitschke1-3/+3
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0 Reviewed-on: https://gerrit.libreoffice.org/58262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27loplugin:returnconstant in ucbhelper,drawinglayerNoel Grandin1-1/+1
Change-Id: I4e84c570fe0e555a3aeb1f11632715de466d6e0e Reviewed-on: https://gerrit.libreoffice.org/58192 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26ucb: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann4-18/+0
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already inline, so why bother with non-inline functions.) Change-Id: I6cd0ac297240ce868442ab7f8b4f1ba46c68d409 Reviewed-on: https://gerrit.libreoffice.org/58063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-23Fix typosAndrea Gelmini1-1/+1
Change-Id: Iebc31a53404da41f35eed7338662365d7efbd7a2 Reviewed-on: https://gerrit.libreoffice.org/57810 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-11clean up UNO available() implementationsNoel Grandin4-4/+5
There seems to be some confusion here. available() is actually the number of bytes that can be read without blocking, but most implementations seems to be just returning the number of bytes remaining in the stream. Since we're doing that, let's do it properly. (*) some of them were just casting, instead of clamping, which will return wrong values sometimes. (*) FileStreamWrapper_Impl/OInputStreamWrapper/OTempFileService were doing unnecessary work, instead of just asking the underlying SvStream for it's remaining size Change-Id: I3ef26e0363e989ed3e00be0fdb993e1cdeb7819f Reviewed-on: https://gerrit.libreoffice.org/57264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-11tdf#79877 perf loading docx file, activate SAX threadingNoel Grandin1-1/+2
our nice threaded parser was not kicking in because it checks the size of the stream with available(), and this available() implementation was just returning 0. This makes for a 5-10% performance improvement Change-Id: I6516862c9c63136b54ca825dd98e35e6d87d4227 Reviewed-on: https://gerrit.libreoffice.org/57263 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-26tdf#114227: Add support for PAC to ucbhelper::InternetProxyDecider on WindowsMike Kaganski2-2/+2
Change-Id: I62c76efb354949699615a44d9482df24e3eaa314 Reviewed-on: https://gerrit.libreoffice.org/56433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-07tdf#96099 Remove std::vector typedefsAbhyudaya Sharma1-2/+1
Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473 Reviewed-on: https://gerrit.libreoffice.org/55260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke3-3/+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>