summaryrefslogtreecommitdiff
path: root/binaryurp
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): binaryurpStephan Bergmann1-1/+1
Change-Id: Ia8ae32426b886fff7824612898b485d090ca51c6 Reviewed-on: https://gerrit.libreoffice.org/76694 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-11Use hasElements to check Sequence emptiness in accessibility..canvasArkadiy Illarionov1-1/+1
Similar to clang-tidy readability-container-size-empty Change-Id: I24c3f04b4eed3c1cd973166885660f113a26844f Reviewed-on: https://gerrit.libreoffice.org/71805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22New loplugin:dataStephan Bergmann2-8/+8
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19Some uses of C++17 class template argument deductionStephan Bergmann1-2/+2
Change-Id: I47c469c0fcdff41d83729be9489c946e81ef3686 Reviewed-on: https://gerrit.libreoffice.org/68020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-14Use C++17 nested namespace definitions (in binaryurp)Stephan Bergmann9-33/+15
Change-Id: I21594a9fec47ac4a0dd1b821a6b47ea468445c42 Reviewed-on: https://gerrit.libreoffice.org/66295 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11tdf#112689:Replace chained O(U)StringBuffer::append() with operator+Furkan Ahmet Kara1-4/+2
Change-Id: Ieea40ab9cd15260b02222174b9ac389d8c9f387b Reviewed-on: https://gerrit.libreoffice.org/65746 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-12-08Use [[maybe_unused]] instead of cast to voidStephan Bergmann1-2/+1
Change-Id: I1db02a4eff2d6f16bfb18bda2155d8a26c4a9335 Reviewed-on: https://gerrit.libreoffice.org/64814 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2-2/+2
...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-06Use structured bindingStephan Bergmann1-10/+9
Change-Id: I8254d350320115be532c6d595dc56268c8de3ad2 Reviewed-on: https://gerrit.libreoffice.org/64653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-1/+2
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-09-11Revert "clang bugprone-unused-return-value"Noel Grandin1-2/+4
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-4/+2
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-08-29replace rtl_allocateMemory with std::mallocNoel Grandin1-1/+1
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>
2017-12-19inline use-once typedefsNoel Grandin1-2/+1
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin4-6/+6
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Replace list by vector in incomingrequest (binaryurp)Julien Nabet1-2/+2
Change-Id: Ic08f45f614cfa4643b55142e85e8eeac223abd82 Reviewed-on: https://gerrit.libreoffice.org/44893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-23Revert partly 9d1f61a61893435b26f7239136ad92b7354545a8Julien Nabet1-1/+5
The use of erase/remove idiom is wrong here since "there can be multiple registrations of the same listener" See Stephan's comments in https://gerrit.libreoffice.org/#/c/44892/3/binaryurp/source/bridge.cxx Change-Id: Iebf979ca25520392ba9de6439d5bf19b8e3446b2 Reviewed-on: https://gerrit.libreoffice.org/45104 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-18Replace some lists by vectors in binaryurpJulien Nabet4-40/+38
+ use for range loops Change-Id: Ied18e378b73826c5a47957cad6cf86a4e19a9230 Reviewed-on: https://gerrit.libreoffice.org/44892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26loplugin:constmethods in unotoolsNoel Grandin1-1/+1
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d Reviewed-on: https://gerrit.libreoffice.org/43865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-11binaryurp: consistently use "" and <> for include directivesMike Kaganski30-243/+243
Change-Id: If328428d7f88d8a160888857acd3a07bbd8dab83 Reviewed-on: https://gerrit.libreoffice.org/43318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin5-16/+10
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-08clang-tidy modernize-use-emplace in b*Noel Grandin5-21/+14
Change-Id: I51e0369ba2e1fe0b7c934531f71d3bda95ba09ec Reviewed-on: https://gerrit.libreoffice.org/42109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25Replace use of oslInterlockedCount with std::atomicStephan Bergmann2-4/+6
The assumption in using std::size_t is that every acquisition can be associated with a unique memory location in the local address space, so the counter cannot overflow. Change-Id: I0d004a81d9bf52cf07d13481d9024fcc10b6db6d Reviewed-on: https://gerrit.libreoffice.org/41580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-2/+2
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15use more SAL_N_ELEMENTS part 3Noel Grandin1-1/+1
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-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-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky3-3/+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-06Improved loplugin:redundantcast, static_cast on arithmetic types: binaryurpStephan Bergmann1-5/+2
Change-Id: I109c8a2c51c7916ce8f8964b57ee45747868844f
2017-02-15Drop :: prefix from std in [a-b]*/Tor Lillqvist1-1/+1
Change-Id: I0422aaf39bbce889c95ed9a81a0784cb03a1badd Reviewed-on: https://gerrit.libreoffice.org/34320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-06Add missing #includesStephan Bergmann3-0/+4
...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-03makeAny->Any in basctl..chart2Noel Grandin1-2/+2
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61 Reviewed-on: https://gerrit.libreoffice.org/33867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann4-39/+18
...(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>
2016-11-23New o3tl::runtimeToOUString to convert from C++ runtime NTBS to OUStringStephan Bergmann2-8/+5
Change-Id: I613bb70b6828f615fd45af38b2d873ece55ace60
2016-11-15loplugin:unusedfieldsNoel Grandin2-11/+5
Change-Id: I1400ca0af2c357dff06e5f733ec62b13d6a96461 Reviewed-on: https://gerrit.libreoffice.org/30861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16Replace remaining OSL_ASSERT etc. in binaryurpStephan Bergmann3-48/+54
Change-Id: I6f013cacbefe9c681baa3e91f73f4fc05c99ba78
2016-09-16In binaryurp, fix change from rtl_copyMemory to memcpyStephan Bergmann1-11/+13
...done in 36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 "Replace usage of rtl_*Memory with equivalent from string.h" Change-Id: I068feab3140cdcb34ea8c80e273ea2761f0efb7f Reviewed-on: https://gerrit.libreoffice.org/28941 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann4-4/+4
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-19cid#1371307: Move semantics for BinaryAnyStephan Bergmann2-0/+35
Change-Id: I30b8bb71f8a9e093183ee85484ccd694f3e1e10d
2016-07-10split the assert into twoMarkus Mohrhard1-3/+3
Change-Id: Iab515327c9ba6ad9b22d68971f097b6848e704ea Reviewed-on: https://gerrit.libreoffice.org/27084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-04use SAL_DEPRECATED in uno::ReferenceNoel Grandin1-1/+1
and fix a couple of usages that have crept in Change-Id: Ia3e7fcc05dac6e0d205e69c0e0372c74653e7c5e Reviewed-on: https://gerrit.libreoffice.org/26851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04Fix some spelling errors in comments and stringsOtto Kekäläinen1-1/+1
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e Reviewed-on: https://gerrit.libreoffice.org/26883 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2-2/+2
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-04-14loplugin:passstuffbyref in variousNoel Grandin3-5/+5
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-02-09Remove excess newlinesChris Sherlock2-3/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin2-26/+0
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann11-63/+63
Change-Id: Ic3516d9069cbe935f5b82aec0afac3facdc814a5
2015-11-02tdf#94269: Replace "n" prefix for bool variables with "b"Benjamin Ni5-33/+33
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02tdf#65108 use <> instead of "" in include lineFeyza Yavuz2-15/+15
Change-Id: Ic1bb54d1e6d2c3f8c4215d8ececeb6353ad8ca45 Reviewed-on: https://gerrit.libreoffice.org/19717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann4-15/+15
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann12-26/+26
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3