Commit Graph
158 Commits
Author SHA1 Message Date
Ethan Garcia 4ee8477bdd tdf#143148 use pragma once in comphelper, basegfx, canvas
Change-Id: I45e21da3976cf215fe17c565633928281fdbccb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201314
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-03-10 14:16:53 +01:00
Caolán McNamara 87a553be37 cid#1665198 'Constant' variable guards dead code
dead code now since:

commit e7b460f919
Date:   Sat Aug 30 15:23:11 2025 +0200

    BitmapEx->Bitmap in canvas

    now that Bitmap supports transparency

Change-Id: Ibc296ea82953e571390eea01628adfa71a4f6ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190517
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-02 16:15:37 +02:00
Mike Kaganski f9c16559a8 canvas::tools -> canvastools
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).

Change-Id: I6077f50ad0fcc49abfadc75d9948ab63df829ff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189948
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-20 15:23:07 +02:00
Manish e23e0132d5 tdf#143148 Use #pragma once instead of include guards
Change-Id: I1a7a8b924fcd3f5e909ab42f560efb6f8d87654e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183415
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-03-28 12:00:59 +01:00
Xisco Fauli d991795635 canvas: simplify calcTransformedRectBounds
Change-Id: Ia0314a985ae2183727587ad254faec12ee49b66c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176769
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-19 16:14:13 +01:00
Xisco Fauli b20156432f canvas: simplify calcRectToOriginTransform
Change-Id: I851d9d11c9d3f3c34353913a146ad168a98dc3d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176771
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-11-19 15:48:30 +01:00
Xisco Fauli e289fdedeb canvas: simplify getViewStateTransform/getRenderStateTransform
Change-Id: If9487aff0d80f7ee9d368cd97bc2828a856cc392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176766
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-11-19 15:45:34 +01:00
Gabor Kelemen 722d0c8b9d tdf#43157 Use SAL_WARN instead of OSL_FAIL
Change-Id: I753254e2e6963e78420288d4c4919cb24282ac81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168128
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 12:32:12 +02:00
Noel Grandin f840d3c939 loplugin:ostr in canvas
Change-Id: I6fe0ed24a42394936975e763aba9dc3625a373ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-06 21:31:14 +02:00
Zainab Abbasi 547f3215fc tdf#143148 Use pragma once instead of include guards
use pragma once

Change-Id: I96babd680b494600b0e159ab757208fcecf2049e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165922
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-10 12:40:43 +02:00
Noel Grandin 08f757c32f clang-tidy modernize-pass-by-value in canvas
Change-Id: Ib6e1b6182d83b09dbf5e2aeb9cf3e4ca11d9f48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134712
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-21 21:55:31 +02:00
Noel Grandin a3bc9dc511 loplugin:flatten in filter..include
Change-Id: I74c1ea8b9b490eaa9508a885758224063e39051b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22 07:44:07 +01:00
Philipp Hofer 01baeab998 tdf#123936 Formatting files in module include with clang-format
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2020-11-21 13:19:17 +01:00
Noel Grandin 0178e36bc0 compact namespace: basegfx,canvas
Change-Id: Idc808459b403bcdcccbd86b73dd22b424e507c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98897
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16 18:06:55 +02:00
Noel Grandin 47cd34a60f use more compact namespace syntax in /include
excluding the UDK headers of course

Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-03 09:21:51 +02:00
Noel Grandin a759623c3f loplugin:buriedassign in various
Change-Id: Ib79cbc89f2f89ff48ea8b59bd12373a10b9dcd62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-19 12:41:48 +02:00
Noel Grandin 7435040a18 move some canvas/ headers inside the module
Change-Id: Iaa00cff88ad756b7e084cc68fe744d387328180b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-12 11:57:19 +01:00
Stephan Bergmann 31fffe5538 Remove some redundant user-provided dtors
...which silences various -Wdeprecated-copy-dtor warnings from Clang 10 trunk
about copy functions being implicitly defined as non-deleted even though the
class has a user-declared dtor

