vcl/source/bitmap/bitmap.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit 379228d627845f669767b59967f1a13327b83224 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jun 28 13:23:46 2019 +0200 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Mon Jul 1 13:38:21 2019 +0200
tdf#125873 Selected border color preview isn't shown Regression from commit 319c57d2af5d26d3910db4b02dca145d8881af tdf#120837 File saving at least 5 times slower which made BitmapEx::operator== rely more heavily on Bitmap::operator==, which in turn relies on the platform-specific SalBitmap subclass to calculate a checksum, which was not happening with WinSalBitmap. Consequently, make Bitmap::operator== more robust by returning false if either of the underlying bitmaps cannot generate a checksum Change-Id: Iad8a4ce19544839a6303f0e8d006b138c2d75a31 Reviewed-on: https://gerrit.libreoffice.org/74834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit e73e7eacaeaa0b0eaccd3fdd25e10f0ed0d99779) Reviewed-on: https://gerrit.libreoffice.org/74892 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index bf391f339750..cfaad6c7faf6 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -241,6 +241,9 @@ bool Bitmap::operator==( const Bitmap& rBmp ) const BitmapChecksum aChecksum1, aChecksum2; rBmp.mxSalBmp->GetChecksum(aChecksum1); mxSalBmp->GetChecksum(aChecksum2); + // If the bitmaps can't calculate a checksum, best to regard them as different. + if (aChecksum1 == 0 || aChecksum2 == 0) + return false; return aChecksum1 == aChecksum2; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits