Commit Graph
683 Commits
Author SHA1 Message Date
Andrea Gelmini 0974df2160 Fix typos
Change-Id: Icd5b8ad9f175c85ac1d8df644679fab945c0de0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210373
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-02 15:33:22 +02:00
Andrea Gelmini c1f805eb9a Fix typos
Change-Id: I84385927a1cac6b9eac2a6b1fdef659336b4c2dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210214
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 15:21:49 +02:00
Andrea Gelmini 9c417196e9 Fix typos
Change-Id: Iaac2f6c404136bc95f3b32e651e808295ae99ea1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210061
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-27 20:45:38 +02:00
Andrea Gelmini 9ae10d61e0 Fix typos
Change-Id: I095b26617fa7190689ecde7359ffdf71265e726d

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209753
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:42:41 +02:00
Andrea Gelmini b58f28e813 Fix typos
Change-Id: I2db9c170350e9cd1d927eeb7f41e6d88dd433baf

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209752
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:02:54 +02:00
Mike Kaganski 9bfa8c6843 CreateAlphaMask + CreateColorBitmap -> SplitIntoColorAndAlpha
See commit f7b67e6c8c5981790fb9ac162dcc68e470b53112 (pdfexport: reduce
the number of times we split images, 2026-08-19) for rationale.

Change-Id: Ieef19e0725dcdf0c9b17444b8f0e8b9eefaf74ee
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9521
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0c72a1c0c7fd9da268a80038fad3ccb46a515834)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209513
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-23 13:27:57 +02:00
Mike Kaganski 5df7faddb9 CreateAlphaMask + CreateColorBitmap -> SplitIntoColorAndAlpha
See commit f7b67e6c8c5981790fb9ac162dcc68e470b53112 (pdfexport: reduce
the number of times we split images, 2026-08-19) for rationale.

Change-Id: I3fb2873a5e7b1e1e73266efdca1dc671a687277d
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9519
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Tested-by: Noel Grandin <noel.grandin@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 74272c95e9ae155ec61c300e82a6bc1fd06939f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209511
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-23 13:27:45 +02:00
Caolán McNamara 1bc7372569 share the four copies of SanitizePaletteIndex
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaf7640a2be687edda1ed31932eae7c19b4678ec5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9266
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit af2c9801021e42e0d327994cde0a8529450c6135)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209448
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-21 12:19:24 +02:00
Karthik b7b2913bdc tdf#172730: Add a fast scanline paths for premultiplied 32-bit bitmaps
Since BitmapEx was unified into a single premultiplied 32-bit BGRA
Bitmap, converting such a bitmap runs a per-pixel loop that builds a
BitmapColor and dispatches through the `GetPixelFromData` /
`SetPixelOnData`, (un)premultiplying one channel at a time.

Add a fast scanline path for the common case, a premultiplied 32-bit
truecolor bitmap (ABGR/ARGB/BGRA/RGBA). It resolves each channel's
byte offset once and then moves the scanline bytes directly, using the
premultiply / unpremultiply lookup tables.

Signed-off-by: Karthik <karthik.godha@collabora.com>
Change-Id: Ie8ee47055bdffca9e06d48955fdc0b61b34e08ac
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6752
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 54c68922eaa2d2c4e20e10091ad4911e8d32aed2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208641
Tested-by: Jenkins
2026-07-30 18:08:49 +02:00
Julien Nabet f601364f2d tdf#172937: let's compare colors instead of index of colors
Index retrieved corresponded to blue value, that's why:
-the right circle of the first line
-the two circles from left of the second line
-the second circle of the last line
were modified.

Change-Id: I57a5334ca11f5b987d4125c88810991f83d44d42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208817
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-07-30 08:22:14 +02:00
Xisco Fauli 938d7f8cd5 tdf#172744: fix UnoGraphic transparency
Bitmap::ChangeColorAlpha was added in
commit 4151265850
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Wed Aug 13 14:04:45 2025 +0200

    BitmapEx->Bitmap in Graphic

based on BitmapEx::ChangeColorAlpha, which was removed in
commit 6d0e5ddede
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Fri Sep 5 16:01:33 2025 +0200

    remove BitmapEx

and for some reason,

const sal_uInt8 cIndex = pReadAccess->GetPixelFromData( pScanlineRead, nX ).GetIndex();

was changed to

BitmapColor aCol = pAccess->GetPixelFromData( pScanline, nX );
const sal_uInt8 cIndex = aCol.GetAlpha();

