1600 Commits

Author SHA1 Message Date
Noel Grandin
35c165e46a loplugin:useuniqueptr in SwTextAPIObject
Change-Id: Ied235aefe2cc2ce5e88487503c17e1a54d25ac52
Reviewed-on: https://gerrit.libreoffice.org/56624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29 08:40:31 +02:00
Noel Grandin
bf82016b20 loplugin:useuniqueptr in SwDoc
Change-Id: Ic895c7b79a25a0766cc6d352c5ed75873004fddb
Reviewed-on: https://gerrit.libreoffice.org/56496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-27 08:34:48 +02:00
Noel Grandin
200ca38824 teach useuniqueptr loplugin about calling delete on a param
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-22 20:11:50 +02:00
Noel Grandin
c37077578d loplugin:unusedfields
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-14 21:57:20 +02:00
Noel Grandin
e23363f51e loplugin:unusedmethods
Change-Id: Ibd9f4757ec26da7acc645f33573ace3280e84834
Reviewed-on: https://gerrit.libreoffice.org/55788
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-14 15:32:25 +02:00
Noel Grandin
1c3ffcdd4e loplugin:constantparam
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-12 08:24:45 +02:00
Noel Grandin
48ca5005ec loplugin:singlevalfields
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-12 08:24:24 +02:00
Noel Grandin
a75cc6348c loplugin:unusedfields
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-11 21:31:48 +02:00
Noel Grandin
d4d0376196 loplugin:unusedmethods
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-11 14:38:37 +02:00
Noel Grandin
1f08bff312 new loplugin:shouldreturnbool
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-11 11:38:15 +02:00
Noel Grandin
ff130af966 loplugin:unnecessaryvirtual
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-11 10:45:41 +02:00
Stephan Bergmann
e1ab044401 Improve loplugin:unreffun
...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-01 20:52:41 +02:00
Noel Grandin
23b0844973 loplugin: look for CPPUNIT_ASSERT_EQUALS with params swapped
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-06-01 09:14:25 +02:00
Noel Grandin
f66510f1da loplugin:useuniqueptr in ODbTypeWizDialog
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-28 13:54:42 +02:00
Noel Grandin
0f30c9a1ef loplugin:useuniqueptr in GridWindow
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-28 08:45:33 +02:00
Noel Grandin
ff3bdde252 loplugin:passstuffbyref
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-25 21:46:32 +02:00
Andrea Gelmini
2985319ebd Fix typos
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-23 06:52:55 +02:00
Noel Grandin
6ac83797e0 improve unusedfields loplugin to find constructor-only fields
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-19 21:32:11 +02:00
Andrea Gelmini
2c244e6f53 Fix typos
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-19 20:13:00 +02:00
Armin Le Grand
3ca7be0983 Replace SVGFilter using SVGIO
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-18 20:11:35 +02:00
Noel Grandin
516d593ce1 loplugin:useuniqueptr in SvxAutoCorrectLanguageLists
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-18 13:13:41 +02:00
Stephan Bergmann
ae39b1ef2d Further loplugin:redundantcast improvements for floating-integer conversions
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-17 08:23:37 +02:00
Stephan Bergmann
7ab34b51f2 loplugin:redundantcast improvements for floating-integer conversions
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-17 08:22:14 +02:00
Noel Grandin
19b4520fbf loplugin:useuniqueptr in SvxOutlinerForwarder
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-16 09:03:47 +02:00
Stephan Bergmann
267240ecf7 Adapt compilerplugins to recent Clang trunk change
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-14 13:54:27 +02:00
Noel Grandin
5c3816cce5 loplugin:useuniqueptr in SfxTabDialog
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-14 11:11:33 +02:00
Noel Grandin
3ef9353041 loplugin:datamembershadow in ScVbaStyles
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>
2018-05-11 09:47:54 +02:00
Noel Grandin
1ae25f4895 loplugin:datamembershadow in SdrOutliner
and make the superclass field private too

