154 Commits
Author SHA1 Message Date
Dmitriy Usov 2a9e330853 Got rid of the duplicate reference
Got rid of the duplicate reference to the same object in a loop.

Change-Id: Ia2d17137c7cd80a331e6161b21c4786936843f94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202660
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-26 13:32:16 +01:00
Dmitriy Usov 3dbbd1a5a0 tdf#145538 Use range based for loops
Replace index-based loops with range-based for loops in baseprocessor3d.cxx
and zbufferprocessor3d.cxx. This improves code readability and reduces the
risk of off-by-one errors. The change is purely refactoring: behavior and
output remain unchanged.

Change-Id: I5d30babac3a0fa5fdcca214e66481862a165d7c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202301
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-03-25 06:08:15 +01:00
Gabor Kelemen eb087d25b3 tdf#146619 Use more forward declarations in include/drawinglayer
Change-Id: I5911dfb1cfc2bfd291758334b69123cfbce559a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199387
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-22 12:08:33 +01:00
Xisco Fauli 2ea359044c drawinglayer: GeoTexSvxBitmapEx*-> GeoTexSvxBitmap*
After
commit 805ef97f52
Author: Noel Grandin <noelgrandin@gmail.com>
Date:   Tue Aug 12 22:19:45 2025 +0200

    BitmapEx->Bitmap in GeoTexSvx

Change-Id: Ic393ff4de51be0eb8c5859605135695f8f92f472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197587
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-01-20 08:51:25 +01:00
Noel Grandin 98a41e2c7b loplugin:unnecessaryvirtual
Change-Id: Ifdd8b4c156d9d4a14e76b51c22cf915ef0b0237e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-29 14:14:41 +02:00
Noel Grandin 6d0e5ddede remove BitmapEx
all use-sites have been converted to Bitmap

Change-Id: I1a8842217a266eef100bd387ab013b004e532256
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190618
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-05 19:45:45 +02:00
Noel Grandin 15abc0aa75 BitmapEx->Bitmap in drawinglayer
now that Bitmap supports transparency

Change-Id: I37d358db5b68cd500349f1084eb3a65cfd83aa4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189898
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-20 08:59:03 +02:00
Noel Grandin 805ef97f52 BitmapEx->Bitmap in GeoTexSvx
now that Bitmap supports transparency

Change-Id: Icb6dad0921079144e3c6b76014f129e205a0f27c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189455
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-13 14:30:28 +02:00
Armin Le Grand (collabora) a841f2fd0d Added DrawModeFlags to ViewInformation2D
This allows setting/using DrawModeFlags system-independent
(or: renderer-independent). Changing and applying to a
PrmitiveRenderer will apply that (if needed) to the target
renderer.

Change-Id: Id95d018f95d1b2ff065da5e4d05ba385b22cdbb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188704
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2025-08-01 16:13:53 +02:00
Bogdan Buzea d8e7a3b245 tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I8ef1df248d3ed9fbc804e53897ca934cce9683e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176779
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-12-02 08:39:08 +01:00
Noel Grandin bc7a5d01a0 clang-tidy: performance-unnecessary-copy-initialization in drawinglayer
Change-Id: I7ed82c26a5c9d5e7803776e96b19bd8f4d98259e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176393
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 15:47:26 +01:00
Caolán McNamara c93eb54c87 cid#1557618 COPY_INSTEAD_OF_MOVE
and

