summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)Author
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-27remove some unused includes and update pchesCaolán McNamara
Change-Id: I786548bef39fa711aabcff32b592b3fdc4a6f9fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101486 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-19Fix typosAndrea Gelmini
Change-Id: I58c510121a9f535b2a31854f10b5f6535554d379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100988 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-12-Werror,-Wuninitialized (apparently new in Clang 12 trunk)Stephan Bergmann
> cppuhelper/source/typemanager.cxx:1571:47: error: field 'entity_' is uninitialized when used here [-Werror,-Wuninitialized] > ServiceBasedSingletonDescription_Base(entity_->isPublished()), > ^ The code was like that ever since it was introduced in fa559f1c416884015d1d83d0a7ac8803e745d9df "WIP: Experimental new binary type.rdb format". Odd that that never caused an issue, but the code appears to at least never be executed during `make check`. Change-Id: I19fe78162c7c4a9211c380648595df9aa54bf4d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-10Make the C++/UNO bridge work to some extent on macOS on arm64Tor Lillqvist
Use the same code as for Linux on aarch64, with minor additional hacks. But that will not actually work in all cases, as there are slight differences in the ABI. See https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html Thus we can drop the use of the lo_mobile_throwException() hack that was very temporarily used. The run-time code generation requires use of a new API on macOS to work: See the use of pthread_jit_write_protect_np() in bridges/source/cpp_uno/shared/vtablefactory.cxx. For some reason, with the Xcode 12 betas, when compiling for arm64-apple-macos, the symbols for the type_infos for the UNO exception types (_ZTIN3com3sun4star3uno16RuntimeExceptionE etc) end up as "weak private external" in the object file, as displayed by "nm -f darwin". We try to look them up with dlsym(), but that then fails. So use a gross hack: Introduce separate real variables that point to these typeinfos, and look up and dereference them instead. If this hack ends up needing to be permanent, instead of having a manually edited set of such pointer variables, we should teach codemaker to generate corresponding functions, and look up and invoke them to get the std::type_info pointer. When compiling for x86_64-apple-macos, the type_info symbols end up as "weak external" which is fine. With this, LibreOffice starts and seems to work to some extent, and many unit tests succeed. Change-Id: I05f46a122a51ade1ac7dccd57cb90e594547740e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100408 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-08-07Use the lo_mobile_throwException() thing on macOS on arm64 for nowTor Lillqvist
Change-Id: I58720d25c4838f1f4ee79a2586a61cc7d03ef853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100281 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-23Remove no longer relevant assertStephan Bergmann
...that was apparently meant to guard the following &context_values[0] that got changed to context_values.data() in c18e2ea2a52fc171c50fcb22d431e94c6aececc5 "New loplugin:data" Change-Id: Ic63d8e775f3b75cca7df2b08665cccc0b4c3ec3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99316 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-12update pchesCaolán McNamara
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-05tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctornienzu
Change-Id: Ic61c1d5829b510a71b8d444f29ffed36ee540ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94717 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-20use for-range on Sequence in cppuhelper,cuiNoel Grandin
Change-Id: I482d48e29ddc9690d9c671cde2f6b0c611ec378d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in canvas..cuiNoel Grandin
Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17loplugin:flatten in cppuhelperNoel Grandin
Change-Id: I814a109b7822d7a6cd23b5aa4220d496a4da2fb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:buriedassign in c*Noel Grandin
Change-Id: Id14fed7e5c0f588ad3c927f12251432d12c1a7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-10Fix typoAndrea Gelmini
Change-Id: Id3fe1d66cb1d3cb57f8aa5e652bf1c9ad6346091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90286 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-05tdf#127781 Android Viewer: aarch64: Avoid throwing exceptions through bridgesMichael Weghorn
This basically extends what commit eb15ac837e06087fb8148330e9171d6697d89ee6 ("android: Avoid throwing exceptions through the bridges.", 2019-11-29), amended by f2f8a2ec10d87ffb23949338a9e4da1e1d704644 ("android: Actually let's avoid the exceptions via bridges only on aarch4.", 2019-12-02) did for the online-based Android app to cover the Android Viewer case as well. This makes Android Viewer work on aarch64, which previously crashed whenever trying to load a document. Change-Id: Id8b30e1dced583159cc4d81aaa18f4c25b901cff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90047 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-02-11android: Actually let's avoid the exceptions via bridges only on aarch4.Jan Holesovsky
Change-Id: Id2830f09ca6afd11f6f866565f37bdb7ba45bfb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84205 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26simplify InterfaceContainerHelper::clearNoel Grandin
instead of relying on side-effects from instantiating an iterator Change-Id: Ie66b9e7ceeb3c4a0f4243fdd0a5ac37af77e98ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24loplugin:makeshared in connectivity..cppuhelperNoel Grandin
Change-Id: Id8064e961a64bb03bc0fb61e375cdcf769b340cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-17Use std::vector in OInterfaceContainerHelper instead of SequenceNoel Grandin
instead of fighting the fact that Sequence is intended to be immutable getSequence() will become a little slower, but since getSequence() is called 5k times during 'make check', while add/remove are called 3M times, I think it's safe to say mutation is dominant. Change-Id: I23d127c93c589050d6c06c0da47871e1ebe7b52d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86929 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15improve "convert OSL_ASSERT to assert"Noel Grandin
this fixes commit 3a0c4574449fc2313306c4e0e39bb7416cc20657, by converting the assert in removeInterface() to SAL_WARN_IF, and similarly for the related addInterface() method Comment from sberg on the original commit: This leaves OInterfaceContainerHelper::add-/removeInterface in somewhat inconsistent state (as addInterface OSL_ASSERTs non-null but then also explicitly checks for null, i.e., effectively supports null). css.lang.XComponent::add-/removeEventListener do not explicitly specify whether or not their arg may be null. I /think/ we traditionally supported null; asserting non-null thus might cause issues for 3rd-party code. Change-Id: I1e28cc03aa7dfe662125c573d60b447309009448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15convert OSL_ASSERT to assertNoel Grandin
and fix the one place triggering it Change-Id: I87ec57c6a92ed89fdacfcb0d650525eaeaa266b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86822 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15clang-tidy modernize-concat-nested-namespace in cppcanvas..cppuhelperNoel Grandin
Change-Id: I0bb4ea91288a15fb590d077fb390c53be8b50400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86801 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-14Remove unused prefix="direct" featureStephan Bergmann
It got introduced with b6cebf4a3e2997e6489bba77b358b306f8f435ce "Allow UNO component libraries to have each implementation in its own function", then ae3a0c8da50b36db395984637f5ad74d3b4887bc "Add .component <implementation constructor='...' feature" removed all of its uses and noted: "[...] (which had previously been adapted to use the prefix="direct" feature, which may become unnecessary again in the end, depending on how to handle single-instance services/singletons)." Handling of single-instance services/singletons has been added with 997d21183322a0a94b96868073808841d2773902 "Support for singleton constructor functions" and the feature has really become unnecessary again. Change-Id: I1ab910805d61421f892a244313c8778cd453f98c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-10use more std::make_sharedNoel Grandin
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-30Merge ImplementationInfo back into ImplementationStephan Bergmann
...and rename constructor members to constructorName/constructorFn for disambiguation. "Splitting ImplementationInfo out of Implementation has become necessary to avoid circular references" in c16d0dd846e25df56feffe868a15eb33bb55e42a "fdo#49291 Postpone actual factory instantiation as long as possible", but was no longer necessary since 997d21183322a0a94b96868073808841d2773902 "Support for singleton constructor functions" (which also removed the need to hold ImplemenationInfo by shared_ptr, which has already been cleaned up with fc11bce4917aae7e8324f2c721ce50a88d231b0c "ImplementationInfo can be inlined"). Change-Id: I51467aa7b1fce56d6549738efd1f34f91925dac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86013 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-24ImplementationInfo can be inlinedNoel Grandin
no need to hold by shared_ptr, it is never shared Change-Id: I4818c08e4beab57d777e90d181d92a3edddffbf5 Reviewed-on: https://gerrit.libreoffice.org/85772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18sal_Char->char in cppcanvas..cuiNoel Grandin
Change-Id: I7e9fa7011f1e0bf143f86055718c772caebf8ee6 Reviewed-on: https://gerrit.libreoffice.org/85397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-05Fix typoAndrea Gelmini
Change-Id: I3c8a0d5fb2b17ccef3c931f13230f99b1945a4bc Reviewed-on: https://gerrit.libreoffice.org/84566 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-05android: Avoid throwing exceptions through the bridges.Jan Holesovsky
From some reason it does not work, so let's do the same we are doing on iOS; at least for now. Change-Id: I915f8683a112548fc3defc1114f9dce3aa7be30e Reviewed-on: https://gerrit.libreoffice.org/84067 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84204 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-21preload: cleanup failed module load warnings and rename them.Michael Meeks
Change-Id: Iafa89df6f724fa6b64712d970502091e38300dad Reviewed-on: https://gerrit.libreoffice.org/83341 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26add property name when throwing css::uno::UnknownPropertyExceptionNoel Grandin
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-19improve and enable loplugin:fragiledestructorNoel Grandin
Where the problem was benign and the class was not extended, I marked the class as final. Where the problem was benign and the class was extended, I marked the relevant callee methods as final. Other cases were excluded in the plugin. Change-Id: Idb762fb2206af4e8b534aa35ff77f8368c7909bc Reviewed-on: https://gerrit.libreoffice.org/79089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-19loplugin:constvars in cppuhelper..desktopNoel Grandin
Change-Id: Iaf42114ab98875c4bc1545684f1893540b998ef2 Reviewed-on: https://gerrit.libreoffice.org/77723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in cppuhelper, desktop, drawinglayer, embeddedobj, extensions Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4 Reviewed-on: https://gerrit.libreoffice.org/77636 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Optimize cppu::supportsService to use const methods of SequenceMike Kaganski
... and standard algorithm instead of loop. Change-Id: Ic90fa7e227807768f094b9fc231f3ba3d48e6139 Reviewed-on: https://gerrit.libreoffice.org/77350 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): cppuhelperStephan Bergmann
Change-Id: I6535fd0cf4f8b906c62fa51cb555da548c6e99ae Reviewed-on: https://gerrit.libreoffice.org/76688 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-29loplugin:sequentialassignNoel Grandin
Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f Reviewed-on: https://gerrit.libreoffice.org/76501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19loplugin:referencecasting in cppcanvas..cuiNoel Grandin
Change-Id: Ib8a513d88575cef9c1479b91adff98170c9323e8 Reviewed-on: https://gerrit.libreoffice.org/75937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>