Change-Id: Ibfe030859d2d81b1cb5b7f47c1292210b16ae42c
Reviewed-on: https://gerrit.libreoffice.org/54108
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11 09:47:38 +02:00
Noel Grandin
c26351ee51 loplugin:datamembershadow in FrameView
Change-Id: I968bde3533682943c30587c74fbfc8a9260feebf
Reviewed-on: https://gerrit.libreoffice.org/54107
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11 09:19:26 +02:00
Noel Grandin
026077340d loplugin:datamembershadow in SvxMacroTabPage_
Change-Id: I8cd1a4fef6bd0966620692c316a40ea47dd14d7d
Reviewed-on: https://gerrit.libreoffice.org/54105
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11 08:44:36 +02:00
Noel Grandin
19156dccf7 loplugin:datamembershadow in DXF filter
depending on which version of the DXF file format you look at, elevation
can be either group code 30 or group code 38. But since neither of these
fields is actually in use, lets just remove both until someone has an
actual use-case for them and can test against real data.

Change-Id: I4355b37c4b8513e8f9704272b269b2fe3f1c659f
Reviewed-on: https://gerrit.libreoffice.org/54104
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11 08:44:21 +02:00
Noel Grandin
0e384e1080 loplugin:unnecessaryvirtual improvements
look for virtual methods where all of the overrides of the method are
empty

Change-Id: I87d99a0b647700a8d53498e0ab5f0437d3508553
Reviewed-on: https://gerrit.libreoffice.org/54060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-10 11:34:18 +02:00
Tomaž Vajngerl
f4e7d521aa move unoapi_property_tester to include so it can be used outside
Change-Id: Id6eebba7d80aa287274e921fdd872d37d0e09ef0
Reviewed-on: https://gerrit.libreoffice.org/53986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-09 02:02:57 +02:00
Stephan Bergmann
b72a31b37f Adapt to Clang trunk SourceManager::getImmediateExpansionRange changes
...of <http://llvm.org/viewvc/llvm-project?view=revision&revision=331155>
"PR37189 Fix incorrect end source location and spelling for a split '>>' token",
changing (among others) the return type of getImmediateExpansionRange from a
std::pair of token locations to CharSourceRange (which will typically also
represent token locations, but might also represent char locations).

For now, map the return value of getImmediateExpansionRange back to a std::pair
(as expected by our compilerplugins code in its current form), and mark the
char location case with a TODO (which will need to be addressed if any of our
plugins starts to produce wrong results due to not handling that char location
case).  In the long run, we should instead adapt our code to use the new return
type of getImmediateExpansionRange directly.

Change-Id: Idc2f5dc43830af4798b55bf605976c4ab146c522
Reviewed-on: https://gerrit.libreoffice.org/53817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-04 13:56:51 +02:00
Noel Grandin
ae680f7c7d make useuniqueptr loplugin check child compound statements
where the child compound statement is unconditional

Change-Id: I755e7ee9134bde81811a694d42a996d3eaae3fc2
Reviewed-on: https://gerrit.libreoffice.org/53763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-03 08:25:43 +02:00
Noel Grandin
a369e6bbd5 loplugin:useuniqueptr look for DELETEZ expressions
can't believe I've been missing these

Change-Id: If39827e1583cbcedfd5061a5059d6df53be0f9c8
Reviewed-on: https://gerrit.libreoffice.org/53598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-29 17:03:18 +02:00
Noel Grandin
edd0d35590 loplugin:countusersofdefaultparams
Change-Id: I84868b3115c534a8240394283cc3beedf8cb3a80
Reviewed-on: https://gerrit.libreoffice.org/53543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-28 08:08:52 +02:00
Caolán McNamara
1d7349476b Related: tdf#117178 rollover is always done in visually released button mode
a quirk of the menutogglebutton is that in rollover it always gets drawn as if
its released, so refactor confusing stuff to take visual mode from a
DrawButtonFlags, allowing the dropping of DrawFlags::NoRollover

Change-Id: I14225bd0d2fbc8276a2b0a26c20673df0105891c
Reviewed-on: https://gerrit.libreoffice.org/53562
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-27 17:22:07 +02:00
Stephan Bergmann
14184060bd Don't warn about multiplication by zero in loplugin:expressionalwayszero
That specific warning (added with 862dc17e437f0972223e18555110dc875d2ffa44
"loplugin:expressionalwayszero improvements", together with other improvements)
already looked somewhat unhelpful to me in
4cb78942f25e9ea2e9a8445825438cd67b1c00f9 "loplugin:expressionalwayszero
(clang-cl)", but now started to generate

> [CXX] vcl/source/bitmap/BitmapSobelGreyFilter.cxx
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:92:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask121 * nGrey12;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:99:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask212 * nGrey21;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:101:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask221 * nGrey22;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:102:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask222 * nGrey22;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:105:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask232 * nGrey23;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:110:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask321 * nGrey32;
>                                  ^~~~~~~~~~~~~~~~~~
> 6 errors generated.