cid#1557535 COPY_INSTEAD_OF_MOVE
cid#1557520 COPY_INSTEAD_OF_MOVE
cid#1557513 COPY_INSTEAD_OF_MOVE
cid#1557503 COPY_INSTEAD_OF_MOVE
cid#1557487 COPY_INSTEAD_OF_MOVE
cid#1557483 COPY_INSTEAD_OF_MOVE
cid#1557479 COPY_INSTEAD_OF_MOVE
cid#1557474 COPY_INSTEAD_OF_MOVE
cid#1557461 COPY_INSTEAD_OF_MOVE
cid#1557446 COPY_INSTEAD_OF_MOVE
cid#1557445 COPY_INSTEAD_OF_MOVE
cid#1557441 COPY_INSTEAD_OF_MOVE
cid#1557435 COPY_INSTEAD_OF_MOVE
cid#1557433 COPY_INSTEAD_OF_MOVE
cid#1557429 COPY_INSTEAD_OF_MOVE
cid#1557375 COPY_INSTEAD_OF_MOVE
cid#1557372 COPY_INSTEAD_OF_MOVE
cid#1557356 COPY_INSTEAD_OF_MOVE
cid#1557350 COPY_INSTEAD_OF_MOVE
cid#1557344 COPY_INSTEAD_OF_MOVE
cid#1557339 COPY_INSTEAD_OF_MOVE
cid#1557332 COPY_INSTEAD_OF_MOVE
cid#1557330 COPY_INSTEAD_OF_MOVE
cid#1557328 COPY_INSTEAD_OF_MOVE
cid#1557323 COPY_INSTEAD_OF_MOVE
cid#1557315 COPY_INSTEAD_OF_MOVE
cid#1557313 COPY_INSTEAD_OF_MOVE
cid#1557304 COPY_INSTEAD_OF_MOVE
cid#1557297 COPY_INSTEAD_OF_MOVE
cid#1557291 COPY_INSTEAD_OF_MOVE
cid#1557290 COPY_INSTEAD_OF_MOVE
cid#1557271 COPY_INSTEAD_OF_MOVE
cid#1557266 COPY_INSTEAD_OF_MOVE
cid#1557262 COPY_INSTEAD_OF_MOVE
cid#1557259 COPY_INSTEAD_OF_MOVE
cid#1557246 COPY_INSTEAD_OF_MOVE
cid#1557242 COPY_INSTEAD_OF_MOVE
cid#1557241 COPY_INSTEAD_OF_MOVE
cid#1557236 COPY_INSTEAD_OF_MOVE
cid#1557228 COPY_INSTEAD_OF_MOVE
cid#1557225 COPY_INSTEAD_OF_MOVE
cid#1557221 COPY_INSTEAD_OF_MOVE
cid#1557217 COPY_INSTEAD_OF_MOVE
cid#1557213 COPY_INSTEAD_OF_MOVE
cid#1557211 COPY_INSTEAD_OF_MOVE
cid#1557209 COPY_INSTEAD_OF_MOVE
cid#1557205 COPY_INSTEAD_OF_MOVE
cid#1557204 COPY_INSTEAD_OF_MOVE
cid#1557193 COPY_INSTEAD_OF_MOVE
cid#1556082 COPY_INSTEAD_OF_MOVE

Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16 09:30:37 +02:00
Caolán McNamara ac0514fb3d cid#1555415 COPY_INSTEAD_OF_MOVE
and

cid#1555430 COPY_INSTEAD_OF_MOVE
cid#1555497 COPY_INSTEAD_OF_MOVE
cid#1555542 COPY_INSTEAD_OF_MOVE
cid#1555543 COPY_INSTEAD_OF_MOVE
cid#1555564 COPY_INSTEAD_OF_MOVE
cid#1555593 COPY_INSTEAD_OF_MOVE
cid#1555602 COPY_INSTEAD_OF_MOVE
cid#1555610 COPY_INSTEAD_OF_MOVE
cid#1555667 COPY_INSTEAD_OF_MOVE
cid#1555693 COPY_INSTEAD_OF_MOVE
cid#1555719 COPY_INSTEAD_OF_MOVE
cid#1555757 COPY_INSTEAD_OF_MOVE
cid#1555795 COPY_INSTEAD_OF_MOVE
cid#1555826 COPY_INSTEAD_OF_MOVE
cid#1555847 COPY_INSTEAD_OF_MOVE
cid#1555851 COPY_INSTEAD_OF_MOVE
cid#1555863 COPY_INSTEAD_OF_MOVE
cid#1555865 COPY_INSTEAD_OF_MOVE
cid#1555867 COPY_INSTEAD_OF_MOVE
cid#1555869 COPY_INSTEAD_OF_MOVE
cid#1555879 COPY_INSTEAD_OF_MOVE
cid#1555890 COPY_INSTEAD_OF_MOVE
cid#1555893 COPY_INSTEAD_OF_MOVE
cid#1555900 COPY_INSTEAD_OF_MOVE
cid#1555922 COPY_INSTEAD_OF_MOVE
cid#1555925 COPY_INSTEAD_OF_MOVE

