Commit Graph
416 Commits
Author SHA1 Message Date
Andrea Gelmini 9c704826bb Fix typos
Change-Id: Ief7455c1b1955c292022f6a6e3b8c601a34bd8a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210442
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-03 08:53:27 +02:00
Andrea Gelmini eab8f10281 Fix typos
Change-Id: I79b522964693138d147a18fc5ac089617493ca69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209898
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:45:31 +02:00
Andrea Gelmini 0dcee64773 Fix typo in code.
Make getSystemDependantDataInternal (with "a") in
getSystemDependentDataInternal (with "e") to have it
coherent with addOrReplaceSystemDependentDataInternal and the class
addOrReplaceSystemDependentDataInternal

Change-Id: Id56d54c0981752f09387d43a3eb33fab81ccd5c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209484
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-23 10:20:08 +02:00
Andrea Gelmini d4b6258652 Fix typos
Change-Id: Iaf47a7c5698d8d846046b8078c4b55157df61082
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209477
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:11:30 +02:00
Andrea Gelmini 4f86cfa577 Fix typos
Change-Id: Ic09e8f2877a7106eb074586662d1733828d85197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209422
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-08-21 14:19:46 +02:00
Regina Henschel 28341a6927 Adds color interpolation in the HSL color model
The patch adds a color interpolation in the HSL color model to the
BColor tools and extends the 'Duplicate' dialog to include these new
color interpolations.

This patch also solves bug tdf#173142.

Change-Id: Ie7f15d65f20b6a8d116c2ac03a57540e6be25ae1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209366
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2026-08-21 14:06:08 +02:00
Armin Le Grand (collabora) 52ec9f11d8 CairoSDPR: Improve buffering of huge BitmapData
We already did some improvements, but I wanted to clean
this up somewhat. Reason for the needed corrections was
in principle the sqrt()-based general calculation of
the HoldTime in the default implementation of
calculateCombinedHoldCyclesInSeconds. The original idea
was to hold huge data shorter due to memory constraints.
To solve that we added an adapted version to
CairoPixelProcessor2D.

With lessons learned I decided to remove that and
provide a revised general implementation based on linear
scaling of the HoldTime. Based on assuming the seen
huge Bitmap and estimating 20min for it, just create a
factor and multiply with SizeInBytes.

I checked that and it works as intended. It will spare
us from this problem re-occurring with future SDPRs.

NOTE: This still keeps the CairoSDPR-specific avoiding
of buffering of small Bitmaps when these are available
from Bitmap directly. This stays useful and is
Cairo-specific.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I30c7361c6fbfaf0be90be353091cbaf831db5cd2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2005
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit a3d3ae5e931a04ff5718382ccffe9f16de336a42)
(cherry picked from commit 7550c6ea0bb82f7574e4b974f8d24bd1662a878b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205991
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-05 08:43:16 +02:00
Armin Le Grand (collabora) 66a0927a68 CairoSDPR: Force keeping CairoSurfaceHelper for huge PixelData
If we have a really 'big' pixel-based graphic the cost for creating
the mip-map entries is high. If that is the case, force keeping this
entry alive and not getting flushed by using a large number of
seconds. In that case the local MipMap is more important than the
memory kept allocated for fast repaints.

To detect 'big' graphics, compare to an assumed ScreenSize (may also
be fetched from real screen if needed). To react, create a buffer
residing time of one hour (increase if needed).

NOTE: This will increase MemoryFootPrint if isCairoCompatible
is false by holding the local cairo_surface_t in CairoSurfaceHelper
longer than before.

Change-Id: I1cf726f00d459bc0cb19bb1d202e64e010061426
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1134
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 2e1b0a51a745e615ed7e2f22666cc4aa4e005451)
(cherry picked from commit c2c58c177ae822906fe2c558546851643fe54247)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205988
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-05 08:42:55 +02:00
Xisco Fauli fb28678005 loplugin:unusedmethods
Change-Id: If3dae53e3cf16df2d0c505a898138dfa6fe6c0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 09:32:38 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Noel Grandin a7a44cb89a cool#15052 reduce time spent calculating selection outline
when it gets complex the solvePolygonOperationOr() algorithm
becomes rather expensive. But we can do much better in this
case since we know we only have rectangles.

