Commit Graph
1339 Commits
Author SHA1 Message Date
Noel Grandin b7e08c5940 loplugin:useuniqueptr in Triangulator
Change-Id: If963704ec8af82ed2af1418621ef7fc5e475567f
Reviewed-on: https://gerrit.libreoffice.org/50364
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27 10:25:09 +01:00
Julien Nabet 3ceb01afc3 Use for range loops in basegfx and basic
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56
Reviewed-on: https://gerrit.libreoffice.org/50280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-24 17:28:43 +01:00
Noel Grandin 0f28c8612f loplugin:unused-returns in basegfx..cppcanvas
Change-Id: I32dc8c92871c8349651d2f4204a332d387e6e1b2
Reviewed-on: https://gerrit.libreoffice.org/48428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 13:51:24 +01:00
Noel Grandin 23885b06b1 loplugin:unnecessaryparen extend to delete statements
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1
Reviewed-on: https://gerrit.libreoffice.org/48027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-17 09:32:03 +01:00
Noel Grandin f8fc4f4f4e loplugin:useuniqueptr in ImplB3DPolygon
Change-Id: I9aae095702246d1b0fca5282874de5e0a0efcd60
Reviewed-on: https://gerrit.libreoffice.org/47792
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-13 15:48:41 +01:00
Stephan Bergmann a82b177f98 More loplugin:cstylecast: basegfx
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Ifa4a6643b41525c962cd6af5776e1bf10bddb71c
2018-01-12 20:29:32 +01:00
Tomaž Vajngerl d1296f4e02 basegfx: extract svg path import/export test to own file
Change-Id: If9925540feb54e5a101c76f8d4cebaa305ac4c75
Reviewed-on: https://gerrit.libreoffice.org/47299
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-04 07:38:42 +01:00
Andrea Gelmini e87d32a380 Fix typos
Change-Id: If8f042c6ef02c204f8946900e9ea8b99f06a631c
Reviewed-on: https://gerrit.libreoffice.org/47240
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-02 09:28:47 +01:00
Noel Grandin e21ae87458 loplugin:passstuffbyref improved return in xmlhelp,slideshow
Change-Id: I57e235ecec733f1b5dd03f95f4e022769a369ae2
Reviewed-on: https://gerrit.libreoffice.org/47165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29 10:55:41 +01:00
Noel Grandin 6028b64e27 loplugin:passstuffbyref even more return improvements
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2
Reviewed-on: https://gerrit.libreoffice.org/47021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-24 07:01:47 +01:00
Noel Grandin 2a1fb4401d loplugin:passstuffbyref improved returns
improve the detection of stuff we can return by const &, instead of by
copying

Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23 08:04:54 +01:00
Noel Grandin e6e85f139b remove unused typedefs
Change-Id: I6fd7a9fed3a80c91a3766fceefd43c5db0aa5275
Reviewed-on: https://gerrit.libreoffice.org/46763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 12:39:14 +01:00
Noel Grandin a5be07d6b6 inline use-once typedefs
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157
Reviewed-on: https://gerrit.libreoffice.org/46764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 11:57:57 +01:00
Noel Grandin c947a25b3a loplugin:countusersofdefaultparams in basctl..basegfx
Change-Id: I515acfb9de1f6dff1de94a60055c5b600e5e5241
Reviewed-on: https://gerrit.libreoffice.org/45957
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 07:19:59 +01:00
Stephan Bergmann cb80350a1a loplugin:unnecessaryparen
Change-Id: Ief879dde0613859a9ea9b3e3e70938594ab99209
2017-11-27 15:41:19 +01:00
Noel Grandin 2e5508a176 loplugin:unnecessaryparen check for (f1()).f2
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3
Reviewed-on: https://gerrit.libreoffice.org/45218
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27 10:44:25 +01:00
Stephan Bergmann b26012ef15 Make loplugin:unnecessaryparen look through implicit
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning
about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool

Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18
Reviewed-on: https://gerrit.libreoffice.org/45122
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23 10:00:44 +01:00
Stephan Bergmann 72ef2b5d98 Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for

  pFormat = (pGrfObj)
      ? ...

(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).

Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22 19:16:52 +01:00
Armin Le Grand 6675e6eaf9 RotateFlyFrame3: Initial support added
First steps to get a rotated FlyFrame and content
that only uses layouted sizes/positions and does not
change the model data (except rotation). This works
with persistence, after reload the rotation can be
resetted with going back to the original FrameSize.
Lot of stuff not yet working, experimental state.