Change-Id: I5d362a09e80eecd282e63c745bfe26eac2631a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171492
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-06 09:13:52 +02:00
Mike Kaganski 8bd57009d3 Fix wrong / misleading uses of fTools::(more|less|equal) with literal 0
These will never compare with tolerance (the zero is a special case
in rtl_math_approxEqual used internally), so the calls like those
don't do what they appear to do in these cases.

Change-Id: I495ac92b7f45637e118e4fdc04bb6fad6fff31ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171391
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-02 11:31:00 +02:00
Gabor Kelemen 8cda679913 tdf#146619 Drop unused 'using namespace com::sun::star'
now that find-unused-includes was expanded with detecting these

Change-Id: I9f21ad1a85c1e3178cad98464b2ba407d909b62d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167638
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-05-16 08:35:34 +02:00
Caolán McNamara ead19f4c62 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ic2231df89b900c17beac4627e3573b45aef0bc26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166954
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-01 13:25:04 +02:00
Caolán McNamara 212bbbe5ca cid#1546141 COPY_INSTEAD_OF_MOVE
and

cid#1546004 COPY_INSTEAD_OF_MOVE
cid#1545934 COPY_INSTEAD_OF_MOVE
cid#1545563 COPY_INSTEAD_OF_MOVE
cid#1545533 COPY_INSTEAD_OF_MOVE
cid#1545529 COPY_INSTEAD_OF_MOVE
cid#1545502 COPY_INSTEAD_OF_MOVE
cid#1545499 COPY_INSTEAD_OF_MOVE
cid#1545479 COPY_INSTEAD_OF_MOVE
cid#1545344 COPY_INSTEAD_OF_MOVE
cid#1545324 COPY_INSTEAD_OF_MOVE
cid#1545313 COPY_INSTEAD_OF_MOVE
cid#1545252 COPY_INSTEAD_OF_MOVE
cid#1545186 COPY_INSTEAD_OF_MOVE

Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-10 13:44:58 +01:00
Caolán McNamara 6342aa6c66 cid#1545370 COPY_INSTEAD_OF_MOVE
and

cid#1545364 COPY_INSTEAD_OF_MOVE
cid#1545363 COPY_INSTEAD_OF_MOVE
cid#1545344 COPY_INSTEAD_OF_MOVE
cid#1545299 COPY_INSTEAD_OF_MOVE
cid#1545287 COPY_INSTEAD_OF_MOVE
cid#1545267 COPY_INSTEAD_OF_MOVE
cid#1545256 COPY_INSTEAD_OF_MOVE
cid#1545226 COPY_INSTEAD_OF_MOVE
cid#1545500 COPY_INSTEAD_OF_MOVE
cid#1545538 COPY_INSTEAD_OF_MOVE
cid#1545618 COPY_INSTEAD_OF_MOVE
cid#1545681 COPY_INSTEAD_OF_MOVE
cid#1545750 COPY_INSTEAD_OF_MOVE
cid#1545778 COPY_INSTEAD_OF_MOVE
cid#1545785 COPY_INSTEAD_OF_MOVE
cid#1545799 COPY_INSTEAD_OF_MOVE
cid#1545847 COPY_INSTEAD_OF_MOVE
cid#1545958 COPY_INSTEAD_OF_MOVE
cid#1545963 COPY_INSTEAD_OF_MOVE
cid#1545990 COPY_INSTEAD_OF_MOVE
cid#1546013 COPY_INSTEAD_OF_MOVE
cid#1546029 COPY_INSTEAD_OF_MOVE
cid#1546079 COPY_INSTEAD_OF_MOVE
cid#1546104 COPY_INSTEAD_OF_MOVE
cid#1546127 COPY_INSTEAD_OF_MOVE
cid#1546133 COPY_INSTEAD_OF_MOVE
cid#1546155 COPY_INSTEAD_OF_MOVE
cid#1546190 COPY_INSTEAD_OF_MOVE
cid#1546216 COPY_INSTEAD_OF_MOVE
cid#1546273 COPY_INSTEAD_OF_MOVE
cid#1546315 COPY_INSTEAD_OF_MOVE
cid#1546326 COPY_INSTEAD_OF_MOVE
cid#1546387 COPY_INSTEAD_OF_MOVE

accept some reasonable suggestions

Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-08 13:09:02 +01:00
Armin Le Grand (allotropia) 438f0752de MCGR: consolidations/cleanups for changes so far
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-05-15 15:19:53 +02:00
Armin Le Grand (allotropia) dccd82b5ac MCGR: Reduce diverse GradientStyle enums to single UNO API one
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-21 15:03:14 +02:00
Armin Le Grand (allotropia) 01d0019c85 MCGR: Model data changes for ColorSteps
Added tooling replaceStart/EndColor to allow simple
transition for code that does not immediately adapt
to multi color gradients. Also added
createColorStepsFromStartEndColor for the same
purpose.

Adapted XGradient to no longer have Start/EndColor
at all, but only use ColorSteps.

Adapted all usages of XGradient to no longer use
Get/Set/Start/EndColor, but access the ColorSteps
instead.

Replaced quite some XGradient constructors that
used XGradient() as Start/EndColor since this is
already the default.

Adapted ColorBlending to black AKA Start/EndIntens
in XGradient to work now on all ColorSteps in the
required linearly-scaled manner.

UNO API changes:

Added com::sun::star::awt::ColorStep as basic data
element that holds a pair of Offset and Color.

Added com::sun::star::awt::ColorStepSequence to
handle an array of sorted entries.

Added com::sun::star::awt::Gradient2 derived from
com::sun::star::awt::Gradient, extended by the
needed com::sun::star::awt::ColorStepSequence.

Added MID_GRADIENT_COLORSTEPSEQUENCE to UNO API
to provide access to ColorSteps directly.

Adapted XFillGradientItem::QueryValue/PutValue to
make use of new UNO API data structures. To do so,
added tooling methods for data transition:
    - fillColorStepSequenceFromColorSteps
    - fillGradient2FromXGradient
    - fillColorStepsFromAny
    - fillXGradientFromAny
and adapted
    - case '0' (all data)
    - MID_FILLGRADIENT
    - MID_GRADIENT_COLORSTEPSEQUENCE
    - MID_GRADIENT_START/ENDCOLOR
to make use of these.

Tested usage of these in the office.

Renamed from GradientStep to GradientStop after
discussions with members on the list to make this
closer related to other norms/definitions.

Also renamed classes and class members to better
reflect to GradientStop, so grepping/finding will
be easier (e.g. 'Color' just exists pretty often,
but 'StopColor' is more precise).

Changed the used UNO API class for reprsenting the
Color to better reflect to ranges [0.0 .. 1.0] and
usage of RGB.

Change-Id: I1eeb3e97e81d6785967615d1ff256551fc3b882d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148849
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-19 17:38:38 +00:00
Noel Grandin ac8963b688 osl::Mutex->std::mutex in BasePrimitive3D
Change-Id: I49e196885845f352c6c4cda6e3890b749d4eb0fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-19 18:33:52 +00:00
Armin Le Grand (allotropia) ea1d3d11ca MCGR: Add GradientSteps to GeoTexSvxGradient
Move GradientSteps data to GeoTexSvxGradient and adapt
interfaces. Also move tooling to more isolated place
in gradienttools in basegfx.

Keep everything still compatible, the work will be now
to adapt all six different derivations of
GeoTexSvxGradient to make use of the evtl. given
GradientSteps.

Change-Id: Iaa212763c603d46de0a94b1b203b979bb7ce359d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147050
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-15 14:46:11 +00:00
Armin Le Grand (allotropia) 43de98fb59 MCGR: Add/Provide GradientSteps to FillGradientAttribute
MCGR stands for MultiColorGRadient. This change allows/
prepares adding multiple color steps to gradient rendering.

This is preparation work to allow rendering MCGRs in the
future. All places are adapted in a way that currently
no change of behaviour will happen. It will be the base
to get MCGR rendering/decompose for Primitives and our
internal/existing gradients working.