Change-Id: I2fdfce7925e843e25f11890dac2c96ce21f3be67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202261
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-22 14:08:45 +01:00
Michael Weghorn c5a36fea6c Don't mark enum classes {SVXCORE,BASEGFX}_DLLPUBLIC
Fixes warnings like this one seen in a clang-cl (21.1.8)
build on Windows:

    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\basegfx/utils/systemdependentdata.hxx(45,16): warning: 'dllimport' attribute only applies to functions, variables, classes, and Objective-C
          interfaces [-Wignored-attributes]
       45 |     enum class BASEGFX_DLLPUBLIC SDD_Type : sal_uInt16 {
          |                ^
    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\basegfx/basegfxdllapi.h(33,27):: note: expanded from macro 'BASEGFX_DLLPUBLIC'
       33 | #define BASEGFX_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
          |                           ^
    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\sal/types.h(210,47): note: expanded from macro 'SAL_DLLPUBLIC_IMPORT'
      210 | #   define SAL_DLLPUBLIC_IMPORT    __declspec(dllimport)
          |                                               ^

and

    In file included from C:/Users/mwegh/development/git/libreoffice-WORKTREE/oox/source/drawingml/diagram/datamodelcontext.cxx:20:
    In file included from C:/Users/mwegh/development/git/libreoffice-WORKTREE/oox/source/drawingml/diagram\datamodelcontext.hxx:24:
    In file included from C:/Users/mwegh/development/git/libreoffice-WORKTREE/oox/source/drawingml/diagram\datamodel_oox.hxx:29:
    In file included from C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\svx/diagram/datamodel_svx.hxx:30:
    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\svx/diagram/DomMapFlag.hxx(28,12): warning: 'dllimport' attribute only applies to functions, variables, classes, and Objective-C interfaces
          [-Wignored-attributes]
       28 | enum class SVXCORE_DLLPUBLIC DomMapFlag : sal_uInt16
          |            ^
    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\svx/svxdllapi.h(35,27): note: expanded from macro 'SVXCORE_DLLPUBLIC'
       35 | #define SVXCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
          |                           ^
    C:/Users/mwegh/development/git/libreoffice-WORKTREE/include\sal/types.h(210,47): note: expanded from macro 'SAL_DLLPUBLIC_IMPORT'
      210 | #   define SAL_DLLPUB[build CXX] oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
    LIC_IMPORT    __declspec(dllimport)
          |

Change-Id: Id472eea3ccb9270e87cfce4e5e6761c566fdbdc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202144
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-19 17:39:52 +01:00
Noel Grandin 6993d54041 std::lround is unnecessary here
because we are then casting to a type <=32 bits

Change-Id: Ief4a93724ccbae8d697edbd40e4085389d74473f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202156
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-19 15:27:43 +01:00
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
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Tomaž Vajngerl d37666e14f basegfx: don't allow in-place changing of BColorStops externally
All the changes should go through BColorStops interface and not
directly.

Change-Id: I4c6dd42f8d6b6c43cdcf9d53557ccb12f8d0507c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195386
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-12-15 04:07:44 +01:00
Tomaž Vajngerl 959decdcda basegfx: BColorStops shouldn't derive from std::vector
Change-Id: I9f246c0d9a5ddc7f8cf428bf7fc8c8957e8584b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158710
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-12-08 13:40:28 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
Caolán McNamara 8d6dc45416 cid#1659813 Division or modulo by float zero
in unused code, so lets just remove it

Change-Id: I95b3441dd9ae2efcc5fe3d93c37f3062c1bc8edb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193008
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-27 11:00:32 +01:00
Noel Grandin 40e5bc6e68 lets have just one getB2DRange function/method
Change-Id: I5081abca177c6fb8bd21d971d93dc115d57de294
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192589
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-10-19 12:13:53 +02:00
Gabor Kelemen 851fb75779 tdf#146619 Run IWYU again on include/[a-c]*
Change-Id: I301b0d5585aa488e26ac5c3c2312043cd316671c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191910
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-10-08 17:16:34 +02:00
Jussi Suominen 8bad569f5d tdf#143148: Use pragma once instead of include guards
Replace include guard with pragma once in include/basegfx/DrawCommands.hxx

Change-Id: I3f449a695dbd4973bef874e583f6016710804ccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191584
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-09-29 13:59:23 +02:00
Noel Grandin 7a1e4bcdbd remove now unused parts of BitmapEx
Change-Id: Ic644e8c4e2dc4e14583e7c633af3dc9b0fe7bce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190623
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-06 09:19:14 +02:00
Mike Kaganski f514561e42 Fix a typo in comment
Change-Id: I55abfb56fa3bbef567562a2e070f9ac41e7747dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189957
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-08-20 15:23:41 +02:00
Caolán McNamara dc584b4dd8 always pass fCandidateLength in at the boundary
Change-Id: Idcddf4e576bb74f241c532fbf66b8772f3cd1c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189932
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-20 09:25:44 +02:00
Caolán McNamara f2eda851f7 cid#1660547 avoid Division or modulo by float zero warning
and

cid#1659880 Division or modulo by float zero

drop the default arguments, they are always explicitly set
except for one single case.

Change-Id: I1fce4e7f6ff5c9421c40628e0b6a1e291650e51c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189862
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-18 16:30:36 +02:00
Caolán McNamara d02fde021c cid#1659748 Variable copied when it could be moved
and

cid#1659754 Variable copied when it could be moved
cid#1659755 Variable copied when it could be moved
cid#1659756 Variable copied when it could be moved
cid#1659766 Variable copied when it could be moved
cid#1659767 Variable copied when it could be moved
cid#1659769 Variable copied when it could be moved
cid#1659770 Variable copied when it could be moved
cid#1659777 Variable copied when it could be moved
cid#1659787 Variable copied when it could be moved
cid#1659790 Variable copied when it could be moved
cid#1659793 Variable copied when it could be moved
cid#1659802 Variable copied when it could be moved
cid#1659818 Variable copied when it could be moved
cid#1659822 Variable copied when it could be moved
cid#1659824 Variable copied when it could be moved
cid#1659825 Variable copied when it could be moved
cid#1659826 Variable copied when it could be moved
cid#1659842 Variable copied when it could be moved
cid#1659849 Variable copied when it could be moved
cid#1659850 Variable copied when it could be moved

Change-Id: I70729aaf6e229518a9a50ac18311286ab5b05b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189348
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-11 13:16:28 +02:00
Noel Grandin bacd1b5dc4 BitmapEx->Bitmap in FillGraphicPrimitive2D
now that Bitmap supports transparency

Change-Id: I9762dadae840e8eaec37526f82068183474c7962
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189069
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-07 22:04:36 +02:00
Caolán McNamara e102e77cdf cid#1659622 silence Division or modulo by float zero
and

cid#1659712 Division or modulo by float zero

Change-Id: Ib13a4f2c5cabad62db2099a83fb8fdeae38d6f99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188889
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-04 12:36:56 +02:00
Caolán McNamara a87e99e1b1 cid#1659963 Division or modulo by float zero
Change-Id: I9172cd18e82faada2b603543488e0b0e882da18a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188818
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-02 16:05:57 +02:00
Caolán McNamara eab3f93502 cid#1659720 silence Division or modulo by float zero
Change-Id: If7fde07f27275f4f2d7ce7b4171f91e3df36c4ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188607
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-31 14:02:39 +02:00
Noel Grandin c03d752c61 improve fast_pow in BColorModifier_gamma
And add tests to demonstrate accuracy.

This is taken from
   https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
and results in a maximum error of 3% over our input range.

Change-Id: I1568dabb552d52a3eff085fd327ed3c1c246edcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184623
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-25 17:47:09 +02:00
Noel Grandin 437303ab97 add translate functions for B2D*Polygon
Change-Id: I1f9091c47f0145d6fa0a8bc2deb4864244aad896
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183309
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-26 15:06:24 +01:00
Noel Grandin 4503abd1a6 tdf#141415 speed up a perf hotspot in SalLayout
a translation is just 2 additions, no need to do expensive matrix math

Change-Id: I76949e6168acc8c50ade358fdccb61575b59a5e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183220
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-22 14:33:17 +01:00
Noel Grandin 427c83177e loplugin:constparams
Change-Id: Icf4efa7757d6b3f6ed6066cd07b8fdf4101aae5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183138
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-20 06:57:45 +01:00
Stephan Bergmann e1e6f5c7d0 Remove workaround for old Android NDK
...which had been added with 41ab6a5dfa "struct SN
needs a strict weak ordering operator <" and should no longer be necessary
since2b68bf57789714bf79b5bd1fc3e4e9ad586b7c31 "android: Update minimum NDK
version to 27"

Change-Id: I8a2fb01804ed6220bb927175992b4d5015b0d7e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182281
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-27 13:38:07 +01:00
Tomaž Vajngerl 76b55ced15 basegfx: simplify template code by using concepts
Change-Id: Ie5bff37dbc20253ec869b2e0e0379eb22e78f6d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180415
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-01-18 02:56:34 +01:00
Gabor Kelemen 72df5a6fdf Drop unneeded forward declarations from include/
test drive the new bin/find-unneeded-includes --fwdecl mode

Change-Id: I507fa2b172ec9e348d1d91066ea241f02187b5ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179321
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-03 09:32:27 +01:00
Stephan Bergmann 41ab6a5dfa struct SN needs a strict weak ordering operator <
...so it can be used with std::sort in impSolve() (further down in
basegfx/source/polygon/b2dpolypolygoncutter.cxx).  At least on macOS with a
LLVM 20 trunk libc++ in hardened mode, JunitTest_sfx2_complex failed with

> ~/llvm/inst/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h:59: assertion __comp(*(__first + __a), *(__first + __b)) failed: Your comparator is not a valid strict-weak ordering

To simplify the new implementation of struct SN operator <, add a B2DPoint
operator <=> (but whose implementation would cause

> In file included from /home/tdf/lode/jenkins/workspace/android_arm/basegfx/source/curve/b2dbeziertools.cxx:21:
> In file included from /home/tdf/lode/jenkins/workspace/android_arm/include/basegfx/curve/b2dcubicbezier.hxx:22:
> /home/tdf/lode/jenkins/workspace/android_arm/include/basegfx/point/b2dpoint.hxx:129:41: error: invalid operands to binary expression ('tuple<const double &, const double &>' and 'tuple<const double &, const double &>')
>         { return std::tie(a.mnX, a.mnY) <=> std::tie(b.mnX, b.mnY); }
>                  ~~~~~~~~~~~~~~~~~~~~~~ ^   ~~~~~~~~~~~~~~~~~~~~~~

etc. on Android with NDK 23.2, see
<https://ci.libreoffice.org/job/gerrit_android_arm/43174/>, so work around that
in the implementation for now).

Change-Id: I9f46d39dc9e9024fe9ac59413c44e49642282c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-12-09 15:13:46 +01:00
Mike Kaganski 1180b3473a com::sun::star -> css
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-10 10:50:15 +01:00
Armin Le Grand (Collabora) 8bdddee089 CairoSDPR: Adapt WrongSpell Primitive to View-Independent
Change-Id: If739dd9f28f56874978c7b3a76e1234e5f430c9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172319
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-23 16:36:59 +02:00
Armin Le Grand (Collabora) a073b61339 CairoSDPR: Direct support for RGBA Gradients (I)
Detect where created when a RGBA gradient could be
used directly and create a primitive representing
that, a PolyPolygonRGBAGradientPrimitive2D.
That primitive decomposes to what was created before,
so no primitive renderer has to be touched, all will
work as before.
NOTE: That helper primitive just holds references to
what would be created anyways, so one depth step
added but not really any additional data.
This is the 1st step for direct support, the 2nd is
to then detect and use that primitive in SDPR
implementations directly.

Change-Id: I4f247636ce58a8a1fd1e0df32dabed0d6cc10d0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170527
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-16 13:10:10 +02:00
Armin Le Grand (allotropia) f74bb604ff Make SystemDependentData mechanism type-based
Up to now that genereal buffering mechanism used
typeid.*hash_code to identify the class. As we
have learned this is not safe. Thus I changed it
to use enum'ed SystemDependentDataType definitions

Change-Id: I803912ec419290db1d40bae0bc41364fad64cbfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170385
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-12 17:59:50 +02:00
Armin Le Grand (allotropia) 27829e4a6c CairoSDPR: Improve BColorModified Bitmaps
There is the complete BColorModifierStack support for
primitives for Bitmaps, e.g. hue/saturation, etc, but
it was slow due to not being buffered, so had to be
re-created often. I changed this to use the common
buffering mechanism to improve this.
Up to now a fallback to use the old Graphic
manipulators for that purpose was in place since this
was faster, but had to be done every time. I have now
changed the priority to using the primitive way to
handle things, but kept the fallback code - just in
case.
Note that the new stuff is faster, but even much faster
when the bitmap is copied and appears multiple times ->
the same buffered instance is used, and SDPRs then use
the system-dependent data buffered at that prepared
data.
Also note that this change does not only speedup
CairoSDPR, but all PrimitiveRenderers, including the
VCL and Metafile ones. In principle everything that
uses BitmapEx::ModifyBitmapEx.
Had a 2nd thought: Only the content Bitmap gets changed,
so for this case we do not need AssociatedAlpha and
watch for it to not have changed. Removed that.

Change-Id: I2ee36cc84bdc1c723aa01f872edbfd1f51e11c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170305
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-11 10:58:24 +02:00
Noel Grandin 115f600374 tsan: ImplB3DPolygon cannot have mutable state
because it lives inside a cow_wrapper, which means multiple threads will
see inconsistent state.

WARNING: ThreadSanitizer: data race (pid=1448100)
  Read of size 1 at 0x7218002d5a48 by thread T333:
0 ImplB3DPolygon::getNormal()
basegfx/source/polygon/b3dpolygon.cxx:998 (libbasegfxlo.so+0xef47a)
1 basegfx::B3DPolygon::getNormal() const
basegfx/source/polygon/b3dpolygon.cxx:1477 (libbasegfxlo.so+0xe1834)
2
drawinglayer::processor3d::DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(drawinglayer::primitive3d::PolyPolygonMaterialPrimitive3D
const&) const drawinglayer/source/processor3d/defaultprocessor3d.cxx:424
(libdrawinglayerlo.so+0x1ed388)
3
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:531
(libdrawinglayerlo.so+0x1edb6f)
4
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
5
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:543
(libdrawinglayerlo.so+0x1edbe4)
6
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
7
drawinglayer::primitive2d::ScenePrimitive2D::create2DDecomposition(drawinglayer::geometry::ViewInformation2D
const&) const::Executor::doWork()
drawinglayer/source/primitive2d/sceneprimitive2d.cxx:462
(libdrawinglayerlo.so+0x12469f)
8 comphelper::ThreadTask::exec()
comphelper/source/misc/threadpool.cxx:319 (libcomphelper.so+0x2bd587)
9 comphelper::ThreadPool::ThreadWorker::execute()
comphelper/source/misc/threadpool.cxx:85 (libcomphelper.so+0x2c3930)
10 salhelper::Thread::run() salhelper/source/thread.cxx:39
(libuno_salhelpergcc3.so.3+0x5d22)
11 non-virtual thunk to salhelper::Thread::run()
salhelper/source/thread.cxx:? (libuno_salhelpergcc3.so.3+0x5ed9)
12 threadFunc include/osl/thread.hxx:189
(libuno_salhelpergcc3.so.3+0x6b1e)
13 osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:237
(libuno_sal.so.3+0xfc937)

  Previous write of size 8 at 0x7218002d5a48 by thread T334:
0 operator new(unsigned long)
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64
(discriminator 8) (cppunittester+0x10c8a1)
1 o3tl::cow_wrapper<ImplB3DPolygon,
o3tl::ThreadSafeRefCountingPolicy>::make_unique()
include/o3tl/cow_wrapper.hxx:304 (libbasegfxlo.so+0xfe798)
2 o3tl::cow_wrapper<ImplB3DPolygon,
o3tl::ThreadSafeRefCountingPolicy>::operator->()
include/o3tl/cow_wrapper.hxx:329 (libbasegfxlo.so+0xef0e5)
3 basegfx::B3DPolygon::getNormal() const
basegfx/source/polygon/b3dpolygon.cxx:1477 (libbasegfxlo.so+0xe1825)
4
drawinglayer::processor3d::DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(drawinglayer::primitive3d::PolyPolygonMaterialPrimitive3D
const&) const drawinglayer/source/processor3d/defaultprocessor3d.cxx:424
(libdrawinglayerlo.so+0x1ed388)
5
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:531
(libdrawinglayerlo.so+0x1edb6f)
6
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
7
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:543
(libdrawinglayerlo.so+0x1edbe4)
8
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
9
drawinglayer::primitive2d::ScenePrimitive2D::create2DDecomposition(drawinglayer::geometry::ViewInformation2D
const&) const::Executor::doWork()
drawinglayer/source/primitive2d/sceneprimitive2d.cxx:462
(libdrawinglayerlo.so+0x12469f)
10 comphelper::ThreadTask::exec()
comphelper/source/misc/threadpool.cxx:319 (libcomphelper.so+0x2bd587)
11 comphelper::ThreadPool::ThreadWorker::execute()
comphelper/source/misc/threadpool.cxx:85 (libcomphelper.so+0x2c3930)
12 salhelper::Thread::run() salhelper/source/thread.cxx:39
(libuno_salhelpergcc3.so.3+0x5d22)
13 non-virtual thunk to salhelper::Thread::run()
salhelper/source/thread.cxx:? (libuno_salhelpergcc3.so.3+0x5ed9)
14 threadFunc include/osl/thread.hxx:189
(libuno_salhelpergcc3.so.3+0x6b1e)
15 osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:237
(libuno_sal.so.3+0xfc937)

Change-Id: I9a12e2178cfad07f0a23b5dc4c502ce16ef92fb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170275
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-10 19:04:37 +02:00
Armin Le Grand (Collabora) 8a6fb1793d SDPRCairo: enhance CairoPixelProcessor2D
Added and corrected quite some stuff to this basic
construct provided by Caolan (thanks again!). No
detailed descriptions here, but it's getting more
complete and faster.

May contain errors and is primitive-complete in the
sense that all gets rendered, but some basic stuff
that should be directly supported is still missing,
e.g. text rendering.

Adding this to allow people to check it out (speed)
also since it's not yet used as default in master,
so it's safe and also safes the changes publically.

To test it, use TEST_SYSTEM_PRIMITIVE_RENDERER as
set EnvVar in linux systems.

Change-Id: I25f795c9ea4ad4f3b99591304f8803dffa499436
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168911
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-02 20:34:29 +02:00
Caolán McNamara a2623abe07 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I498c10e8bc134b41e3606d8a05cf3103a9274735
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166937
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 22:04:11 +02:00
Mike Kaganski ea9904c896 Drop FRound, and use generalized basegfx::fround
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-17 03:56:59 +02:00
Mike Kaganski 690526f95e Generalize basegfx::fround for templated return type
And use it when assigning to tools::Long

Change-Id: I0814d7bac9cdd48191ba69c64e3b12a4973b3417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166071
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-15 06:34:33 +02:00
RMZeroFour 45d951492a tdf#147906 Use std::hypot for Pythagorean distance
As part of the efforts in tdf#147906 to replace expressions like
sqrt(a^2 + b^2) with std::hypot(a, b), to eliminate overflow
errors, this commit performs the changes in certain files.

This also changes the B3DVector::normalize and B2DVector::normalize
methods to have similar behaviour.

Change-Id: I142585cfa594849f06cd06517ad9d40430df2ade
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165555
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-05 13:59:33 +02:00