Change-Id: I3409d403c3c709de4ad94eccbc2d7869e41847cc
Reviewed-on: https://gerrit.libreoffice.org/85032
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-12 14:35:24 +01:00
Mike Kaganski 63dfd069b3 Mark move ctors/assignments noexcept
This should enable using move semantics where possible e.g. in standard
containers.
According to https://en.cppreference.com/w/cpp/language/move_constructor:

  To make strong exception guarantee possible, user-defined move
  constructors should not throw exceptions. For example, std::vector
  relies on std::move_if_noexcept to choose between move and copy
  when the elements need to be relocated.

Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb
Reviewed-on: https://gerrit.libreoffice.org/77957
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-23 11:48:53 +02:00
Gabor Kelemen b53403c54c tdf#42949 Fix IWYU warnings in include/
Recheck directories in include/ between vcl
and svx in the module hierarchy

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

New IWYU and recent developments in f-u-i helped to identify
some non self contained files, those were fixed too.

Change-Id: Ieab6083ee2aae33baf32d05943b07ad2de6f9d7f
Reviewed-on: https://gerrit.libreoffice.org/75170
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-16 09:15:41 +02:00
Andrea Gelmini f91c5c6a11 Fix typo
Change-Id: I267d321e206936e5b40412e8d2ac76cf24e655be
Reviewed-on: https://gerrit.libreoffice.org/74900
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-30 09:47:19 +02:00
Andrea Gelmini 3b7dce2f1c Fix typo
Change-Id: I01d85bf006ddbf0b04f32c160043aba2d1d7ae4a
Reviewed-on: https://gerrit.libreoffice.org/74899
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-29 19:41:59 +02:00
Andrea Gelmini f448732758 Fix typo
Change-Id: I5f9f109f32621404034e23df431f0630e498240b
Reviewed-on: https://gerrit.libreoffice.org/74878
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-29 16:50:40 +02:00
Andrea Gelmini 6f43faccad Fix typo
Change-Id: I0ed3e793b7a06a250d0d72a3664191258f7c526f
Reviewed-on: https://gerrit.libreoffice.org/74889
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-29 16:50:18 +02:00
Andrea Gelmini 600b79c816 Fix typo
Change-Id: Ie1bf745980db686a45cd0b6fa0524baa65d3e66e
Reviewed-on: https://gerrit.libreoffice.org/74763
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-26 23:29:14 +02:00
Noel Grandin 191f85df58 re-land "new loplugin typedefparam""
This reverts commit c9bb48386b,
and adds a bunch more fixes.

Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a
Reviewed-on: https://gerrit.libreoffice.org/68680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05 12:12:26 +01:00
Noel Grandin c9bb48386b Revert "new loplugin typedefparam"
This reverts commit 9865440d21.

This is not ready to land yet, seems like the latest update
of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04 08:56:11 +02:00
Noel Grandin 9865440d21 new loplugin typedefparam
verify that parameters use the exact same typedef-names (if any)
in definition and declaration

Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77
Reviewed-on: https://gerrit.libreoffice.org/68439
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04 07:32:43 +01:00
Gabor Kelemen 5df31134f1 tdf#42949 Fix IWYU warnings in include/canvas/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I93d516146ba44d83f84cb245e712ef6d14634a18
Reviewed-on: https://gerrit.libreoffice.org/68035
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-25 14:17:32 +01:00
Noel Grandin cfb09a460d remove unused SpriteChangeRecord::ChangeType::none
Change-Id: I66d6a8824df0430a560e4aabed0f829e51399467
Reviewed-on: https://gerrit.libreoffice.org/63904
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-24 07:05:29 +01:00
Noel Grandin e329049900 loplugin singlevalfields improvement
checking for casting to void* turns out to mask useful stuff, so
remove that and just deal with a few extra false+

Change-Id: Id9700d7ceda90ba8fdb38aa870f13a7ca3acb668
Reviewed-on: https://gerrit.libreoffice.org/63145
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-13 12:27:08 +01:00
Mark Hung 17cd7dd708 tdf#43671 set emphasis mark of vcl::Font (windows).
Process extra font properties of the canvas font to
set emphasis mark when creating vcl::Font.