Change-Id: I28bbd7d10b8670042343ada2a66b5909d3d31bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146748
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-12 10:54:06 +00:00
Noel Grandin a447b5b6d1 loplugin:moveit
Change-Id: Ic593974a44d9e327e0385c7ffaaa6d42576ae01a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135911
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-16 09:16:01 +02:00
Noel Grandin dcb36da295 clang-tidy modernize-pass-by-value in drawinglayer
Change-Id: I8a3245c6a4d687edbc95cf28b2932d80c86a7b65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-15 09:24:47 +02:00
Stephan Bergmann 5060c50158 Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here

Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24 16:50:03 +02:00
Gabor Kelemen bc3a0205e2 Recheck modules d* with IWYU
See tdf#42949 for motivation

Change-Id: I916f42c46efa1b6cfd7744a189b79659b2867431
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128196
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-14 12:32:21 +01:00
Noel Grandin e3bd776e02 Split BasePrimitive2D UNO interface into separate object
Rather than make all the BasePrimitive2D classes bear the cost of being an UNO
object, we just wrap the top level BasePrimitive2D in this class when we need
to pass them over UNO.

This reduces the locking overhead when doing normal drawinglayer operations,
and reduces the size of drawinglayer objects and the cost of initialising
them, which shaves 5% off the load/display time of a large barchart.

Add new drawinglayer::convertPrimitive2DContainerToBitmapEx utility
method to avoid needing to convert to Sequence<XPrimitive2D>

Change-Id: I553eaa4c16ba016b098cb21f6c55f5008f0d9b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126487
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-23 11:45:33 +01:00
Gabor Kelemen 6170522364 Remove transitional header drawinglayer/primitive2d/polygonprimitive2d.hxx
follow up to commit 1103727fb2

Change-Id: I227042f4703f3f4c18a8dc0355f044d2ad7dfb2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126838
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-16 08:58:04 +01:00
Noel Grandin 8104d771b1 tdf#144052 reduce Primitive2D copying
when creating charts, by using a
    Primitive2DContainer&&
parameter in the GroupPrimitive2D constructor, which forces the call
sites to pass a temporary, and at most call sites, we can std::move in
an existing local variable.

Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09 15:22:52 +02:00
Noel Grandin 21dbf18064 clang-tidy:readability-redundant-member-init
Change-Id: I95918275653714577e2d6728dd3947c7fbb66d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31 14:30:43 +02:00
Noel Grandin fa01f5a1fe tdf#105575 Slow rendering when using a Logo command
Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary

<quikee[m]> noelgrandin: nobody is using XPrimtive that is not
derived from BasePrimitive2D in an extension ... mainly as it is
not even possible

Change-Id: I68224021f0fbc35fe2a973198ba78d2b41ea172d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 12:49:00 +02:00
Noel Grandin 28993c0a8d use officecfg for drawing options
Change-Id: Idba40d9816f29c0e4bc4a468b8c0a2cbb74d09d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119481
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25 20:05:10 +02:00
Noel Grandin 039c7999d4 no need to allocate this separately
Change-Id: I78260d3e6ad8ce96db4353fede18d5e3a6808402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116400
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-30 20:18:52 +02:00
Noel 21d76782b3 loplugin:refcounting in drawinglayer
Change-Id: Ia7bf3a4811a47180ce2a92852a01b613ff16279a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111288
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22 08:08:27 +01:00
Noel 9cc41b9ad5 opacity->alpha in BPixel
They are basically the same thing, but alpha is the preferred term
these days.

Also improve the mixing algorithm,
  1 - opacity
is
  255 - opacity
not
  256 - opacity
since the range of sal_uInt8 is 0..255

Change-Id: I8788ac79285ab25c8d322b05817dffd3745fd699
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08 17:20:23 +01:00
Noel bf4bbc3c21 replace std::max(std::min()) with std::clamp
Change-Id: I890d19f5e2177294dc1175c90c98b964347f9e85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105751
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16 07:53:49 +01:00
A_GAN b90d0a9dc8 Update ShadowPrimitive2D to support shadow blur
Add attribute for the blur radius and get function.
give more range for the shadow depends on the size of the blur radius.
update the blur radius to be imported in Hmm and the test function.

Change-Id: I32faaf02884d9a6b2f11a9033178b3b6bb419580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95388
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-04 18:43:51 +02:00
Noel Grandin 9b25614939 loplugin:simplifybool in dbaccess..framework
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29 14:44:37 +02:00
Stephan Bergmann fe6cce01c8 Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr
...where the get member function is defined on a std::__shared_ptr base class,
so loplugin:simplifypointertobool used to miss those until now.  (While e.g.
using libc++ on macOS found those cases.)

