Commit Graph

3202 Commits

Author SHA1 Message Date
1dea4f935a cid#1451627 Division or modulo by float zero
Change-Id: Ifb4b446edb3da3096230e99a898e2fa8c4e9d66c
Reviewed-on: https://gerrit.libreoffice.org/76098
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-22 20:48:45 +02:00
836c40904f loplugin:referencecasting in canvas..chart2
Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc
Reviewed-on: https://gerrit.libreoffice.org/75935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19 11:31:51 +02:00
4b65103510 cid#1448440 silence Dereference null return value
Change-Id: I1dce0d6a40086539cbcadeaf9a669f4640dbc730
Reviewed-on: https://gerrit.libreoffice.org/75817
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18 11:55:25 +02:00
7fcb5c2031 cid#1448236 Use after free
Change-Id: Id7a0ad49a8e73a6b12a0f40c4b8f62b1e1d64356
Reviewed-on: https://gerrit.libreoffice.org/75810
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18 09:37:45 +02:00
0e15fb798a tdf#94300: custom gradients apply also from chart sidebar
Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2
Reviewed-on: https://gerrit.libreoffice.org/75693
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-07-17 11:03:49 +02:00
de075c0f38 cid#1448478 Dereference befoew null check
Change-Id: Ia73e6d02d8a8b06012f207820d0d579cfc08c541
Reviewed-on: https://gerrit.libreoffice.org/75718
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-16 20:32:50 +02:00
06579261de cid#1448300 Using invalid iterator
Change-Id: Ibf3c2f90834e40f06ee1ba55480bd1d345642059
Reviewed-on: https://gerrit.libreoffice.org/75663
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-16 12:16:58 +02:00
4583911575 improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25 13:53:21 +02:00
336b9a14f6 tdf#39593 Remove chart::ExplicitValueProvider::getExplicitValueProvider
Replace with comphelper::getUnoTunnelImplementation.

Change-Id: I8a457dc2aa701957f463b31bd6cc112337999aad
Reviewed-on: https://gerrit.libreoffice.org/74377
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-20 07:51:48 +02:00
e080acf221 tdf#42949 Fix IWYU warnings in include/svx/[t-v]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I345b8c54890b5bc27f51addd2e6e73ba68b6b327
Reviewed-on: https://gerrit.libreoffice.org/73977
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-18 09:08:59 +02:00
adc295a1b2 Add comphelper::getUnoTunnelImplementation template
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_*

Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596
Reviewed-on: https://gerrit.libreoffice.org/74107
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-17 08:56:36 +02:00
bba7ca803c loplugin:logexceptionnicely in chart2
Change-Id: Ib7933723e5506578bbc85cc431d54d1ed8466376
Reviewed-on: https://gerrit.libreoffice.org/74019
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14 10:49:55 +02:00
a7ceb3352a tdf#42949 Fix IWYU warnings in include/svx/[sS][v-Z]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie2a4122d67d2d40732e6fd00b584f33edd802c5b
Reviewed-on: https://gerrit.libreoffice.org/73476
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-11 08:48:04 +02:00
ca81bf6c7d Fix typo
Change-Id: Iae4e5edb4d7df99e48b0198f150b8593ef206a8f
Reviewed-on: https://gerrit.libreoffice.org/73786
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-06-11 07:58:06 +02:00
1eb8859813 Use hasElements to check Sequence emptiness in chart2..connectivity
Similar to clang-tidy readability-container-size-empty

Change-Id: I41824e8a4ef38d6a35a0ac4421cffcbcd17308e1
Reviewed-on: https://gerrit.libreoffice.org/71802
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-10 10:55:57 +02:00
d00a8b05c0 weld View3DDialog
Change-Id: Ifd689c54574c08f026f6760efb39b5f927cb2625
Reviewed-on: https://gerrit.libreoffice.org/73604
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-08 16:17:45 +02:00
548f30f21b Fix typo
Change-Id: I0037cf0a59189862ad502bfbdb00580ed7378fe4
Reviewed-on: https://gerrit.libreoffice.org/70393
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-07 07:09:10 +02:00
32eeb405d7 tdf#39593 remove IMPL_XUNOTUNNEL* macros
Replace with UNO3_GETIMPLEMENTATION* macros.
Replace single usage of IMPL_XUNOTUNNEL_MINIMAL with it's body.

Change-Id: I7d4ad76399b999ebb2178ecf57edcf6bd2aa6c3e
Reviewed-on: https://gerrit.libreoffice.org/73424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-04 09:06:43 +02:00
3847676cf6 tdf#42949 Fix IWYU warnings in include/svx/[h-r]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ib7e1d0f7483aa8b5cab320278714f2d5f36fdbd9
Reviewed-on: https://gerrit.libreoffice.org/72534
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-22 08:56:11 +02:00
4a7a37f942 lok: chart: constrained dragging of pie segments
The extra information for the graphic selection is now formatted
according to JSON syntax so that is easier to parse.