which seems to be wrong
Change-Id: I96ec189c71db825728401ce87934d791975f577b

Change-Id: I348b12be4f79de17d0d37489d4827cc38d7aee5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208679
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-28 01:11:08 +02:00
Michael Weghorn 50040ef1d6 tdf#172651 Revert "vcl: strip alpha in Bitmap::Convert(N24Bit) ...
... for 32-bit-with-alpha sources"

The commit broke (e.g. toolbar and menu) icons for at least
the gtk3 and qt6 vcl plugins when scaling is enabled
(s. tdf#172651).

The commit message suggests that it is primarily relevant
for Collabora Online, which doesn't use this repo anymore,
so no negative consequences of reverting it again are known.

(When testing, broken icons were sometimes still shown
with the revert in place unless starting with a fresh
user profile, probably due to icons being cached in the
user profile.)

This reverts commit 7b5ddd9311.

Change-Id: Iad735af3f41229a2263a8ce3de1c2c168ce9cecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207560
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-03 22:25:43 +02:00
Xisco Fauli 00aebb5e88 loplugin:unusedmethods
Change-Id: I5eec1b68efc285995db3b5825699c07fa006cb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207375
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 10:16:53 +02:00
Andras Timar 7b5ddd9311 vcl: strip alpha in Bitmap::Convert(N24Bit) for 32-bit-with-alpha sources
Convert(BmpConversion::N24Bit) returned true without touching the
bitmap when the source bit count was already >= 24, so a
32-bit-with-alpha bitmap kept its alpha channel. Callers that rely on
Convert(N24Bit) to strip alpha (e.g. the PDF/A transparency-removal
path in vcl/source/outdev/transparent.cxx) then handed an alpha
bitmap to MetaBmpScaleAction, tripping its
!HasAlpha() assertion in dbgutil builds.

Triggered in CPLinux-LOKit builds (--enable-cairo-rgba, --disable-poppler)
where pdfium-rendered PDF imports produce N32BitTcRgba bitmaps; on
PDF/A-1 re-export the transparency-removal path then crashes in
testTdf136805.

Force re-encode via ImplConvertUp(N24_BPP) when HasAlpha() is set so
the alpha channel is actually dropped.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7320c5f5a873b23d4413e3183cd6ff45d9e26e08
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1233
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit cba855cd11cda78531d486279330a73133ac7151)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207026
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-21 17:04:21 +02:00
Noel Grandin 6729212420 speedup BitmapScaleConvolutionFilter for 32-bit data
which shows up on a perf graph when exporting PDF files.

We can avoid the expensive unpremultiply/premultiply that
happens here.

Change-Id: I45fc19de86415ba0c010040a23affba66af6c75a
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4185
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 6c7f68c910515a711c1731bb7c0b730433aa249d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206468
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-14 10:24:59 +02:00
Noel Grandin f87c623b4e lsan:fix leak in CairoPixelProcessor2D::getOrCreateCairoSurfaceHelper
shows up when running CppunitTest_sc_shapetest

probably from the recent changes here, when calling tryToGetCairoSurface.

Rather than doing explicit cleanup, lets follow the same path used in
  include/vcl/cairo.hxx
and pass around a shared_ptr that makes cleanup automatic.