366d08f2f6 "new loplugin:simplifypointertobool"
was mistaken in breaking isSmartPointerType(const clang::Type* t) out of
isSmartPointerType(const Expr* e); c874294ad9 "Fix
detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had
introduced that indivisible two-step algorithm on purpose.

The amount of additional hits (on Linux) apparently asked for turning
loplugin:simplifypointertobool into a rewriting plugin.  Which in turn showed
that the naive adivce to just "drop the get()" is not sufficient in places that
are not contextually converted to bool, as those places need to be wrapped in a
bool(...) functional cast now.  If the expression was already wrapped in
parentheses, those could be reused as part of the functional cast, but
implementing that showed that such cases are not yet found at all by the
existing loplugin:simplifypointertobool.  Lets leave that TODO for another
commit.

Besides the changes to compilerplugins/ itself, this change has been generated
fully automatically with the rewriting plugin on Linux.

Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2020-05-26 22:33:02 +02:00
Noel Grandin 2ee60f02c4 loplugin:flatten in drawinglayer
Change-Id: Ieb5f682ec627c8d8ddfc286ec0e4422104b4d847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92494
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-19 12:23:46 +02:00
Noel Grandin f569507f3f Revert "[API CHANGE] remove some primitives rendering settings"
This reverts commit c71656f51a.

Reason for revert: I give up

Change-Id: I2a09c36c1f0d731f4d3f7d809364de7efa8d8a58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92426
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17 13:07:42 +02:00
Noel Grandin c71656f51a [API CHANGE] remove some primitives rendering settings
Remove the following settings:
  QuadraticFormControlRenderLimit
  Quadratic3DRenderLimit
  RenderSimpleTextDirect
  RenderDecoratedTextDirect
  SnapHorVerLinesToDiscrete

which have no way to be set from the user interface.

Change-Id: Ie96531425f5ba6021ade4f247b18b99092fd7e5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-16 14:06:33 +02:00
Tomaž Vajngerl ab5ef15366 split up polypolygonprimitive2d.hxx into separate files
This patch splits the polypolygonprimitive2d.hxx into:
- PolyPolygonColorPrimitive2D.hxx
- PolyPolygonGradientPrimitive2D.hxx
- PolyPolygonGraphicPrimitive2D.hxx
- PolyPolygonHairlinePrimitive2D.hxx
- PolyPolygonHatchPrimitive2D.hxx
- PolyPolygonMarkerPrimitive2D.hxx
- PolyPolygonSelectionPrimitive2D.hxx
- PolyPolygonStrokePrimitive2D.hxx
... and fixes the include files and pre-compiled headers

Change-Id: I23982e0c81e8992f69e14cbac8e86858266b9999
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91603
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-03 17:31:55 +02:00
Noel Grandin ad38105f45 move headers inside modules
Change-Id: Iad5c414861eb807e6246b8a988b94d66ef5f687d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90776
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-21 10:30:07 +01:00
Noel Grandin 6b4fe3e44b loplugin:makeshared in drawinglayer..fpicker
Change-Id: Ib20fec3a7b6bfe2f94c6f5f2f9fa0be6f7c21e97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87320
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24 09:04:45 +01:00
Noel Grandin aee42a7bf1 clang-tidy modernize-concat-nested-namespace in drawinglayer
Change-Id: If2644743ab0d9b78d42d1d2fe6fa22c83472d2c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20 13:47:45 +01:00
Gabor Kelemen a2fbc48afd tdf#42949 Fix IWYU warnings in drawinglayer/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I0968cfd6a94c20e6b0d324f068ca658d7d5c0296
Reviewed-on: https://gerrit.libreoffice.org/83294
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-22 10:42:17 +01:00
Noel Grandin 5c23459245 new loplugin constvars
detect static variables that can be made const.

Thanks to mike kaganski for suggesting this.

Here I introduce a new plugin feature - using markers
in nearby comments to disable the plugin for specific
vars.

Some of this stuff was old debugging code. I removed the stuff
that was older than 5 years.

Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c
Reviewed-on: https://gerrit.libreoffice.org/68807
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-08 07:20:29 +01:00