(where all those nMask* are zero constants; and which even passed Gerrit/Jenkins
as loplugin:expressionalwayszero is only active for Clang >= 3.9).  Lets just
remove that specific check again.

Change-Id: Ia8710f83b16d6e6949439d3941e17b8a0959aa8b
2018-04-23 09:24:53 +02:00
Noel Grandin
d254f8a926 loplugin:singlevalfields improve unaryoperator
when we see a unaryoperator, unless it's one of a small set, we can
know (mostly) that the field will not be written.
there is still a small risk of false+ with code taking references
via conditional expressions.

Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e
Reviewed-on: https://gerrit.libreoffice.org/53263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-23 08:16:18 +02:00
Noel Grandin
7e937a1384 loplugin:useuniqueptr in Inflater,Deflater
Change-Id: I55833664a6e76d781908b8f1f721dd9a4946e35f
Reviewed-on: https://gerrit.libreoffice.org/53224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-23 08:14:07 +02:00
Noel Grandin
1055a94124 loplugin:singlevalfields
Change-Id: I8f3bad622daa3ce118d20c5be12294a3fab85c2a
Reviewed-on: https://gerrit.libreoffice.org/53166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20 08:58:48 +02:00
Noel Grandin
c9faab6245 loplugin:unnecessaryvirtual
Change-Id: Ieecb426f4f839bb1f94e58e45a99643a74ec3009
Reviewed-on: https://gerrit.libreoffice.org/53165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20 08:58:34 +02:00
Stephan Bergmann
cb06f61967 More containsPreprocessingConditionalInclusion checking in loplugin:casttovoid
...to avoid false positive with --disable-dbgutil in SfxApplication ctor
(sfx2/source/appl/app.cxx), which contains

    bool bOk = InitializeDde();
  #ifdef DBG_UTIL
    ...
  #else
    (void)bOk;
  #endif

Change-Id: I4de6322a848a9c6aea3057e4598b2161888dee6a
Reviewed-on: https://gerrit.libreoffice.org/53051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-17 20:46:28 +02:00
Noel Grandin
d911b3d37d loplugin:useuniqueptr in OStorePageBIOS
update the plugin to check all methods for deleting fields.

Also remove the dead checks for new failing here, can never have worked,
because it is not calling the std::nothrow variant.

Change-Id: I139410e42f83ae2db0cd38ceee81c8b4c310268c
Reviewed-on: https://gerrit.libreoffice.org/52881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16 08:21:36 +02:00
Tomaž Vajngerl
a2b53fece1 vcl: Add a internal (memory) manager for Graphic objects
This adds vcl::graphic::Manager which is a manager singleton that
tracks all the creation fo graphic objects and swaps them out on
a time and allocation basis.

Time based - every number of seconds it looks for Graphics that
weren't used for a time.

Allocation based - when creating a new Graphic and the total of
Graphic uses more than the total amount of memory for Graphics
defined in configuration, it tries to release the Graphics that
weren't used for a time.

Change-Id: I5dbf74db4a6455d32c4abcbad7be21c7f0534642
Reviewed-on: https://gerrit.libreoffice.org/52396
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-12 14:35:14 +02:00
Noel Grandin
5afe093d89 remove some debug code
Change-Id: I9098ecbd3e7f96db2206d7c117cf28d0d2d5465f
2018-04-11 15:31:59 +02:00
Noel Grandin
49eb02f07a new loplugin:unusedvariablemore
collection of heuristics to look for local variables that are never read
from i.e. do not contribute to the surrounding logic

This is an expensive plugin, since it walks up the parent tree,
so it is off by default.

Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06
Reviewed-on: https://gerrit.libreoffice.org/52450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-11 09:48:10 +02:00
Noel Grandin
64a5d65f4c put the loplugin output files in the workdir
so that the next time I accidentally leave one turned on, and commit it,
the buildbots will clean up naturally the next time they run 'make
clean'

Change-Id: Ia09dea9c272c322c7e2773c5458cb54aceb50dd1
2018-04-10 15:54:24 +02:00
Noel Grandin
9e6ee59a0f darn, unusedfields loplugin was left enabled
Change-Id: I343262e0c61e9ecde5395f13732c212197e7fd03
2018-04-10 15:14:33 +02:00