Change-Id: I1bec6f579af182b259cb0edbd86192627e5c61ea
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1858
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 70966239f816d81cb9dcb208e7c02e08339da28c)
(cherry picked from commit ee2349dba8aa282e30ae65cbf5ffbb27b707e0ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205990
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-05 08:43:09 +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
Tomaž Vajngerl 6dedee5936 vcl: simplify 2 horiz. and vert. functions into 1 in stack blur impl.
Makes the code simpler and should still perform the same.

Change-Id: I17854eaf06770933fdd6122863aa5415bc52c7a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199920
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 2ef907868db1b57e64ac7f9cda1396b6f39b0fe9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205382
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-20 13:39:56 +02:00
Tomaž Vajngerl 1ec0e418da sc: Fix bug in stack blur algorithm
In RGB case we only multiplied the first component instead of all.
This introduces mulAndAdd function to multiply each component with
the constant and adds to the array for each component. This should
fix the issue. The add() function that takes a constant was
removed.

Change-Id: I7e2620f643b49498a69437e4b572f9417f1ef6af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199919
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit b90d690da8086ec91b279ec6987a231b0775d24e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205381
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-20 12:15:09 +02:00
Bianca Militaru a054f0d59c tdf#163691: Use std::copy() instead of memcpy()
Change-Id: I463beed29a6eec615d7ed1cae58b47eb1f954f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204991
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-15 16:26:33 +02:00
Asim Raza d24a02e149 tdf#163691 Use std::copy_n() instead of memcpy() in vcl
Replace memcpy() with std::copy_n() in Vectorizer.cxx, edit.cxx,
field2.cxx and imivctl2.cxx to improve type safety by eliminating
manual sizeof() calculations.

Change-Id: I8de107beb8ee4a4c5716a9b3c3540045027479c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204361
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-27 09:26:58 +02:00
Noel Grandin e77b23fa1c Fraction->double in MapMode
Change-Id: I865fe1c2b0377eebda6f9f19e163928cbe7c9056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202631
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-26 13:23:37 +01:00
Noel Grandin 9e5cdca053 Start process of converting MapMode from Fraction to double
add constructor and setters

Change-Id: I1ea8d0b5ac2e2f49e658247d4a21ed80457c68ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-24 19:57:43 +01:00
Michael Weghorn f60f26f16d vcl: Reuse existing GetSalInstance
Replace various `ImplGetSVData()->mpDefInst` by
using the existing GetSalInstance function that
returns exactly that.

Change-Id: Idef8bbdf67888dbfae1f3796428a41ccc8606d27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-02-28 09:09:53 +01:00
Stephan Bergmann 19aac4ff39 missing includes
Change-Id: I5bc8b92caf4c55939dcdc4591f2c0e7b372ddad0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198814
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-06 14:46:46 +01:00
Gabor Kelemen 50a7ed2138 Fix some non self contained headers in module vcl
Change-Id: I2bbfd2034333277d7e1e776b5e802c2de9384eb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196640
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-22 23:05:15 +01:00
Noel Grandin 0c1df806d9 tdf#169934 Transparency is lost when applying a duotone filter
regression from
  commit df4873973e
  Author: Noel Grandin <noelgrandin@gmail.com>
  Date:   Wed Aug 27 20:25:54 2025 +0200
  simplify Graphic::applyDuotone

Change-Id: I69a3da35b53355488c2d6a1f1288048d4096bc6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197298
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-15 07:06:59 +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
Christopher Sherlock 0e4a404e9a vcl: make it more clear that convertToBPP() is a local function
Change-Id: Icbc5895d352ebefc1355b8e73e0586b144f3ba32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195741
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-01-12 12:59:55 +01:00
Gabor Kelemen 4a9c718382 tdf#146619 Use more forward declarations in include/vcl/[a-c]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[a-c]*

Change-Id: Ib54f3eb80d6575d6a120fedbdbd9e1ad77b229ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196394
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-06 10:02:26 +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
Andras Timar 66e99dae35 tdf#169871 fix wrong application of color mask
nV5RedMask, nV5GreenMask and nV5BlueMask are valid only
when used with 16-bpp or 32-bpp bitmap and the bitmap is
not compressed.

Change-Id: Ic6ca1364a12f9bc11d789e317428cd9c3e144873
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195209
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2025-12-08 13:31:29 +01:00
Noel Grandin 074bdd6962 tdf#168721 Fade in animation on grouped shapes not shown
There is definitely a better fix for this, we should not need two
different bitmaps and masking and stuff, but this will fix the problem for now.

Mostly revert the following commits:

commit 7278030b92
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Mon Sep 15 16:26:25 2025 +0200
remove unused DrawModeFlags

commit 581c52dad2
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Wed Sep 10 15:08:04 2025 +0200
BitmapAlphaClampFilter is dead since

commit e7b460f919
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Sat Aug 30 15:23:11 2025 +0200
BitmapEx->Bitmap in canvas

Change-Id: Ic5747ce6143a8320f977111c7635bf736a9996d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193873
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-13 06:57:13 +01:00
Christopher Sherlock e3ea978616 vcl: remove OutputDevice::DrawBitmapEx()
This also streamlines DrawBitmapWallpaper()

Change-Id: I694667147319ba9d235348068ed8fc811447fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190898
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-11-11 07:16:00 +01:00
Mike Kaganski bc1323e897 Simplify a bit
BitmapScopedReadAccess may be scoped to the `if`, and then it doesn't
need explicit reset.

The inner `if` can be deduplicated, which IMO improves clarity.

Change-Id: I002d3353bc12ab42095122c65c85a2b839d543fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193660
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-09 16:08:12 +01:00
Armin Le Grand (allotropia) d2accdad4b reduce memory usage when rendering cairo-backed Bitmaps
Change-Id: I1353e8fb044203b377c2a1f17767f690a9796367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-10-25 09:30:35 +02:00
Noel Grandin ebea2a0af7 tdf#168635 Not taking into account transparency in images
regression from
    commit e2b2eec732
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Sat Aug 2 11:07:19 2025 +0200
    BitmapEx->Bitmap in AddonsOptions

But not really, because it just exposed that our code
in BitmapScaleConvolutionFilter did not handle alpha images properly

Change-Id: I3de9b293a92a499475f034d33bdeecd2d62891cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-10-06 14:53:07 +02:00
Caolán McNamara f27daa7b39 cid#1666319 Division or modulo by float zero
Change-Id: I3babfb373fe6c3b5b3738c9d70368b236efd4d20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191285
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-21 15:51:04 +02:00
Noel Grandin e565a0d634 tdf#168392 Disappearing image fill at lower zoom
regression from
  commit cd93f83bbc
  Author: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
  Date:   Thu Aug 7 21:02:41 2025 +0200
  tdf#167831 avoid painting bitmap data with zero dimensions

we cannot skip these fills if the fill bitmap is too small,
we need to fill with something or the resulting picture
is very wrong

Change-Id: I194b59414db8f675df2415c3ee4fb9a0305611b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190981
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-19 16:56:24 +02:00
Noel Grandin 581c52dad2 BitmapAlphaClampFilter is dead since
since
    commit e7b460f919
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Sat Aug 30 15:23:11 2025 +0200
    BitmapEx->Bitmap in canvas

Change-Id: Ie156403a9e7e8dc7cd1299b16a96db52b76e9607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190763
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-10 21:19:03 +02:00
Noel Grandin a80777836b tdf#168303 Option button has a rectangular border around it
regression from
    commit 8126025906
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Sat Aug 9 19:29:08 2025 +0200
    BitmapEx->Bitmap in various icons

The old BitmapEx::Replace methods had the odd behaviour that
they left the alpha layer alone, so we need to replicate that
in Bitmap::Replace

Change-Id: Ic304178fb9a45750a887bee2493546bc497eeb06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190649
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-08 11:41:27 +02:00
Noel Grandin 409eae8b72 SalBitmap::Replace is not implemented by any backend
so just remove it and use the fallback

Change-Id: I980f67b31f22c731eb966408b58ce95477a9573d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190650
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-08 11:08:56 +02:00
Andrea Gelmini f731ab6320 Remove duplicated includes
Change-Id: I4995bf584ca1a4f6ad9a69dd5d93e56cbc990fe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190644
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-09-07 23:20:00 +02:00
Noel Grandin 6d020f728b fix BmpConversion::N32Bit
otherwise the conversion might be skipped if we currently
have a scanline format with 32-bits and no alpha

Change-Id: I89e107755e61c1b3fbe8aaabe988f1e6d62992db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190631
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-06 18:43:37 +02:00
Noel Grandin ea3eefae42 improve assert in Bitmap::SplitIntoColorAndAlpha
N32_BPP does not necessary mean that we have an alpha channel

Change-Id: Ib68a3a03325af19f8befe46fa045bbfad22f2db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190630
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-06 16:30:59 +02:00
Caolán McNamara 0c72ae925e cid#1665283 Variable copied when it could be moved
and

cid#1665282 Variable copied when it could be moved
cid#1665279 Variable copied when it could be moved
cid#1665278 Variable copied when it could be moved
cid#1665276 Variable copied when it could be moved
cid#1665275 Variable copied when it could be moved
cid#1665257 Variable copied when it could be moved

Change-Id: I222860c6385693610b95f4d674d4d0da59e75a5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190635
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-06 12:36:30 +02:00
Noel Grandin 0e451f54c0 remove dead code
we dont use 1-bit format internally anymore

Change-Id: If6f6a6ec6a21507b68d24ce577b3f0600409cb3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190628
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-06 12:06:16 +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
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 a65a224c2b use less BitmapEx in Bitmap
we want Bitmap to be independant of BitmapEx

Change-Id: I47dc1e62f5575a75fd2e9e78085146b079c49187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190616
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-05 16:55:12 +02:00