Change-Id: Ie29d501fe2e618a1cb4457d600ce97575ed372d0
2017-11-18 13:07:43 +01:00
Noel Grandin 32823280ef loplugin:unusedmethods
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454
Reviewed-on: https://gerrit.libreoffice.org/44553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10 12:56:14 +01:00
Noel Grandin 094542511f loplugin:constantparam in basegfx
Change-Id: Ieabdd6f8d76cfc2ed75f2ec618def6591a9adc93
Reviewed-on: https://gerrit.libreoffice.org/44130
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01 07:13:23 +01:00
Caolán McNamara 6b760dc4bb ofz#3826 Divide-by-zero
with fLeftStart == 1.0 (is allowed, see comment at mfCut) the whole
BezierSegment is needed and does not need to be cut at all so best would be to
add it to 'while' loop, after that the 'rest' will be added anyways so, add
'fLeftStart < 1.0' or 'fLeftStart != 1.0' (since limited to [0.0 .. 1.0]) to
the while in line 120 should do it

Change-Id: Ida87e06247d169482df26e665985753e634e149e
Reviewed-on: https://gerrit.libreoffice.org/43935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-27 12:15:52 +02:00
Noel Grandin db04585533 loplugin:constmethod in basegfx,sot
Change-Id: I05d2cdefb7faf489ec29ba28dc5e3c28d08b9780
Reviewed-on: https://gerrit.libreoffice.org/43863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26 12:44:44 +02:00
Stephan Bergmann 640eda0fec loplugin:includeform: basegfx
Change-Id: I554ca3b84cc9f02cae88f876332a9fb50dd1c7c7
2017-10-23 22:46:14 +02:00
Armin Le Grand 9743ecb420 RotGrfFlyFrame: Added interactive rotation mode
The FlyFrames containing a graphic now support an
interactive rotation mode. Added a rotation icon to the
Toolbar close to right/left 90degree rotation. When
activated, works as similar to draw object mode as
possible. Shear and move of the rotation center is
deactivated since not supported. It uses as much of the
existing interaction stuff as possible.

Change-Id: Ia1a4e5c064d8576b114c3fcf3a96ccb42c9372bb
2017-10-20 14:13:24 +02:00
Armin Le Grand d9b16effed RotGrfFlyFrame: Adapt Crop functionality to rotated Graphic
The FlyFrame which may contain a Graphic needs working Crop,
interactive and in core. Adapted this to work with now possible
rotation, changed common code in svx which has to handle cases
for Draw/Impress/Calc and Writer differently. Tried to use as
much in common as possible. Additionally furter adaptions
to rotation itself.

Change-Id: Ia961e9490e2627c74220b186116f5aa4fcabca78
2017-10-20 14:13:22 +02:00
Mike Kaganski 40056a599c basegfx: consistently use "" and <> in include directives
Change-Id: I6e4e11532e634fbdb8c6bfd4ce3577fc2746aca8
Reviewed-on: https://gerrit.libreoffice.org/43300
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-10 07:44:13 +02:00
Tor Lillqvist 8e7897588d Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will
hopefully make it possible to remove the annoying initial :: when
referring to the global tools namespace. Unless we have even more
tools subnamespaces somewhere.

Thorsten said it was OK.

Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996
Reviewed-on: https://gerrit.libreoffice.org/42644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-26 14:18:41 +02:00
Mike Kaganski cf48347e7a Fresh run of bin/update_pch.sh
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06
Reviewed-on: https://gerrit.libreoffice.org/42565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 21:01:49 +02:00
Armin Le Grand a9c59cbfb9 borderline: Preparing further to use CellCoordinateSystem
Multiple cleanups, made svx::frame::Style a std::shared_ptr class,
preparing basing all border stuff on transformations, so it will
need a CellCoordinateSystem. Added stuff to get this Coordinate
System from the svx::frame::Cell using the Frame and knowledge
about ownerships

Change-Id: Ic2cb59cc92e648ac2fef72f22f8913479769d3e2
2017-09-15 12:58:03 +02:00
Noel Grandin 84cbd6a543 clang-tidy modernize-use-emplace in b*
Change-Id: I51e0369ba2e1fe0b7c934531f71d3bda95ba09ec
Reviewed-on: https://gerrit.libreoffice.org/42109
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08 20:17:31 +02:00
Michael Stahl 64ced968cc basegfx: remove global ImplB2DPolyPolygon
Change-Id: I6035aaf8aabf71062bb63a4d416c253378fb4756
2017-08-25 21:25:39 +02:00
Michael Stahl 7e911e9cd4 basegfx: remove global ImplB2DPolygon
Change-Id: Ibd97ba1d7cc4e04203142057c47a74034cc4f70f
2017-08-25 21:25:38 +02:00
Michael Stahl 0157f98861 basegfx: remove global 3D IdentityMatrix thread safety hazard
On a tinderbox, CppunitTest_chart2_export crashed in
basegfx::B3DHomMatrix::isEqual(), with other threads in other basegfx
code.

The UnsafeRefCountingPolicy on the global IdentityMatrix is likely the
problem.

