From 30febe5fc4ac3117ff5dabcd1fec4acfc7b759d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 16 Aug 2023 15:04:58 +0100 Subject: [PATCH] cool#6616 compare graphics for equality with operator==... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit instead of checking equal CheckSums. For better or worse while Bitmap::operator== also considers equal CheckSums as equal Bitmaps operator== can quickly return true if both Bitmaps share the same underlying SalBitmap which is nearly always true in the example here Change-Id: I6b5cd484aeef7505721a493a3bff23ee345147dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155740 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- filter/source/svg/svgwriter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 4f21f0493b06..62aa05115fbb 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2916,7 +2916,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, if (aGraphic.GetType() == GraphicType::Bitmap) { const BitmapEx& rGraphicBitmap = aGraphic.GetBitmapExRef(); - if (rGraphicBitmap.GetChecksum() == rBmpEx.GetChecksum()) + if (rGraphicBitmap == rBmpEx) { bool bPNG = false; GfxLink aGfxLink = aGraphic.GetGfxLink();