Information for allowing the client to performa constrained dragging
of a pie segment is appended when needed to the graphic selection
message.

A polygon approximation of the pie segment in svg format is attached
too to the graphic selection message.

Core now is able to handle a specific msg from the client with data
about the new pie segment offset computed by the client on drag end.
This information is dispatched by the chart controller to a specific
method: executeDispatch_LOKPieSegmentDragging.

Change-Id: I42e7742508fa3a453383bf7b95e47df169f24834
Reviewed-on: https://gerrit.libreoffice.org/70568
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2019-05-20 10:35:49 +02:00
e9e57c61a7 lok: chart: informing the client about selection handling properties
We hijack the chart CID protocol (CID:/classification/ObjectID) by
inserting information about selection handling properties (draggable,
resizable, rotatable) btw the classification section and the ObjectID
section.
This new section has the form: /Draggable=?:Resizable=?:Rotatable=?
where in place of '?' there is 0 or 1.
The hijacking occurs at the ChartController.getSelection method which
is available through the XSelectionSupplier interface.

Change-Id: Iaf920fe68e59c2595000e43d3fc1f976632cef18
Reviewed-on: https://gerrit.libreoffice.org/70567
Tested-by: Jenkins
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2019-05-20 10:34:48 +02:00
f6727831d5 lok: dragging and resizing chart elements
This patch make possible to set the new position or size of a chart
object through setting directly the property value instead of sending
mouse events to the core.

Change-Id: Ifc06dac6bdad78081d63e0ea0db55563a1ae57bc
Reviewed-on: https://gerrit.libreoffice.org/70566
Tested-by: Jenkins
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2019-05-20 10:34:29 +02:00
57a23fcb90 allow a OutputDevice parent where that is sufficient
Change-Id: I2920ea1a82de5eacbfeceafbb3c63693dd4365db
Reviewed-on: https://gerrit.libreoffice.org/72414
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-17 09:54:56 +02:00
430b3f4db7 Resolves: tdf#120423 dispatch against the correct Frame
Change-Id: I5ea2e5d7b79efbd2b14d0b528e5a5c3e44e643bc
Reviewed-on: https://gerrit.libreoffice.org/72284
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-14 17:11:56 +02:00
1bf1c56ce0 Remove ContainerHelper.hxx
Use comphelper::sequenceToContainer instead of ContainerHelper::SequenceToVector

Change-Id: I4834255a1349ac7a29127a84a54fcfa98d678d00
Reviewed-on: https://gerrit.libreoffice.org/72186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 10:02:02 +02:00
a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
492b0d5d07 weld conditional formatting
Change-Id: Ia9c99a17d5a95d67a412cfde959192c99caa70be
Reviewed-on: https://gerrit.libreoffice.org/71956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-11 18:34:23 +02:00
4709cd82c7 tdf#62699 Drop pass-through header file include/svx/svdattr.hxx
Change-Id: I04289589196ac69b31f75989d9252c79d03c890f
Reviewed-on: https://gerrit.libreoffice.org/71633
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-10 09:14:59 +02:00
38371d01e0 Consolidate MutexContainer GetMutex() vs. direct m_aMutex access
...at which point MutexContainer becomes all-inline and need no longer be
OOO_DLLPUBLIC_CHARTTOOLS

Change-Id: I2f9c089a1189cc8c0fe5cf1760f62e71c5bb7f51
Reviewed-on: https://gerrit.libreoffice.org/72052
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-10 08:22:25 +02:00
747a7d2603 Fix typo
Change-Id: I2b5827c3f6fd7630655d4658844792462f80767e
Reviewed-on: https://gerrit.libreoffice.org/72016
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-09 08:50:07 +02:00
e0382c3ad7 avoid copying when placing items into SfxItemSet
Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0
Reviewed-on: https://gerrit.libreoffice.org/71941
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09 08:47:50 +02:00
8e475035a7 tdf#120703 PVS: Blind attempt to implement original idea
The strange implementation was there ever since commit
bd36338009672fdabd5b6d585f8c1092b617196a.

The other possibility is to just remove the block above the last
assignment to aRet

Change-Id: I5bd3bf1f518ab894e5df4cbc7d86a76d325e4600
Reviewed-on: https://gerrit.libreoffice.org/71447
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-28 08:35:57 +02:00
38ef4990bf tdf#42949 Fix IWYU warnings in include/svx/[a-D]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I9770343f31f882427c9ae13e363b59cd1fb47e98
Reviewed-on: https://gerrit.libreoffice.org/71295
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-27 17:45:17 +02:00
7ec3baef93 Convert remaining SdrHint to static_cast
follow-up of 10c934147d469965dba6abc78efd02759a010b8e

