Commit graph

2117 commits

Author SHA1 Message Date
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
08143bf192 no longer need this svtools/drawinglayer hack
after
    commit 664ecbd891
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Wed Nov 20 16:08:14 2024 +0200
    remove OutDevSupportType::TransparentRect

Change-Id: I57804ec9e9967c7082a1f657165d967d75b1dedf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-21 14:31:49 +01:00
Noel Grandin
ce8816ff95 loplugin:reftotemp in drawinglayer..framework
Change-Id: I31618b4ae7ea4e37834bffc89e352b4c33eda14d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176372
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 18:28:57 +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
Bogdan Buzea
0488beff8b tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 94, 99

Change-Id: I406b94c79426cebbd4813a019389d0cac0616bbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175226
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-11-10 01:07:48 +01:00
Noel Grandin
ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Noel Grandin
5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Noel Grandin
11b1557147 convert KernArray from sal_Int32 to double
which allows us to eliminate a bunch of rounding at various layers, and
consequently maintain a lot more precision

Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31 12:10:52 +01:00
Caolán McNamara
6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara
f0c49bd155 cid#1633781 Initialization or destruction ordering is unspecified
and

cid#1633780 Initialization or destruction ordering is unspecified
cid#1633778 Initialization or destruction ordering is unspecified
cid#1633777 Initialization or destruction ordering is unspecified
cid#1633776 Initialization or destruction ordering is unspecified

Change-Id: I8ae7cbede6df2ad747fe57d0ac2800e1b6a31038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175576
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-25 09:22:55 +02:00
Noel Grandin
19bc8856c4 move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.

Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22 08:01:19 +02:00
Chris Sherlock
bc2ff9daf5 vcl: move bitmap filter headers into vcl/bitmap global header directory
Use #pragma once instead of header guards

Change-Id: Iba43f2103628ed184933cf2611991e7aef9f0173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173369
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2024-10-21 09:45:21 +02:00
Noel Grandin
0e76e830c2 cid#1606613 Overflowed constant
Change-Id: I5340d46ef1264236c63bfd058e44dd984be2793c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-07 09:31:16 +02:00
Caolán McNamara
5e1eaea272 crashtesting: avoid null deref on failure of cairo_image_surface_create
seen since:

commit 1acd37a671
CommitDate: Mon Sep 23 14:12:04 2024 +0200

    CairoSDPR: Activate globally to check builds/tests

Change-Id: If3068b436eb57b48b048d30538b71563f38735d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174561
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-06 21:58:45 +02:00
Armin Le Grand (Collabora)
c92846d670 tdf#163234: CairoSDPR: PixelSnap corrections
PixelSnap has to also snap control points, also
simplified some stuff in line geometry conversion
to cairo, plus more precise detection of when to
apply piyel snap

Change-Id: I41d27d8d513a62609a727dfd80f073356c901c49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174418
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-10-03 14:26:53 +02:00
Andrea Gelmini
ad06ec4c5b Fix typo
Change-Id: I7a3a2f7d7e98c8bb34b31a3fb20b6a92493f5b32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174345
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-10-01 18:10:23 +02:00
Armin Le Grand (allotropia)
0acab5124c Remove unused BColorModifierStack from VclProcessor constructor
Was not used and - if needed - should be done by embedding
the sequence of Primitives sent to it to a
ModifiedColorPrimitive2D containing the intended
BColorModifier. Keep clases as simple as possible.

Change-Id: I99de18cc971d6b396ad291ef88b59bd7599f9196
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174314
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-10-01 15:23:33 +02:00
Armin Le Grand (allotropia)
a57c9e1aca CairoSDPR: Support direct RGBA for convertToBitmapEx
Added general interfaces to be able to render directly
to an RGBA target SDPR:

- processor2d::createPixelProcessor2DFromScratch creates
  a target-SDPR with given pixel size and RGB or RGBA,
  owning and using a cairo surface internally
- processor2d::extractBitmapExFromBaseProcessor2D extracts
  rendered content to BitmapEx, including alpha

