summaryrefslogtreecommitdiff
path: root/ucbhelper
AgeCommit message (Collapse)AuthorFilesLines
2019-05-02Use hasElements to check Sequence emptiness in [t-u]*Arkadiy Illarionov2-2/+2
Similar to clang-tidy readability-container-size-empty Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d Reviewed-on: https://gerrit.libreoffice.org/71667 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-18Removed duplicated includesAndrea Gelmini1-1/+0
Change-Id: Id0222c9f6a7ef04ed46dc5ceacd814619b4d7c21 Reviewed-on: https://gerrit.libreoffice.org/70912 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-16tdf#42949 Fix IWYU warnings in ucbhelper/Gabor Kelemen15-31/+38
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Also include/ucbhelper had some false positives not yet on the blacklist Change-Id: I4500271ea35efd7e140c76255df95ff7bbdf9f27 Reviewed-on: https://gerrit.libreoffice.org/70745 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-22loplugin:unusedfields in ucb,ucbhelperNoel Grandin1-4/+1
Change-Id: Id15c92e54669bd5f26adfe0d0b9dda0e8894ccf3 Reviewed-on: https://gerrit.libreoffice.org/68161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11loplugin:indentation in ucb..ucbhelperNoel Grandin1-2/+2
Change-Id: Ifa4b34065dacf9e144f076631c57f1d01aedaeeb Reviewed-on: https://gerrit.libreoffice.org/67608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11-01loplugin:useuniqueptr in ContentImplHelperNoel Grandin1-8/+5
Change-Id: I56909fcaf8088a353bbd0bb783c88d51b9f0822f Reviewed-on: https://gerrit.libreoffice.org/62654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24clang-tidy performance-unnecessary-copy-init in test..xmlscriptNoel Grandin1-1/+1
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22Simplify containers iterations in ucb, ucbhelperArkadiy Illarionov2-32/+13
Use range-based loop or replace with STL functions. Change-Id: I3cdb0f89523008199af1550de164a52b75c52ba5 Reviewed-on: https://gerrit.libreoffice.org/62088 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-27loplugin:constfields in ucbhelperNoel Grandin3-17/+10
Change-Id: Ic9d59b352dcb771191de963c0f6e90c74647c8b8 Reviewed-on: https://gerrit.libreoffice.org/60983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-2/+2
...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 Kelemen12-0/+24
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 ucbhelper..vclNoel Grandin3-6/+1
Change-Id: Id435bb3289dcfd9a7aeca6a661e249085958cb7c Reviewed-on: https://gerrit.libreoffice.org/60392 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27loplugin:returnconstant in ucbhelper,drawinglayerNoel Grandin1-2/+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-11clean up UNO available() implementationsNoel Grandin1-1/+1
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-06-29tdf#114227 Add support for OS proxy to ucbhelper::InternetProxyDecider on UnixNoel Grandin1-12/+51
Also make m_nProxyType a scoped enum so the code is a little easier to follow. Change-Id: Ic2862a1de8fe1005c4fb25147b3effc49b95140c Reviewed-on: https://gerrit.libreoffice.org/56599 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-3/+155
Change-Id: I62c76efb354949699615a44d9482df24e3eaa314 Reviewed-on: https://gerrit.libreoffice.org/56433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin1-1/+1
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18Fix typosAndrea Gelmini1-1/+1
Change-Id: I633e4921042809c628e55825b70c540767eba1d3 Reviewed-on: https://gerrit.libreoffice.org/48140 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-11loplugin:useuniqueptr cppu,idlc,io,ucbhelperNoel Grandin2-45/+21
Change-Id: I6d8c24fabd52b39c66ce0b88b547df7ec85dad76 Reviewed-on: https://gerrit.libreoffice.org/47725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-24loplugin:passstuffbyref even more return improvementsNoel Grandin1-1/+1
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2 Reviewed-on: https://gerrit.libreoffice.org/47021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin1-1/+1
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-05one slash is enoughDavid Tardon1-1/+1
Change-Id: I35fbca7592f3e17a071df567f691c62fe9232fc1
2017-11-03Replace lists by vector or deque in ucb/ucbhelperJulien Nabet1-20/+8
Change-Id: I9f72d7c8ab48f8dc2eec779db2f40531a33db6f9 Reviewed-on: https://gerrit.libreoffice.org/44238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-25loplugin:constmethod in comphelper,ucbhelperNoel Grandin3-8/+8
Change-Id: I27a860fbbedd2174c60c199af18cae76e02abc25 Reviewed-on: https://gerrit.libreoffice.org/43759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: ucbhelperStephan Bergmann13-23/+23
Change-Id: I47fe099aa042085e71a08f4260e78773a25c2860
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-2/+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-04add << operator for css::uno::ExceptionNoel Grandin1-1/+1
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-18loplugin:unusedfields in ResultSetColumnDataNoel Grandin1-34/+10
ever since introduction in commit 24f26145eb03b2fe8e0099309d7e6fa1a0061ef4 Date: Thu Jan 18 08:03:55 2001 +0000 "#82177# - Added support for additional column data ( case- sensitivity, ... )" Change-Id: I593f7e2a3be7b6445c7975ff385b6ba0d35183b9
2017-09-14clang-tidy modernize-use-emplace in test..vbahelperNoel Grandin2-8/+4
Change-Id: Ifbe1dd7c9d5dde33f7419548670434591b1a1d82 Reviewed-on: https://gerrit.libreoffice.org/42258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin7-29/+29
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin2-4/+4
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10simplify some OUString compareTo callsNoel Grandin1-9/+3
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16loplugin:unusedfields in tools..vbahelperNoel Grandin1-2/+1
Change-Id: Ief7d4c8e1866604eda6308ea2a5c1ce4b1c093bc Reviewed-on: https://gerrit.libreoffice.org/38836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06ucb: replace double checked locking patternsJochen Nitschke3-101/+27
with thread safe local statics and prefix statics Change-Id: Iaa7c9056847f75612d6cf6c6e44d3896fca734de Reviewed-on: https://gerrit.libreoffice.org/38433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin2-4/+3
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-2/+1
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-08teach loplugin:constantparam about simple constructor callsNoel Grandin2-7/+3
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+1
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky1-1/+0
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-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-1/+1
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-1/+1
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10convert InsertOperation to scoped enumNoel Grandin1-7/+3
and drop unused LINK enumerator Change-Id: I6c42424ae5a7503b3e14e5f04fcf7a49b595b416
2017-02-06Add missing #includesStephan Bergmann8-0/+18
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-01Revert "cancelCommandExecution - no need to pass exception by Any"Noel Grandin2-10/+10
This reverts commit 4739b31dafc5154a2c7d6b3f0ee90686863656f0. Apparently, passing a param of type css::uno::Exception to Any will record precisely a css::uno::Exception in that Any, losing any subtype information, which this commit changed.
2017-02-01cancelCommandExecution - no need to pass exception by AnyNoel Grandin2-10/+10
all the call sites are passing an uno::Exception subtype Change-Id: I6de1f00810e063e75ef620314561d7e2d6445ada Reviewed-on: https://gerrit.libreoffice.org/33657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin1-2/+2
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin1-7/+4
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann19-353/+21
...(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>