Change-Id: I18ea1aecdde92ed3c777b0db27fcee7976e88476
Reviewed-on: https://gerrit.libreoffice.org/62245
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-11-01 14:27:31 +01:00
Caolán McNamara e5e0cc68f7 pvs-studio: V794 The assignment operator should be protected
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669
Reviewed-on: https://gerrit.libreoffice.org/62166
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22 12:54:08 +02:00
Noel Grandin 96b36edb89 loplugin:useuniqueptr in VCLObject
Change-Id: Ib31e3ea5c4ac59ff526e85b6156a06130ad20311
Reviewed-on: https://gerrit.libreoffice.org/58572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-06 08:49:22 +02:00
Gabor Kelemen bdb0775a26 Add missing sal/log.hxx headers
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 6ff2d84ade 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 filter to jvmfwk

Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5
Reviewed-on: https://gerrit.libreoffice.org/58204
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-30 09:28:40 +02:00
Julien Nabet 1a2097e62f Use for-range loop in include/canvas
Change-Id: I29c4af5a59f72c478090f1b8625a0507d461374a
Reviewed-on: https://gerrit.libreoffice.org/52077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 18:21:55 +02:00
Noel Grandin 1b61d0417b loplugin:unusedmethods
Change-Id: I7c780be3e2740fd9b03c39ebe16935d61caf4f7e
Reviewed-on: https://gerrit.libreoffice.org/51257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-14 13:21:49 +01:00
Stephan Bergmann 5ff52393f9 More loplugin:cstylecast: canvas
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: I1054389bc292544a1ba302509175c8718dbec747
2018-01-12 20:28:43 +01:00
Noel Grandin c54d34f708 loplugin:passstuffbyref improved return in canvas and svtools
and for now, ignore methods with params so we don't fall into the trap
of thinking that calls to methods like:
   Bar& foo(Bar &p) { return p; }
can be converted from
   Bar f() { return foo(Bar()); }
to
Bar const & f() { return foo(Bar()); }

Change-Id: Ia3795eb2baf353cb6bec4ebf40451f2789d66ad7
Reviewed-on: https://gerrit.libreoffice.org/47034
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-26 07:16:07 +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 37a4a25066 loplugin:finalclasses in chart2
Change-Id: I35afa226beb6fe4319313125c323d9f059837357
Reviewed-on: https://gerrit.libreoffice.org/44534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10 07:44:37 +01:00
Julien Nabet 969531f536 Replace lists by vectors (canvas)
Change-Id: I4695b1f1095a6324632f48727274bdfdcc63720b
Reviewed-on: https://gerrit.libreoffice.org/44298
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-04 21:44:43 +01:00
Andrea Gelmini 894115b573 Fix typos
Change-Id: I78653129638b25f16e0816b6fff11e02100c85e7
Reviewed-on: https://gerrit.libreoffice.org/42321
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-09-15 20:33:52 +02:00
Andrea Gelmini daecb11ee2 Removed ignored includes
By brute force analysis, it seems to me that we can easily
remove these not used includes.
It passed "make check install"

Change-Id: I34ea2aae57e56fb8b2cf1066cf51b08068fa0b53
Reviewed-on: https://gerrit.libreoffice.org/41312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-08-19 11:54:25 +02:00
Noel Grandin 3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Noel Grandin 612b489d3e loplugin:checkunusedparams
the "check for taking address of function" part was generating false+

Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f
Reviewed-on: https://gerrit.libreoffice.org/40613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01 11:06:26 +02:00
Stephan Bergmann aa2b7d55c6 loplugin:casttovoid: canvas
Change-Id: I2b719ff5fc03a74ba0f657351343462aaa9c7296
2017-07-02 22:35:16 +02:00
Jochen Nitschke a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Stephan Bergmann 52ef15cbdb Revert "Fix typos"
This reverts commit 26a67002fc.  "Iff" is not a
typo, see 2a65bf32ec "Revert 'Typo: iff->if'".
2017-05-18 21:58:31 +02:00