All this is currently only implemented for Ciaro, thus
the internal impls are encapsulated by USE_HEADLESS_CODE,
but already created gererally available. The return values
have to be checked to see if an evtl. shortcut is possible.

For convertToBitmapEx this means that it can do conversions
much faster than up to now for cairo when CairoSDPR is
available, else it has to to the older slower way that
also works and is the default: Create RGB content, create
Mask, RemoveBlendedStartColor (see convertToBitmapEx
implementation). This works and has the same quality,
but needs two renderings and one bitmap operation, thus
is clearly slower.

Note that these interfaces can and will be supported for
other SDPR implementations in the future, thus will make
this converter automatically faster on systems where we
will have a SDPR in the future, too.

Also note that this is the gereral converter from
a sequence of Primitives to Bitmap data, already used in
many places, inculding UNO API, thus is expected to have
some impact on conversion efficiency - if Cairo is used,
so e.g. also headless.

Change-Id: Ia638a549a04b19622892d91651317ec6727b6cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174266
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-10-01 11:14:14 +02:00
Andrea Gelmini
ddf05a8856 Fix typos
Change-Id: Ie35705bf4559f977c7a7b67edb6b05b6cd564249
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174062
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-27 23:28:16 +02:00
Andrea Gelmini
5a505cfa26 Fix typo
Change-Id: I2745fe4a7ffdae1e22fb103023c5555505f49548
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174058
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-27 23:27:17 +02:00
Armin Le Grand (Collabora)
59fc2b5ca9 tdf#163125: CairoSDPR: Take virtual OutDevs into account
Unfortunaletly we have 'virtual' OutDevs, that means their
PixelSize is bigger as they claim and they use an internal
offset. This is used to not have to create too many Windows
inside Windows (AFAIR initial reason was that Windows has
a fix number of Windows per process that can be incarnated).

The offset was/is already supported by SDPRs using
ViewInformation2D and adding ot to the ViewTransformation,
but the evtl. existing PixelSize has to be clipped against.
The fallback VclPixelProcessor2D supports that indirectly
by doing that in the OutDev commands that get called, so
it does not need to be done by that renderer.

I have now added code to support that for the
CairoPixelProcessor2D, see code and comments. It uses an
existing method of cairo to do that elegantly inside the
system-dependent code of the SDPR.

Note that the Windows SDPR D2DPixelProcessor2D will
have the same problem that will have to be solved there,
too. Since it's currently in experimental state I made
myself a note about that.

Change-Id: I68915985102bb4a63c84299f8d022ab013633510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173998
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-27 13:38:35 +02:00
Tomaž Vajngerl
0c534406b0 Clean-up Primitive2D XML dump
Use static_cast instead of dynamic_cast when it makes more sense
to do so and use auto to make the code more readable (when we
write the type 2 times).

Change-Id: I433885ab11437b1e086e0b8e255ed9dbe7e43b90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173978
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2024-09-26 16:44:43 +02:00
Armin Le Grand (Collabora)
dad5b34d01 tdf#163131 CairoSDPR:
Added BColorModifierStack to SVG linear and radial
gradient direct support, was missing.

Change-Id: I1405ea0653180fa695b40082bf8b8520441d0620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173871
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-25 10:56:34 +02:00
Andrea Gelmini
2be38378f1 Fix typos
Change-Id: If1e5d6c8a24df6b8448fe393eb25dfe20d4b89b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173823
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-23 17:09:22 +02:00
Andrea Gelmini
84299f3da3 Fix typo
Change-Id: I9d623cde2b6132b508f8f2ced30edcf705d31963
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173821
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-23 17:09:05 +02:00
Andrea Gelmini
cb874333a8 Fix typo
Change-Id: I459945f142055186fc103a2e0e7b3f347e02c680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173822
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-23 17:08:39 +02:00
Armin Le Grand (Collabora)
1acd37a671 CairoSDPR: Activate globally to check builds/tests
This is to check all builds/tests with activated
CairoSDPR to evtl. make needed additional changes
as preparation to activate this in the future.

