summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2018-07-23loplugin:unusedfieldsNoel Grandin4-112/+148
Change-Id: I1827262ad95942cacff589929f9436f8383cf142 Reviewed-on: https://gerrit.libreoffice.org/57642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20loplugin:useuniqueptr in HTMLTableNoel Grandin1-1/+12
Change-Id: I46ece073659444e802bf480996a5797c9f1ec9e8 Reviewed-on: https://gerrit.libreoffice.org/57754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20loplugin:unusedfields - look for fields that can be const, in comphelperNoel Grandin2-0/+63
idea from tml. Extend the unusedfields plugin to find fields that are only assigned in the constructor. Change-Id: I258d3581afbe651d53ce730c9ba27a4598cd9248 Reviewed-on: https://gerrit.libreoffice.org/57733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20loplugin:useuniqueptr in XclObjNoel Grandin1-0/+4
Change-Id: I2995dfe5fb39ae2e7f3c37992cb3e2147381784e Reviewed-on: https://gerrit.libreoffice.org/57753 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19Fix typosAndrea Gelmini1-1/+1
Change-Id: I7d12fe95d1c65a431325273c6e95943166e2ec58 Reviewed-on: https://gerrit.libreoffice.org/56941 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-19loplugin:useuniqueptr in SwUndoTableMergeNoel Grandin1-0/+4
Change-Id: I0c528c2b12d219f37a2c2fdf2211fce3c51ad9e4 Reviewed-on: https://gerrit.libreoffice.org/57688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19loplugin:constantparamNoel Grandin4-386/+366
Change-Id: I8e2e9009f0a70d2fa390e03688a988ac935d5f36 Reviewed-on: https://gerrit.libreoffice.org/57643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17loplugin:useuniqueptr in ScTabViewNoel Grandin1-0/+3
Change-Id: Ic506f5d350abbbbb5912e3ebf753e02821c76841 Reviewed-on: https://gerrit.libreoffice.org/57523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17loplugin:useuniqueptr in SwHTMLWriterNoel Grandin1-0/+3
Change-Id: I4802e6502addce96bff4831598e852e4fe673af4 Reviewed-on: https://gerrit.libreoffice.org/57521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17remove the GL based 3D chartsMarkus Mohrhard7-79/+0
Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9 Reviewed-on: https://gerrit.libreoffice.org/57533 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-16loplugin:mergeclasses update results outputNoel Grandin1-18/+26
Change-Id: Id1138cf7358c610aff77b7d7073c61cd3f13129c Reviewed-on: https://gerrit.libreoffice.org/57485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-16loplugin:useuniqueptr in UndoTransliterate_DataNoel Grandin1-1/+5
Change-Id: I1c6e865a6f59ce7f31c42d28b2b463a577b3cc28 Reviewed-on: https://gerrit.libreoffice.org/57421 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-13loplugin:useuniqueptr in SbUnoStructRefObjectNoel Grandin2-6/+2
now that we have upgraded to VS2017, we can use std::unique_ptr in std::map Change-Id: Id01af07ccae7447405b8f0bc44b08043f453e54b Reviewed-on: https://gerrit.libreoffice.org/57384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-13loplugin:useuniqueptr in SwGrammarContactNoel Grandin1-0/+6
Change-Id: I1e6a2ca8f00d6130cfa6d2c18139bf61ada10630 Reviewed-on: https://gerrit.libreoffice.org/57363 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-12loplugin:mergeclasses fix ignoring some stuffNoel Grandin6-2/+14
Seems that calling getCanonicalDecl here results in us sometimes picking up forward-decl's, which hides stuff Also make the python processing code spit out a message if I manage to mess up the log files Change-Id: I08bf50eb26cf463c126507b51535b0a0fc9f7ecf
2018-07-09Add missing sal/log.hxx headersGabor Kelemen2-0/+2
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 a* to configmgr Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a Reviewed-on: https://gerrit.libreoffice.org/57170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-06compilerplugins: try to make these work with icecreamMichael Stahl34-75/+103
There are some problems here, this should fix one of them: the getFilename function returns "<stdin>" for spelling locations, because the input to clang is sort of preprocessed via -frewrite-includes if icecream is used and the file is built on a remote host (whereas it's apparently not preprocessed if the file is compiled locally by icecream). Using getPresumedLoc() uses the #line directives in the preprocessed input, which avoids the problem but is more expensive, so try to use it only when necessary. The getFileEntry(getMainFileID())->getName() pattern will also result in "<stdin>", but fortunately icecream passes -main-file-name, which oddly enough isn't used by the SourceManager's spelling locations, but is available separately via CodeGenOptions. This builds everything successfully with clang version 6.0.0: ICECC_PREFERRED_HOST=myremote make check gb_SUPPRESS_TESTS=t Change-Id: Ic121511683e5302d7b9d85186c8b9c4a5443fa1b Reviewed-on: https://gerrit.libreoffice.org/54993 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-07-04loplugin:useuniqueptr in ScSimpleEditSourceHelperNoel Grandin1-0/+3
Change-Id: Iebe62753d9e6f83f985e4c55fb938d5861613898 Reviewed-on: https://gerrit.libreoffice.org/56903 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03Adapt compilerplugins/clang/store/deletedspecial.cxxStephan Bergmann1-1/+0
...to 322083e0cf1268bc5d40f0d49eb50f00f503ef15 "ScFormEditData copy functions can be deleted" Change-Id: Ic62c83b79e70a79d1d236b79140009a4212b6a43 Reviewed-on: https://gerrit.libreoffice.org/56878 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-02loplugin:constantparamNoel Grandin4-415/+427
Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5 Reviewed-on: https://gerrit.libreoffice.org/56778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02loplugin:unusedmethodsNoel Grandin2-128/+188
Change-Id: I92665f577bfe39497905063da517a05b8008c3cc Reviewed-on: https://gerrit.libreoffice.org/56743 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02loplugin:unusedfields improve checking for write-only fieldsNoel Grandin5-104/+126
we trade off a little accuracy for finding more possible write-only fields. Change-Id: I9f7edba99481fe4ded0a9d8e45e911b0ee99d269 Reviewed-on: https://gerrit.libreoffice.org/56715 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29Improved loplugin:redundantcast (const-qualified typedefs)Stephan Bergmann2-1/+4
...see comments to <https://gerrit.libreoffice.org/#/c/56661/> "This cast seems completely unnecessary to me?" Change-Id: I57d27cd2aa2dc94bc2e0b49fe06a09d31301cb7e Reviewed-on: https://gerrit.libreoffice.org/56708 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-29loplugin:useuniqueptr in SwTextAPIObjectNoel Grandin1-0/+6
Change-Id: Ied235aefe2cc2ce5e88487503c17e1a54d25ac52 Reviewed-on: https://gerrit.libreoffice.org/56624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-27loplugin:useuniqueptr in SwDocNoel Grandin1-0/+5
Change-Id: Ic895c7b79a25a0766cc6d352c5ed75873004fddb Reviewed-on: https://gerrit.libreoffice.org/56496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-22teach useuniqueptr loplugin about calling delete on a paramNoel Grandin2-0/+66
which is often a useful indicator that the callers can be made to use std::unique_ptr Change-Id: Idb1745d1f58dbcf389c9f60f1a5728d7d092ade5 Reviewed-on: https://gerrit.libreoffice.org/56238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-14loplugin:unusedfieldsNoel Grandin4-30/+662
Change-Id: I7d9966d11f8272034523d9804ecf76e119552780 Reviewed-on: https://gerrit.libreoffice.org/55796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-14loplugin:unusedmethodsNoel Grandin2-205/+71
Change-Id: Ibd9f4757ec26da7acc645f33573ace3280e84834 Reviewed-on: https://gerrit.libreoffice.org/55788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12loplugin:constantparamNoel Grandin4-1396/+3694
Change-Id: Ia769b3176aea287cd57414d7ce8e88c6da43883e Reviewed-on: https://gerrit.libreoffice.org/55622 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12loplugin:singlevalfieldsNoel Grandin1-51/+30
Change-Id: I1ea854982e042bccc7e5f531802cf1016c81b488 Reviewed-on: https://gerrit.libreoffice.org/55615 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11loplugin:unusedfieldsNoel Grandin3-197/+249
Change-Id: I42a55562747e6097c1193e285da67235f5364bea Reviewed-on: https://gerrit.libreoffice.org/55610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11loplugin:unusedmethodsNoel Grandin2-236/+502
Change-Id: I26a0da1ec9cda9030371977596053a45303756a0 Reviewed-on: https://gerrit.libreoffice.org/55609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11new loplugin:shouldreturnboolNoel Grandin2-0/+281
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11loplugin:unnecessaryvirtualNoel Grandin2-14/+16
Change-Id: I2ff0f1fff7302cbf884e35879c72df0dc09eede4 Reviewed-on: https://gerrit.libreoffice.org/55597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-01Improve loplugin:unreffunStephan Bergmann3-0/+60
...to avoid a false positive in --enable-qt5 > [build CXX] vcl/qt5/Qt5Widget.cxx > /home/sbergman/lo/core/vcl/qt5/Qt5Widget.cxx:466:21: error: Unreferenced function declaration [loplugin:unreffun] > friend QWidget* createQt5Widget(Qt5Frame& rFrame, QWidget* parent, Qt::WindowFlags f); > ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. Change-Id: I01e47bc5f5147916737d62fe18ce5312a0221a3f Reviewed-on: https://gerrit.libreoffice.org/55189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin2-52/+129
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:useuniqueptr in ODbTypeWizDialogNoel Grandin1-0/+3
Change-Id: I4c364ddbad4881cc8a70a1827d7c51e7cc9313f1 Reviewed-on: https://gerrit.libreoffice.org/54850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:useuniqueptr in GridWindowNoel Grandin1-0/+3
Change-Id: I9fd6d8ac159994c894739afbb3dccb72576dccfb Reviewed-on: https://gerrit.libreoffice.org/54844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25loplugin:passstuffbyrefNoel Grandin1-0/+4
Change-Id: I785e96599bbda029adf4698d11d7f981750dec07 Reviewed-on: https://gerrit.libreoffice.org/54802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-23Fix typosAndrea Gelmini1-1/+1
Change-Id: Ibe94c7379a9389a0506c33666bf2bfb033f96f08 Reviewed-on: https://gerrit.libreoffice.org/54670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-05-19improve unusedfields loplugin to find constructor-only fieldsNoel Grandin2-2/+50
ie. fields that are only touched in the constructor Change-Id: Ia714cbfed9710e47e69ca9f0eb0eac4f7e8b8a86 Reviewed-on: https://gerrit.libreoffice.org/54412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-19Fix typosAndrea Gelmini1-1/+1
Change-Id: Ie0c9f168759a625d78668cd57838b208fbc9dc56 Reviewed-on: https://gerrit.libreoffice.org/54458 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-18Replace SVGFilter using SVGIOArmin Le Grand1-4/+0
Target of this change is to get rid of the SVGFilter in current LO which is based on the standard-ODF importer using it's functionality by passing in/handing over temporary created XML-Stream-Data. First step is to alternatively import the given SVG file to a newly created Document and to strip the existing Filter-Code. Adding the first prototype of the changed import. It is capable of importing the given SVG to the created Draw/Impress document. It adds the SVG which gets imported by SVGIO as GraphicObject. It adapts sizes and positions of Page and GraphicObject to have a smooth import. Adding stripping of SVGFilter and used ressources. Done as deep as possible, hopefully all places found. Adapted now to create an Impress document. Also added needed adaptions to PageSize(s), including layout and PresObj stuff to make all MasterPages/LayoutPages work correctly. Added reaction on empty SVG. This is needed since the PageSize is adapted to the Graphic. With empty Graphic a Size(0,0) results and this goes wrong. Change-Id: Ia364a5783bee7dadcbe91e700efbabc121cf98f9 Reviewed-on: https://gerrit.libreoffice.org/54096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-18loplugin:useuniqueptr in SvxAutoCorrectLanguageListsNoel Grandin1-0/+3
Change-Id: Ie433a336f9cd5133aefbe4ef88d214b5f5c63a0a Reviewed-on: https://gerrit.libreoffice.org/54182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-17Further loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann1-2/+14
The code in svx/source/customshapes/EnhancedCustomShape2d.cxx started out as > aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) / fXScale ) ) + aCenter.X(); > aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y(); > aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) / fXScale ) ) + aCenter.X(); > aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y(); in afd1cf255d9cb4c78633e668376a09bd309be7ef "INTEGRATION: CWS sj05", then the floating-point scaling factors got gradually removed first with 101559f88022162ede229fe14366d394700816fe "INTEGRATION: CWS bm3" and then completely with d9f21c90bd61d15fd78a8df9115bf2e9ededbd1b "Fixes Circular arrow distortion, Bug #46272". Change-Id: I337d7893e513738c986d0e85efabcbf7bab912e5 Reviewed-on: https://gerrit.libreoffice.org/54434 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann2-0/+27
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-16loplugin:useuniqueptr in SvxOutlinerForwarderNoel Grandin1-0/+4
Change-Id: Ie861132b43b0a01ee8b4f3bc201bbf12f8af9f36 Reviewed-on: https://gerrit.libreoffice.org/54181 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-14Adapt compilerplugins to recent Clang trunk changeStephan Bergmann1-1/+7
Change-Id: I3013799433e7b82d6b869e9a3cf071495a12d5ae Reviewed-on: https://gerrit.libreoffice.org/54304 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-14loplugin:useuniqueptr in SfxTabDialogNoel Grandin1-0/+4
Change-Id: I460bf5aac44e6fd08a5bd5ab8af217dedbcc3cf8 Reviewed-on: https://gerrit.libreoffice.org/54174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11loplugin:datamembershadow in ScVbaStylesNoel Grandin1-2/+0
member already present in superclass InheritedHelperInterfaceImpl Change-Id: I52a8178f95ad65dc0780ba0f82d6322cea039ba4 Reviewed-on: https://gerrit.libreoffice.org/54109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>