Commit Graph
896 Commits
Author SHA1 Message Date
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00
Gabor Kelemen 47fe1cce1b tdf#146619 Use more forward declarations in include/vcl/[h-p]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[n-p]*

Change-Id: If6436f3ef8300693c3869c2521e2fa2aa8a4edc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196397
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-14 10:19:31 +01:00
Gabor Kelemen c0b14ab9aa tdf#146619 Use more forward declarations in include/vcl/[A-Z]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[A-Z]*

This shaves off about 100M input, not bad for such a small amount
of files checked

This time --headersfwd skips files that contain #if defs,
in hope of not breaking builds that are not checked by CI

(...except for include/vcl/BitmapTools.hxx - this was cleaned accidentally,
due to a bug in the bin/find-unneeded-includes script that is fixed
by the previous commit 930ff2b830
- but let's keep this anyway, it seems fine)

Change-Id: Ia8e49d94f6adb3cdbedbc40ffa56dbf846c9b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196235
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-05 11:10: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
Neil Roberts 117d9624a3 Consolidate calls to GetLocalizedChar into one helper function
The three places that call GetLocalizedChar were all functions that were
doing the same thing, ie, localizing the digits in a string. Instead of
having three separate copies of this similar code, this patch stops
exporting GetLocalizedChar and instead exports a utility function that
operates on a string.

One of the three versions of the code avoided allocating a new string if
nothing changes. This new consolidated helper uses the same approach
so that the other two places can take advantage of this very likely
optimisation.

The main motivation to do this was to avoid truncating the sal_UCS4
returned by GetLocalizedChar into a sal_Unicode. The consolidated
implementation adds the converted characters with appendUtf32 instead so
that if GetLocalizedChar ever returns characters outside of the BMP then
it would work. In practice this doesn’t currently happen so it’s not an
actual problem. However the commit below makes the compiler warn when
sal_UCS4 is truncated, so this patch fixes a truncation that was marked
as a TODO in that commit.

    commit 82f055e5cb
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Tue Nov 4 10:12:18 2025 +0200
        new loplugin:narrow

Change-Id: I628a29520a0896cd0f4c7c2ff131ac763e07925b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-11-05 19:21:07 +01:00
Noel Grandin 82f055e5cb new loplugin:narrow
inspired by
    commit 4888f6f3f5
    Author: Neil Roberts <bpeeluk@yahoo.co.uk>
    Date:   Sun Oct 26 16:26:47 2025 +0100
    tdf#166488 Fix local variable used to store char from SvxCharacterMap

Look for places narrowing a sal_UCS4 value and thus losing information.

I dont actually fix anything here, just change some types to use the sal_UCS4 typedef,
and add some TODO comments.

Change-Id: Iaea7ba647889efcdaafe5138d4e4806849514f02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193384
Tested-by: Jenkins
Reviewed-by: Neil Roberts <bpeeluk@yahoo.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-11-05 15:02:41 +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
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 98af3602c1 BitmapEx->Bitmap in cppcanvas
now that Bitmap can support transparency

Change-Id: I88426b14a1047b46d18d6664b1d55d1980354a55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190416
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-30 22:01:27 +02:00
Noel Grandin 232d7631e8 BitmapEx->Bitmap in MetaBmpExScalePartAction
now that Bitmap can handle transparency

Change-Id: Idbbfe20aff2ff40f19b6cb30ece678bf282a6698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190365
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-29 17:53:10 +02:00
Noel Grandin 3ab47e263e BitmapEx->Bitmap in MetaBmpExScaleAction
now that Bitmap supports transparency

Disable part of the redaction test. I have
verified that the visual result of auto-image redaction
is the same before and after this change, but we
seem to end up with more rectangles than before.

Probably something weird inside the EMF/WMF machinery.
(see the fixMetaFile function).

Change-Id: I85f308ae66ddf7592e41fde1ab9e49f9c882146e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190338
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-29 17:52:53 +02:00
Noel Grandin 0680ba0258 BitmapEx->Bitmap in MetaBmpExAction
now that Bitmap supports transparency

Note that the SVM unit test changed because we no longer
store some bitmaps as an 8-bit palette color layer and an
8-bit alpha layer. When those pass through Bitmap, they
get converted to a 32-bit bitmap.

Change-Id: Icbb30e291a7ed5c53319876637ae25e88a97d90d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190330
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-28 18:21:42 +02:00
Noel Grandin 66b0aab258 use Graphic::GetBitmap instead of Graphic::GetBitmapEx
in places where we want a Bitmap

Change-Id: I70acdfde07df5bda84aa21143b2a0aca98023fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189675
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-21 20:54:31 +02:00
Mike Kaganski f7f6ed3975 cppcanvas::tools -> cppcanvastools
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: I7ae7452618bdad919cc01d9f5c08cbc44cb5339d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189950
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-20 15:23:24 +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
Gabor Kelemen 66ffc2417b tdf#146619 Run IWYU on cppcanvas/
Change-Id: Ie98b497409e394ac13176d4e1ea8753278698fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189791
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-08-19 09:48:00 +02:00
Regina Henschel c3448b4bea tdf#166647 avoid duplicating slideshow user paint
When a user enables 'mouse as pen' before starting the slideshow, then
his paintings are saved as persistent shapes when he exits slideshow.
These shapes were then converted back to paintings when the user starts
the slideshow again, so that they are visible againg.

But these old paintings were treated as new paintings when the user
exits slideshow and were then saved again as shape to the page although
the page contains these shapes already. Thus with every new start and
exit of the slideshow the shapes were duplicated. Because the duplicates
are at exactly the same place as the originals, you do not notice it
immediately. But you can see the duplicates in the Navigator and notice
it in the file size.

The fix introduces a flag that is set at the paintings from the existing
shapes when the slideshow is started. This flag is then used to skip those
paintings from converting to shapes when slideshow is finished.

Change-Id: I93324d157b1b802d7b8e24858034d2fdc5d71b45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188364
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
2025-08-11 08:52:22 +02:00
Noel Grandin 09298d001e BitmapEx->Bitmap in bitmapExFromXBitmap
now that Bitmap can handle transparency

Change-Id: Id87889a0e5ca0a3398f9baceee3474369eb0f7aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188539
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-07 13:09:57 +02:00
Caolán McNamara 4725db2575 cid#1659599 Variable copied when it could be moved
and

cid#1659624 Variable copied when it could be moved
cid#1659632 Variable copied when it could be moved
cid#1659637 Variable copied when it could be moved
cid#1659656 Variable copied when it could be moved
cid#1659662 Variable copied when it could be moved

Change-Id: I20179a4ff699af546694b8a4796ab2f0cfae1903
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188708
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-01 17:29:00 +02:00
Caolán McNamara e4780ac521 cid#1660797 Variable copied when it could be moved
and

cid#1660561 Variable copied when it could be moved
cid#1660555 Variable copied when it could be moved
cid#1660552 Variable copied when it could be moved
cid#1660549 Variable copied when it could be moved
cid#1660548 Variable copied when it could be moved
cid#1660444 Variable copied when it could be moved
cid#1659838 Variable copied when it could be moved
cid#1659835 Variable copied when it could be moved
cid#1555526 Variable copied when it could be moved

Change-Id: Ic3f69bc789861d06d33a7b23e7ed0d519df94ab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188589
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-30 18:14:14 +02:00
Noel Grandin e435c0749b drop OutputDevice::GetBitmapEx in favour of returning Bitmap
as part of the project of removing BitmapEx in favour of Bitmap, now that we can store RGBA data in Bitmap.

This mostly just moves the Bitmap->BitmapEx from inside OutputDevice to the various call sites,
from where I can make further improvements.

Change-Id: Id5366c1eb5ebca98fee7c974737552f4a09a5c2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188341
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-25 22:34:31 +02:00
Gabor Kelemen 99741c0ece Remove obsolete fw declarations from cppcanvas/ cui/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ie0669b460378c909d5cee2a786763e4d54087ff0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183881
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-13 10:58:12 +02: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 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
Noel Grandin 3f691b4a16 loplugin:reftotemp in cppcanvas..cui
Change-Id: I6c9ded2252462bcdeee6520bb7b7fa1752aa583b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176276
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 17:33:10 +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 ee4554b0ac cid#1555259 COPY_INSTEAD_OF_MOVE
and

cid#1555264 COPY_INSTEAD_OF_MOVE
cid#1555280 COPY_INSTEAD_OF_MOVE
cid#1555303 COPY_INSTEAD_OF_MOVE
cid#1555313 COPY_INSTEAD_OF_MOVE
cid#1555314 COPY_INSTEAD_OF_MOVE
cid#1555323 COPY_INSTEAD_OF_MOVE
cid#1555333 COPY_INSTEAD_OF_MOVE
cid#1555338 COPY_INSTEAD_OF_MOVE
cid#1555349 COPY_INSTEAD_OF_MOVE
cid#1555364 COPY_INSTEAD_OF_MOVE
cid#1555379 COPY_INSTEAD_OF_MOVE
cid#1555398 COPY_INSTEAD_OF_MOVE
cid#1555410 COPY_INSTEAD_OF_MOVE
cid#1555411 COPY_INSTEAD_OF_MOVE
cid#1555416 COPY_INSTEAD_OF_MOVE
cid#1555429 COPY_INSTEAD_OF_MOVE
cid#1555434 COPY_INSTEAD_OF_MOVE
cid#1555441 COPY_INSTEAD_OF_MOVE
cid#1555446 COPY_INSTEAD_OF_MOVE
cid#1555480 COPY_INSTEAD_OF_MOVE
cid#1555490 COPY_INSTEAD_OF_MOVE
cid#1555524 COPY_INSTEAD_OF_MOVE
cid#1555527 COPY_INSTEAD_OF_MOVE
cid#1555531 COPY_INSTEAD_OF_MOVE
cid#1555578 COPY_INSTEAD_OF_MOVE
cid#1555581 COPY_INSTEAD_OF_MOVE
cid#1555591 COPY_INSTEAD_OF_MOVE
cid#1555614 COPY_INSTEAD_OF_MOVE
cid#1555619 COPY_INSTEAD_OF_MOVE
cid#1555633 COPY_INSTEAD_OF_MOVE
cid#1555654 COPY_INSTEAD_OF_MOVE
cid#1555707 COPY_INSTEAD_OF_MOVE
cid#1555712 COPY_INSTEAD_OF_MOVE
cid#1555746 COPY_INSTEAD_OF_MOVE
cid#1555763 COPY_INSTEAD_OF_MOVE

Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-22 17:53:07 +02:00
Thorsten Behrens 0e70c14134 tdf#163410: fix missing text highlight color for outline text
During slideshow, the combination outline text mode, and highlight
background color never worked. Adding cppcanvas code to handle it.

Change-Id: I9abb45fca4c89d206ebb431ff5675288e5deab43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174872
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-10-13 20:39:24 +02:00
Caolán McNamara 941c0614ff cid#1608541 bogus Overflowed constant
Change-Id: I3785eb10dae32ddd05cfa1a59cdae99965a41169
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171730
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11 18:20:20 +02:00
Caolán McNamara ee015dc915 cid#1556058 COPY_INSTEAD_OF_MOVE
and

cid#1556064 COPY_INSTEAD_OF_MOVE
cid#1556066 COPY_INSTEAD_OF_MOVE
cid#1556072 COPY_INSTEAD_OF_MOVE
cid#1556075 COPY_INSTEAD_OF_MOVE
cid#1556077 COPY_INSTEAD_OF_MOVE

Change-Id: Ie2992d321ecff15f104547e3a3cad6e8c1a786a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171708
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-10 17:01:12 +02:00
Noel Grandin 04d3831914 loplugin:ostr in cppcanvas
Change-Id: I59c10b0d82297157a87cb366be69c8e757638c20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167257
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 12:53:11 +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
Noel Grandin 25f4ef5aa5 tdf#157792 followup
avoid doing some extra Invert() operations by creating an AlphaMask
instead of a Bitmap to pass to the BitmapEx constructor.

Change-Id: I1af3a5e65010b346fa0d0c56836d567e51c9b58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-18 13:38:36 +02:00
Stephan Bergmann 6d1b241ab7 Drop o3tl::span, can use C++20 std::span directly now
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11 21:53:13 +02:00
Gabor Kelemen 2f85eb7a2d tdf#146619 Recheck include/c* with IWYU
Change-Id: I0cf6f675483bddf82e7347b484a874c71963bfd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156984
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-09-22 09:33:13 +02:00
Andrea Gelmini 802377d604 Fix typo
Change-Id: Idd6b551bdfbbb613703dd948298deed0462097af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156195
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-28 14:21:12 +02:00
Noel Grandin 68e7974026 new loplugin:optionalbool
which warns against using the 'operator bool' conversion of
std::optional<bool> which can lead to interesting bugs

The bugs that this plugin have been submitted independantly,
so this change is just using has_value() in relevant places.

Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-28 09:43:40 +02:00
Patrick Luby e7496f4156 tdf#150610 fix broken rendering of text meta actions
Even when drawing to a VirtualDevice where antialiasing
is disabled, text will still be drawn with some
antialiased pixels on HiDPI displays. So, expand the
size of the VirtualDevice slightly to capture any of
the pixles drawn past the edges of the destination
bounds.

Change-Id: Ibcba8234708d8784c12f984289ec0a8fcad6694e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156098
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-08-27 23:11:29 +02:00
Noel Grandin 81994cb2b8 Convert internal vcl bitmap formats transparency->alpha (II)
(Second attempt at landing this)

Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.

Add a couple of new Color constants to make the intention
of the vcl code clearer.

Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.

(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.

Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-25 08:38:12 +02:00
Noel Grandin 13d7184351 make tools::Poly*gon single-arg constructors explicit
which will help avoid ambiguity in method calls in an upcoming patch

Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-06 20:28:05 +02:00
Khaled Hosny 68a4f005bc tdf#155810: Pass Kashida insertion positions through canvas
This was missed in:

commit 3901e029bd
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Mon Aug 8 22:08:37 2022 +0200

    tdf#104921: Cleanup Kashida insertion logic

The width adjustment passed through, but Kashida insertion positions
didn’t, leaving gaps in place of Kashidas when canvas is used
(apparently canvas is only used for slideshow).

Change-Id: I25ff30f10cc46a5c87bda2f3936df26b2fc926b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153234
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-18 22:01:53 +02:00
Noel Grandin c7dfec21b4 remove some misleading typedefs
Change-Id: I8016c42c3ff8d1cf03c276ebbb68ae7872cd43fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-15 18:14:39 +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
Noel Grandin 6ca077ee71 no need to allocate Gradient separately
it is only one pointer big

Change-Id: I21afdeb8015c658c7b9d5db24bceeb8e43694272
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148038
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-01 13:07:33 +00:00
Noel Grandin 00659bcdbb improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states

So
(1) use more useful names
(2) combine the two parameters into one enum

Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07 10:19:32 +00:00
Noel Grandin 21734247d5 drop internal support for 1-bit images
on modern hardware, these are less efficient than regular alpha
channels.

Also, this greatly simplies the range of stuff that vcl needs to deal
with, which will make the upcoming transparency->alpha patch easier to
deal with.

Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit
image.

Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12 06:52:42 +00:00
Caolán McNamara f9395a123e tdf#152094 retain more accuracy from RefDevMode::MSO1
do it like this to avoid adding another mapmode and to keep things
"the same" as much as possible

Change-Id: I1965aa545646f2d27b950d6335b2f608c3e4e04b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143475
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-02 15:20:07 +00:00
Tomaž Vajngerl c747486335 basegfx: replace typedef with a class B2DSize based on Size2D
Change-Id: Id8b3c2bcf0bf4be5aba2812b0edda479bc20c6a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139683
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-09-11 17:16:59 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Caolán McNamara 8b6c8e624b cid#1504592 Big parameter passed by value
and

cid#1504665 Big parameter passed by value
cid#1505368 Big parameter passed by value

revert the clang-tidy modernize-pass-by-value changes that coverity
warns about

Change-Id: Id92fdc8d1caeed9eaf7ff1e9e745938e5a971a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135803
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-14 11:37:16 +02:00