adapted for testTdf139000():
Use no AA offset (0.5) for applying mask.

Adapted for testDoublePixelProcessing:
The trick (hack) to create a PixelProcessor and then
attact a metafile to start recording to it does no
longer work/make sense since the VclPixelProcessor2D
is no longer the only PiyelProcessor you might get.
If it is a SDPR one (e.g. CairoSDPR) it *cannot*
record metafiles - and is not intended to do so.
Since this test was already adapted 6 years ago to
the modernized decompose of a double line to just
two lines anyways it is OK to now change to use
a VclMetafileProcessor2D now initially.

Adapted for CppunitTest_svgio:
In SvgFeBlendNode::apply execute the calls for
convertToBitmapEx without AntiAliasing to get better
edges. Input data is SVGToken::FeFlood, so a
rectangular area, so no AA needed.
Taking this back: The reason must be in the renderer,
nothing else changed. Debugged in detail through
both, problem is that VclPixelProcessor2D ends up in
CairoCommon::drawPolyPolygon and draws the polygon
AntiAliased, but just the fill and thus *not* with
the AA-offset of 0.5, that is only done for fill.
I have to re-consider the AA offset decision for filled
polygons. Checked CairoCommon again, indeed AA offset
is ony done for lines, not for fill - that corresponds
with my thoghts from the weekend. Somehow this must
have come in with copy/paste (?). Same is already
in D2DPixelProcessor2D, have to remove there, too.

