summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2022-06-17make VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer() LOK-onlyLuboš Luňák
Because it's used only for LOK, and SvpSalVirtualDevice::CreateSurface() otherwise wouldn't know whether to apply LOK DPI settings or not (since this might be called for LOK tiled painting, when it should, or it might be called from somewhere else while LOK is active, in which case this should be handled normally). Getting that mismatched can cause things like https://github.com/CollaboraOnline/online/issues/4834 . Change-Id: I1df7b8a169c8ef2e799731a6695a032948536582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135546 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-20jsdialog: introduce popup managementSzymon Kłos
Popup windows are managed by vcl (some moving between parents happens on show/hide popup). We need to access correct popup window to correctly close popup in LOK. So remember popup instances. Change-Id: I9e1ba18ded5a1bf675f95bd7178043eebd9bbd5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134576 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134675
2022-04-25tdf#55058 tdf#143875 EMF+ Fix display of dashed lines and line jointsBartosz Kosiorek
With previous implementation, empty spaces between dashes were too long. Additionally line joints were not working correctly, after EMF+ reworking: tdf#111486 This commit fixes all these issues and additionally it is covering it with tests. Change-Id: I9404e566d2d7d3405ab817268ad9b1f538c200eb Change-Id: I523f92a928ab592ff175d0d01c1ad1a3bc22e324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133207 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit 80c856336668e35837667323957fa3ad4172f3c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133152
2022-04-14load ods/xlsx with full row attributes without allocating all columnsLuboš Luňák
If there's e.g. an entire row bold, it's enough to set default attribute for unallocated columns. This also reverts the workaround from commit 297ab561c6754, as it's no longer necessary. Change-Id: I0b208709aeaff1c0d59da2410926876715cfe642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131320 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-02Bump copyright year to 2022Adolfo Jayme Barrientos
Change-Id: Icbb000677066127fa67e8c22fb0ab6880acc0169 (cherry picked from commit fb32c4d96141ccc1766fa4e39405130fcf409a6a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127848 Reviewed-by: Martin Srebotnjak <miles@filmsi.net> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-23Fix test for clang-cl with the MSVC template instantiation modelStephan Bergmann
(Otherwise, the FunctionDecl's body was null and all the error and note diagnostics were flagged as expected but not seen.) Change-Id: I32acb6e0028433c9b40545cf91d8fe1acd19a77a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125682 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-22sw: prefix members of SwDBManager, SwWebGlosDocShell, SwWordCountWrapper ...Miklos Vajna
... and SwZoomControl See tdf#94879 for motivation. Change-Id: I74f31e45a8c215d406371a23b64d548fbb851d28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125641 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-17drop unused PopupMenuFlags::NoHorzPlacementCaolán McNamara
Change-Id: Ic279160f96e5aa2a37690f987c2323b91b2ec49c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125415 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-17retire loplugin:simplifyboolLuboš Luňák
The plugin was originally written to rewrite dumb old OOo code like 'variable != 1 ? true : false'. All that code has already been rewritten, and now this plugin just enforces matter-of-taste stylistics on new code. Change-Id: I8cd2accd7c0ac365b75dcba51a9049bf9e293869 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125346 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-17remove loplugin:finalprotectedLuboš Luňák
It just forces a custom rule that serves no real purpose. There's no technical difference. If one day a class gets inherited from then this information will be lost/incorrect. And mixing access on a virtual function is poor style. Change-Id: I0c27db8d694ad191a118d4e1d3d4a240e00456fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125337 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-15Adapt CompilerTest_compilerplugins_clangStephan Bergmann
...to Clang 14 trunk <https://github.com/llvm/llvm-project/commit/4d8fff477e024698facd89741cc6cf996708d598> "[clang] retain type sugar in auto / template argument deduction" Change-Id: I3f106eeedf00e622c294c4e4c8326cf3a5e418cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125214 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-11Drop ScGlobal::GetEmptyOUString() and EMPTY_OUSTRINGMike Kaganski
OUString default ctor already uses a static instance (through rtl_uString_new), no need to have another module-specific static. Commit d8037ae18a297229d1b79f8f76331abfd548350d had removed its sw counterpart some time ago. Change-Id: I140fe13bc1f6b0cbe188e83e602fdebe995e467a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125061 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10Avoid unhelpful loplugin:stringview from implicit conversionsStephan Bergmann
> compilerplugins/clang/test/stringview.cxx Line 149: instead of an 'rtl::OString' constructed from a 'const rtl::OStringLiteral<4>', pass a 'std::string_view' [loplugin:stringview] > compilerplugins/clang/test/stringview.cxx Line 150: instead of an 'rtl::OUString' constructed from a 'const rtl::OUStringLiteral<4>', pass a 'std::u16string_view' [loplugin:stringview] (see the discussion at <https://gerrit.libreoffice.org/c/core/+/124950> "operator==(OString, OStringLiteral)") Change-Id: I5481bef8b8bad7bf9bdf4fff29161f0809051f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124990 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09Adapt test to clang-cl on Windows (sal_Int32 typedef int vs. long)Stephan Bergmann
Change-Id: Ic3a27643bd3d5ca3a25449171a3a59140b915769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124901 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-03Silence loplugin:toolslong in ucb/source/ucp/webdav-curl/CurlSession.cxxStephan Bergmann
...similarly to how it was already done for its ucb/source/ucp/webdav-neon/NeonSession.cxx cousin Change-Id: I78124f45d4cb08131ee5d6e8c2606b38407c0668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-03loplugin:constparamsNoel Grandin
Change-Id: Iebeb531fad5cc819b536788925cf8508737198b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-02Tweak loplugin:implicitboolconversion to allow some more bool -> sal_BoolStephan Bergmann
...in templated code, to cater for the needs of <https://gerrit.libreoffice.org/c/core/+/124400> "Prepare for removal of non-const operator[] from Sequence in testtools". For one, by defining ImplicitBoolConversion::TraverseInitListExpr, make sure that Clang versions before and after <https://github.com/llvm/llvm-project/commit/0a42fe70a566f22599e04a6f1344ca2dc5565e17> "[AST] Treat semantic form of InitListExpr as implicit code in traversals" behave the same. Old versions of Clang would have erroneously reported Sequence<Sequence<sal_Bool>> s2{ { false } }; (and reported Sequence<Sequence<sal_Int32>> s4{ { false } }; twice) in compilerplugins/clang/test/implicitboolconversion.cxx when one of the four combinations of syntactic/semantic visit of the outer/inner InitListExpr defeated the intended suppression logic in ImplicitBoolConversion::TraverseCXXStdInitializerListExpr. And for another, ImplicitBoolConversion::TraverseInitListExpr can subsume the exising ImplicitBoolConversion::TraverseCXXStdInitializerListExpr. But for a third, that would still make Sequence<Wrap2<sal_Bool>> s6{ { false } }; in compilerplugins/clang/test/implicitboolconversion.cxx emit a false warning, so add a cheesy "TODO" chicken-out special case to ImplicitBoolConversion::checkCXXConstructExpr for now. Change-Id: Ib9a1b78a7812feb98c673b75a357af7737168342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124583 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-01loplugin:unusedmember: Work around more cases not marking an enum as referencedStephan Bergmann
...similar to the "For some reason..." workaround already present in VisitElaboratedTypeLoc. (Thanks to mst for finding this.) Change-Id: Ic682e8290efa64093d3c4a831dfb4d23091b6056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124559 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-26tdf#142010 XLS import: fix bad calculation after editingLászló Németh
Inserting a column messed up formulas in the test document of tdf#142010. This was a regression resulted by the tdf#89281 fix for a performance regression in XLS import related to shared formulas. Revert of commit ba686b9bd2596811141e4028947334f10799c356 "tdf#89281 fix performance regression of XLS import - cleanup" and commit b18b5b7edf3d14ef5f0efe53e367f88a423088c4 "tdf#89281 fix performance regression of XLS import". Change-Id: I96636fb1d84939385efbe7054a4271ff10b88907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124151 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-25Adapt to Clang 14 trunk diagnostic output changeStephan Bergmann
<https://github.com/llvm/llvm-project/commit/aee49255074fd4ef38d97e6e70cbfbf2f9fd0fa7> "Recommit: Compress formatting of array type names (int [4] -> int[4])" Change-Id: I911934a778fddde0d0022f2e2601d1f9c371fe69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-19tdf#145203: FIREBIRD cannot create a tableJulien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1cf57765dd9a66982ecf9cd33687005a70c70c3f 2021-10-08 loplugin:moveparam in connectivity Change-Id: Iec0fa1597e63d42ee3a905bf55eff798b3f46177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123787 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15loplugin:unnecessaryoverride corner case is subsumed nowStephan Bergmann
...by modifications done to the plugin in af908d9f18fbb83a5c393f856026cebefd821f18 "Avoid usage of incomplete types in member functions defined in-class" (if the dtor's definition is spelled `= default;` rather than `{}`, but which should always be possible) Change-Id: Iddce2baf3635a12131854e86a609951309ffbc26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123656 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-15Avoid usage of incomplete types in member functions defined in-classStephan Bergmann
...that started to fail now at least with clang-cl (where the MSVC rules when to emit inline member function definitions are more aggressive than for other ABIs) with --with-latest-c++ and --with-visual-studio=2022 (where usage of incomplete types in std::vector now triggered > In file included from C:/lo-clang/core/slideshow/source/engine/opengl/TransitionerImpl.cxx:31: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\memory:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\exception:12: > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\type_traits(744,50): error: incomplete type 'Primitive' used in type trait expression > struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty)> { > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\type_traits(59,53): note: in instantiation of template class 'std::is_trivially_destructible<Primitive>' requested here > struct conjunction<_First, _Rest...> : _Conjunction<_First::value, _First, _Rest...>::type { > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\type_traits(64,44): note: in instantiation of template class 'std::conjunction<std::is_trivially_destructible<Primitive>, std::disjunction<std::_Is_default_allocator<std::allocator<Primitive>>, std::_Has_no_alloc_destroy<std::allocator<Primitive>, Primitive *>>>' requested here > _INLINE_VAR constexpr bool conjunction_v = conjunction<_Traits...>::value; > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\xmemory(934,20): note: in instantiation of variable template specialization 'std::conjunction_v<std::is_trivially_destructible<Primitive>, std::disjunction<std::_Is_default_allocator<std::allocator<Primitive>>, std::_Has_no_alloc_destroy<std::allocator<Primitive>, Primitive *>>>' requested here > if constexpr (!conjunction_v<is_trivially_destructible<_Ty>, _Uses_default_destroy<_Alloc, _Ty*>>) { > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\vector(1632,13): note: in instantiation of function template specialization 'std::_Destroy_range<std::allocator<Primitive>>' requested here > _Destroy_range(_Myfirst, _Mylast, _Al); > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.305/Include\vector(583,9): note: in instantiation of member function 'std::vector<Primitive>::_Tidy' requested here > _Tidy(); > ^ > C:/lo-clang/core/slideshow/source/engine/opengl/TransitionImpl.hxx(74,5): note: in instantiation of member function 'std::vector<Primitive>::~vector' requested here > TransitionScene( > ^ > C:/lo-clang/core/slideshow/source/engine/opengl/TransitionImpl.hxx(42,7): note: forward declaration of 'Primitive' > class Primitive; > ^ etc.). Which in turn required tweaking of loplugin:unnecessaryoverride to avoid false > In file included from C:/lo-clang/core/slideshow/source/engine/opengl/TransitionerImpl.cxx:67: > C:/lo-clang/core/slideshow/source/engine/opengl/TransitionImpl.hxx(389,18): error: unnecessary user-declared destructor [loplugin:unnecessaryoverride] > TransitionScene::~TransitionScene() = default; > ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > C:/lo-clang/core/slideshow/source/engine/opengl/TransitionImpl.hxx(81,12): note: declared here [loplugin:unnecessaryoverride] > inline ~TransitionScene(); > ~~~~~~~^~~~~~~~~~~~~~~~~~ Change-Id: Ia72fb44e6e92ff47376d7b7159c0df7cbf883b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-12loplugin:unusedmethodsNoel Grandin
Change-Id: Ifd3a1ccef68ebc4cd4e7785357e6a476f6669eb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-12loplugin:unusedfieldsNoel Grandin
Change-Id: I5e9bb4417cf6f8e3c1de1c8570e0635fdf6364bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-12loplugin:moveparam check for collection paramsNoel Grandin
Empirically, when we are passing a collection type to a constructor, 80% of the time, we are passing a local temporary that can be moved instead of being copied. Change-Id: I5acc9d761c920691934a4be806a3d3ab6cdbab96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-09Rename bookmrk* -> bookmark*Julien Nabet
Change-Id: I9dec77b2af8abe5abb286ff76ed85d1e4078ee6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123325 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-07drop 'using namespace std' in compilerpluginsJulien Nabet
Change-Id: I12b4e32b9561657bdbe062b5fb7c18e2ef6ce601 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123196 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-04loplugin:constmethodNoel Grandin
Change-Id: I56af10be5f1155db4c7f2190495fe036a9b4236a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-02new loplugin:moveparamNoel Grandin
Look for places where we can pass Primitive2DContainer by move reference and so avoid unnecessary copies. Change-Id: I1db167feba6d1a616ca6fc39778118ae20106bd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-01loplugin:constparamsNoel Grandin
Change-Id: I0d1ad95a9944c9077a1b9db11f2ae05f993c2b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constmethod handle more casesNoel Grandin
remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28Make loplugin:bufferadd look through O[U]String::operator std::[u16]string_viewStephan Bergmann
Change-Id: I79a32f64541a90b0b824f7721e8815c1e7c873ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122788 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-27tdf#89383 DOCX import: fix permission for editingTünde Tóth
w:writeProtection passwords in DOCX documents created with Word weren't asked and verified to permit editing. Change-Id: I53d73e3acaf0c0fd398ded2de52e1d8ef00cfd56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122384 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-09-23Extend loplugin:stringviewparam to starts/endsWithStephan Bergmann
Change-Id: I4b8fb5e963e582836440587dcaa2922cb5d05bc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-22Adapt to Clang 14 trunk change in diagnosticsStephan Bergmann
<https://github.com/llvm/llvm-project/commit/131e8786640a49daf533b7ead4d3b5b82e0aea2a> "Print nullptr_t namespace qualified within std::" Change-Id: Idb3ebceadfa5a831429b8c3239de426e599eb9c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122459 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-22fix crash in compilerplugins/clang/unnecessaryoverride.cxx:328Michael Stahl
Somehow the compountStmt doesn't have anything in the body? Happens in CurlSession.cxx but not sure where. Change-Id: I69bd2e694e22c891f34242b8bee28012e793f0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122457 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-09-18make FORCE_COMPILE_ALL more flexible than all or nothingLuboš Luňák
Rename it to FORCE_COMPILE and it takes the --enable-symbols specification of what to include, for example FORCE_COMPILE="all -sw/ -Library_sc". Change-Id: I92afd8e0abc75d3566285c197d6640c26c03db36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122248 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-09-15loplugin:virtualdead HasExtraRedlineTable always returns trueNoel Grandin
Change-Id: Ibc703b4c2adc6c6579cc4be50d274504ba957f45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15loplugin:unusedfieldsNoel Grandin
m_pSoftMaskStream is dead since commit 581e7d7057afa87036d84e42c0e0a8a7368e20c7 Author: Joseph Powers <jpowers27@cox.net> Date: Thu Sep 1 20:51:15 2011 -0700 unusedcode.easy: PDFWriter cleanup Change-Id: If397981fb09a7b74ba2294513c13186cc51ad5fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ia7617a0fd4413cbaafaae8fbfee2b2ea819fde8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-13loplugin:mergeclassesNoel Grandin
Change-Id: I908518ac14715f7e546a154b1d5a5ab77eeb4155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122021 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-13loplugin:cow_wrapperNoel Grandin
check the classes that use o3tl::cow_wrapper so that they don't unnecessarity trigger copies Change-Id: I545e627598217f3e61ba2c384adb8d4f8b404829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-13loplugin:methodcyclesNoel Grandin
Change-Id: Ia14e47b811ca56d8d4517f262e008985d6aebe35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>