Change-Id: Ib142c6f286453d61bd948fb0c184cd68fd313b0f
2017-08-25 21:25:38 +02:00
Jan-Marek Glogowski 87848afb99 loplugin:unnecessaryparen
Change-Id: I4f8b76a9f924a476d04aa745837e732b10348ffa
2017-08-22 10:51:36 +02:00
Noel Grandin 2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Noel Grandin d5f94d9318 loplugin:constparams in basegfx,sax,shell
Change-Id: I90a9d105a6db146ae64cff56983def94b9472a95
Reviewed-on: https://gerrit.libreoffice.org/40043
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17 11:30:43 +02:00
Noel Grandin 4250b25c6a teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:57:24 +02:00
Jochen Nitschke db4741043d C++11 remove std::binary_function bases from functors
std::binary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::binary_function base class was used by deprecated
std::bind2nd, this was solved in individual commits.

The members first_argument_type and second_argument_type were used
in chart2/source/controller/dialogs/DataBrowserModel.cxx:
DataBrowserModel::implColumnLess and are inlined in this commit.

Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a
Reviewed-on: https://gerrit.libreoffice.org/39659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07 08:31:48 +02:00
Stephan Bergmann 806a2609e5 loplugin:casttovoid: basegfx
Change-Id: I5a7723a9b0ce64969a96a3bccb47b380a138b69c
2017-07-02 22:35:46 +02:00
Jochen Nitschke b4f16b8ea4 basegfx: remove trivial copy ctors
Change-Id: If6668552ec56d1b6439ead56fb2d77491a84ea13
Reviewed-on: https://gerrit.libreoffice.org/39295
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-27 13:31:23 +02:00
Jochen Nitschke 16ce815df3 cppcheck: knownConditionTrueFalse
Change-Id: I231113eaf3117e13ed18de906e3787643abe9335
Reviewed-on: https://gerrit.libreoffice.org/38423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06 08:25:21 +02:00
Michael Stahl cf382b6c0e basegfx: remove global IdentityMatrix thread safety hazard
ASAN reports this about JunitTest_chart2_unoapi

==27381==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060005bd218 at pc 0x7ff229755271 bp 0x7fffb52c6c30 sp 0x7fffb52c6c28
READ of size 8 at 0x6060005bd218 thread T0
    #0 0x7ff229755270 in o3tl::UnsafeRefCountingPolicy::decrementCount(unsigned long&) include/o3tl/cow_wrapper.hxx:41:68
    #1 0x7ff2297551bf in o3tl::cow_wrapper<basegfx::Impl2DHomMatrix, o3tl::UnsafeRefCountingPolicy>::release() include/o3tl/cow_wrapper.hxx:203:29
    #2 0x7ff2297515f0 in o3tl::cow_wrapper<basegfx::Impl2DHomMatrix, o3tl::UnsafeRefCountingPolicy>::~cow_wrapper() include/o3tl/cow_wrapper.hxx:248:13
    #3 0x7ff242ef440f in __run_exit_handlers (/lib64/libc.so.6+0x3a40f)
    #4 0x7ff242ef4469 in __GI_exit (/lib64/libc.so.6+0x3a469)

The reason appears to be the UnsafeRefCountingPolicy on the global
IdentityMatrix, so every B2DHomMatrix that is created on any thread
will manipulate the refcount of that global without synchronisation.

Let's just remove the global and hope the extra allocations don't matter.

Change-Id: I4962ab2e622286f29b912a57448f3f1a53eeb592
2017-05-31 16:36:04 +02:00
Noel Grandin 3d8400a8d9 loplugin:comparisonwithconstant in accessibility..basegfx
re-running this plugin on these modules now that sberg has improved
the plugin.

Change-Id: I1818b1fa540cf62b81219a4f3ed2dcae8ff0e838
Reviewed-on: https://gerrit.libreoffice.org/37805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19 12:53:42 +02:00
Noel Grandin 60861faa86 loplugin:comparisonwithconstant in basegfx
Change-Id: I6953640a1aa2e58fe2ea6555291c4f4a5271770f
Reviewed-on: https://gerrit.libreoffice.org/37680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-18 09:17:30 +02:00
Jochen Nitschke 959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Jochen Nitschke c3e0b7dd4e cppcheck: knownConditionTrueFalse
remove bDone and simply 'break' the loop when done.

Change-Id: Idf4170083cbda3a783cb52bba9e94d3be512f167
Reviewed-on: https://gerrit.libreoffice.org/37355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 02:12:04 +02:00
Chris Sherlock 97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock 7c6c4bbcec tdf#43157: convert basegfx from OSL_ASSERT to assert
Change-Id: Ieabb52d9d0aa3b9c81e1642cd64bddea897ed53a
2017-05-07 07:45:59 +10:00
Jochen Nitschke 58ac61478a remove empty namespaces
Change-Id: I3eae0ecc1ffc5500d3c55abc6554822f5432a50a
Reviewed-on: https://gerrit.libreoffice.org/37173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03 09:10:21 +02:00