Adapted for CppunitTest_sd_png_export_tests:
This was a hard one, debugged all the components used
for ConvertToBitmap/MaskCreation. Cumulated to be
some diff in processTransparencePrimitive2D, but
found no error after checking all tranmsformations.
The orig errof ro the failing test (tdf#158743)
seemed to give a hint, but ObjectTransformation
was just handled well. At the end the diff was
that VclProcessor2D uses the same processor, while
CairoPixelProcessor2D creates local instances
(what is cheap). Thus the content rendering for
TransparencePrimitive2D was *not* using the set
BColorModifierStack. Added as needed to be able
to transfer that to the content rendering
instance.

Adapted for CppunitTest_sd_png_export_tests:
Gerrit says PNGExportTests.cxx:1041 asserts,
but I cannot reproduce. Maybe at the build
system a slightly different font is used.
My only idea is to add the mentioned point
at (12,120) to the rectangles, obviously the
bottom one.
Next one is (13,82), again bottom one,
adapting.

Adapted for CppunitTest_sw_ooxmlexport16:
The test 'testTdf136841' uses a WMF that contains
XOR paint parts. This showed that that part in
CairoSDPR did not work yet as needed. Adapted
that, also the test slightly due to the color
result slightly changed with CairoSDPR.

One last change before activating in master: Add
DISABLE_SYSTEM_DEPENDENT_PRIMITIVE_RENDERER in
case it urgently needs to be switched off or to
be able to simply test if something happening is
related to CairoSDPR

Change-Id: Idb8237a05d7594efe20edfa1707ca0002185645a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173330
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-23 14:12:04 +02:00
Jonathan Clark
3bd4a79772 tdf#119785 Implement the EMF TA_RTLREADING alignment flag
EMF has two ways to indicate that text should be treated as RTL:

- The ExtTextOut ETO_RTLREADING flag
- The SetTextAlign TA_RTLREADING flag

Previously, only the former was implemented. This change implements the
latter.

Change-Id: If1023b4a0a3b6eb2ce47d2b764edbfd1a5c0dd5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173579
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2024-09-18 05:59:51 +02:00
Sohrab Kazak
7109e1ea64 tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I58a82179181cc1f783fc40b146c09668508a8883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173149
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-09-16 06:59:43 +02:00
Xisco Fauli
629a9d68ee drawinglayer: getHeight() -> getWidth()
Since 01ded1e6d3
"WMF tdf#55058 tdf#142722 Add implementation of BitBlt and StretchBlt"

Change-Id: Ib99e940c954fe44f2dbee2b14dfa9d2c79468500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172919
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-09-05 20:06:21 +02:00
Xisco Fauli
295e103964 tdf#161724: Revert "tdf#153008 svx: impl crop for stretched bitmap fill"
This reverts commit c30c1d12f2.

it even broke the original sample file reported in tdf#153008
See https://bug-attachments.documentfoundation.org/attachment.cgi?id=196248
The original issue was reported in tdf#95165 but it doesn't work
in all cases, making it much worse in some cases where images
become very stretched
Reverting for now, specially towards libreoffice-24-8 and
libreoffice-24-8-1

Change-Id: Ib94d2784d701d37853ce9b17135b36f26a5c084b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172913
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-05 16:17:57 +02:00
Julien Nabet
3c6e5d3750 Typo mnClipRecurstionCount->mnClipRecursionCount
Change-Id: I7ce859d402626da156ff36247d987a3fe3010e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172837
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-04 08:08:56 +02:00
Andrea Gelmini
7f50a49e63 Fix typo
Change-Id: I24b0dc42a8b710aaa502f590a7071e463d1aeb14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172841
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-04 08:08:44 +02:00
Bogdan Buzea
a28cae7899 tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I5fc9823b6d0ca88505e8d4e6127fac7e776fa1a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171784
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-09-03 16:11:57 +02:00
Armin Le Grand (Collabora)
c37d18c0a8 CairoSDPR: Fixed a problem with cairo_clip (see comments)
Change-Id: I14d477dbeb9a18cc6f9d750b5d1f837117c22eaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172798
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-03 15:58:37 +02:00
Armin Le Grand (allotropia)
6386a16120 CiaroSDPR: Small optimizations
Change-Id: Iecfec4668a465cc2fd3687d66f67de6e0d1e33c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172687
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-02 11:30:58 +02:00
Balazs Varga
3eac847927 tdf#161826 - Add uniform Glow effect for texts in shapes
- Add new text Glow effect properties for shapes

- Using TextGlowPrimitive for rendering uniform text glow in shapes

- Add/allow new UI Glow Effect for texts in shapes on sidebar
  (Only for Impress/Draw and Calc)

- Import/Export ooxml files with Glow effect on texts in shapes
  (Only PPTX/XLSX)

- Import/Export odf files with Glow effect on texts in shapes

- Add unit test for glow text attributes in ODF

- Add uni tests for OOXML import/export

Note: Also this patch effects on
tdf#144061 - Effects: Allow GLOW to apply to Text (as we have for shapes)

Change-Id: I16586c01654f197f532129e4e06aa2ef9f214395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172216
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-08-29 19:59:24 +02:00
Armin Le Grand (Collabora)
e68715944f CairoSDPR: Use integer & shifting in LuminanceToAlpha conversion
Change-Id: I8a6b6341295487d7590d166d327ea90b7d1315db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172480
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-28 21:01:30 +02:00
Noel Grandin
df6293ad06 tdf#161983 Page background image follows scrolled view
regression from
    commit 2a9b53bb9f
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Thu Jun 27 10:18:15 2024 +0200
    tdf#160345 Slow rendering of filled polygon

Change-Id: I38abd82d33cc25a56a26d8ccac26fb5f90e9c0fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-28 19:35:30 +02:00
Armin Le Grand (Collabora)
bf3cd8e50f CairoSDPR: Make using SDPR dependent of ExperimentalMode
Change-Id: Ia25fe2f3c5ff4904530ea8c296d10bbbe2823af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172394
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-27 13:05:19 +02:00
Caolán McNamara
60b4bca6bd cid#1618310 COPY_INSTEAD_OF_MOVE
Change-Id: Ic53365af1b6e075016ba61c438e3bb7dd4c25f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172382
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-26 13:25:23 +02:00
Andrea Gelmini
a241f2d96d Fix typo
Change-Id: I26e273eccd4f1fcb525628a47a24c9a9f6f6f585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172353
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-08-24 18:21:47 +02:00
Armin Le Grand (Collabora)
79ab5c3775 CairoSDPR: Let VclPixelProcessor2D use RedLining decompose
VclPixelProcessor2D used PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D
to render WrongSpellPrimitive2D using processWrongSpellPrimitive2D
and there renderWrongSpellPrimitive2D. That again used
DrawWaveLine at OutputDevice.

This again does some very special things, e.g. it uses the set
Font at the OutputDevice which hopefully is the one the
redlining refers to (info from that has to be added to the
WrongSpellPrimitive2D if needed, in this case the
LogicalFontInstance's GetWavelineUnderlineSize result). It
seems to rely on the Text being redlined being 'painted'
directly before this.
It also renders the WaveLine to a BitmapEx and does pixel-
based operations on it (probably to 'clip' the WaveLine instead
of adding needed partial curve geometry), and adds that
BitmapData to a cache.
It also mentions it 'make sure the waveline does not exceed the
descent to avoid paint problems', probably because when not
handling it as Primitive from a PrimitiveProcessor the
invalidation Range will not fit (it still uses the getB2DRange
of the WrongSpellPrimitive2D to do that part indirectly), so
these regions will probably not always have fit.

Nothing of this is needed, after I made the
WrongSpellPrimitive2D to use view-independent (aka pixel-
oriented scaling, fixed size) to behave like the current paint
the VclPixelProcessor2D can just use the decompose and render
the view-dependent and buffered visualization of the WaveLine.

NOTE: It is not possible to completely get rid of
OutputDevice::DrawWaveLine since it is used in some cases in
Writer directly, also in ImpEditEngine::Paint when the
EditEngine is painting directly (very rare now).

NOTE: Also impCreateTextPortionPrimitive did swap start/end
in preparationm to create a WrongSpellPrimitive2D (look for
tdf#151968), this will no longer be needed.

Change-Id: I31aec8ea9c2e3c574ad471082612a10d95810f3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172331
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-24 15:10:45 +02: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
Andrea Gelmini
2d591ae8ac Fix typo
Change-Id: I7db2f31467f79c05595cf0ac2fa8b1d457a4cc3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172313
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-08-23 14:09:50 +02:00
Armin Le Grand (Collabora)
13366d4951 CairoSDPR: Add support for SVG Gradient direct rendering
Change-Id: I7fb1c885e46a23e999ea4c98a73d3d526a2923e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172245
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-22 21:11:00 +02:00
Andrea Gelmini
fc6e0d8a39 Fix typo
Change-Id: I85261133e191b40de21fd25e9c34351f71a1a219
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172176
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-08-21 12:19:43 +02:00
Caolán McNamara
0ba4558949 cid#1555812 COPY_INSTEAD_OF_MOVE
and

cid#1556056 COPY_INSTEAD_OF_MOVE
cid#1556907 COPY_INSTEAD_OF_MOVE
cid#1556957 COPY_INSTEAD_OF_MOVE
cid#1556970 COPY_INSTEAD_OF_MOVE
cid#1607095 COPY_INSTEAD_OF_MOVE

Change-Id: I51112b3a63b8e9333e3eaaeb55b764e6c449a5ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172117
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-21 09:31:36 +02:00
Caolán McNamara
0aaf0a6248 doesn't look safe to move this dxarray
given the use of rDXArray after move
.
Change-Id: I27ed26228bb4a43b6dcb6edb4586e0727389dcbb

Change-Id: I66e0a6dd1837e598b620692b405bb32f79470e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172116
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-20 21:14:25 +02:00
Armin Le Grand (Collabora)
b3c7c30ca1 CairoSDPR: Finetuning some Cairo-Values
Experimented with painting 'problematic' bitmaps
e.g. RGBA 1xN or Nx1 pixels -> Cairo paints out of
bounds (?), so had to clip that. For more info,
see added code comments.

Change-Id: I4dcd488e5e0c692e236136a216ad7b460d681233
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172112
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-20 20:58:11 +02:00