Change-Id: I2085173dffd71dbbc68a0574400bebe132626dd9
Reviewed-on: https://gerrit.libreoffice.org/71284
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-04-25 15:22:04 +02:00
3667031eb2 tdf#42949 Fix IWYU warnings in include/editeng/[f-x]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ic14d2e66434817bcb7bd1e2b707f81d720d596b6
Reviewed-on: https://gerrit.libreoffice.org/71007
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-23 12:12:46 +02:00
0e335af4d3 Fix uses of variables before their lifetimes begin
All of those have been broken with recent loplugin:sequentialassign changes (and
have been found with a new plugin to be commited).

The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks
suspicious, but has been effectively like that ever since at least
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just marked it
with a TODO comment for now.

Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf
Reviewed-on: https://gerrit.libreoffice.org/70874
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-17 18:56:04 +02:00
0eaa080408 tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f
Reviewed-on: https://gerrit.libreoffice.org/70710
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15 11:48:54 +02:00
b52f309f2b improve loplugin simplifyconstruct
to find stuff like
   OUString s = OUString("xxx")

Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15 08:37:54 +02:00
6154489314 tdf#120703 PVS: V581 ifs with identical conditions
V581 The conditional expressions of the 'if' statements situated
     alongside each other are identical.

Change-Id: I18562d60e33c7ecff14807976dde4cbcae3f665b
Reviewed-on: https://gerrit.libreoffice.org/70731
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-14 15:47:48 +02:00
f7d8e33180 loplugin:sequentialassign in chart2
Change-Id: I211114140afc3f5b32b8b034e63e8d52f78be36a
Reviewed-on: https://gerrit.libreoffice.org/70659
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-12 20:30:46 +02:00
044e58900d Fix typo
Change-Id: I9f86967383e98ee051aee5e98bcb68fb4f165ef2
Reviewed-on: https://gerrit.libreoffice.org/70577
Tested-by: Jenkins
Reviewed-by: himajin100000 <himajin100000@gmail.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-11 08:56:58 +02:00
2845829021 Fix typo
Change-Id: Ia4cad4c7ca97a8230439b94f2fca74324a4dad41
Reviewed-on: https://gerrit.libreoffice.org/70578
Reviewed-by: himajin100000 <himajin100000@gmail.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-11 08:56:26 +02:00
1e75520265 Fix typo
Change-Id: I9861cda038b6ab32aea44bc82dd0d1253a0679d4
Reviewed-on: https://gerrit.libreoffice.org/70579
Tested-by: Jenkins
Reviewed-by: himajin100000 <himajin100000@gmail.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-11 08:55:07 +02:00
4a6dc219fc tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679
Reviewed-on: https://gerrit.libreoffice.org/70383
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-08 11:55:43 +02:00
5a824268df Don't use resettable/clearable guard where plain guard is enough
Also use scope where possible. This allows to limit guard scope at
language level; visualises the scope clearly; and helps avoiding
errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b.

Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41
Reviewed-on: https://gerrit.libreoffice.org/70376
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07 17:53:04 +02:00
3feb65096a tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.

Change-Id: I680f1628133216de6336ac5ffa846447ffd55a41
Reviewed-on: https://gerrit.libreoffice.org/70352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07 13:52:51 +02:00
7327260de3 tdf#120703: partially revert commit 85456fae54029edd26df2277a9eec5e2fe3d9739
... to take into account possible differences of results of dynamic_cast
vs static_cast; the change casts dynamically, as before the commit, and
only adds asserts on the result of the cast.

Thanks to sberg for pointing my mistake out!

Change-Id: Ib77d443e5a858e744f369f58542de603f948fd1c
Reviewed-on: https://gerrit.libreoffice.org/70274
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-05 08:33:33 +02:00
d48f5dc1a0 Fix typo
Change-Id: I7b329b4da49464e2bb34c29b8db0aa8e21c94c0e
Reviewed-on: https://gerrit.libreoffice.org/70283
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-05 07:56:35 +02:00
85456fae54 tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.

Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-01 00:49:12 +02:00
d9e0eade62 Remove unused using declarations in directories [a-d]*
Found with:
run-clang-tidy-7 -checks=-*,misc-unused-using-decls

Change-Id: I50f6dfa881ac4e752668e762ade0943aaf28ab96
Reviewed-on: https://gerrit.libreoffice.org/69601
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27 10:44:44 +01:00