[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - include/vcl sw/qa vcl/inc
Caolán McNamara
caolanm at redhat.com
Thu Jul 21 15:54:33 UTC 2016
include/vcl/salbtype.hxx | 5 +++++
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 +-
vcl/inc/salbmp.hxx | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit a6e3f11f74959c1e756acb8a8f223075fcb43391
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 18 15:09:57 2016 +0100
Resolves: tdf#100731 include palette in checksum
Change-Id: I084d840b9fa078ebea3ff1471d8c8bc88171abc7
(cherry picked from commit 8624d2c8e3be89c794d3cfcfb72685fcb18e4d24)
Reviewed-on: https://gerrit.libreoffice.org/27291
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 7238e02..513827a 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -23,6 +23,7 @@
#include <string.h>
#include <stdlib.h>
#include <tools/debug.hxx>
+#include <vcl/checksum.hxx>
#include <vcl/salgtype.hxx>
#include <tools/color.hxx>
#include <tools/helpers.hxx>
@@ -152,6 +153,10 @@ public:
SAL_DLLPRIVATE inline BitmapColor* ImplGetColorBuffer() const;
+ BitmapChecksum GetChecksum() const
+ {
+ return vcl_get_checksum(0, mpBitmapColor, mnCount * sizeof(BitmapColor));
+ }
public:
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index f29304f..8b7de50 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -778,7 +778,7 @@ DECLARE_OOXMLIMPORT_TEST(testN777345, "n777345.docx")
Graphic aGraphic(xGraphic);
// If this changes later, feel free to update it, but make sure it's not
// the checksum of a white/transparent placeholder rectangle.
- CPPUNIT_ASSERT_EQUAL(BitmapChecksum(SAL_CONST_UINT64(12149824012634930130)), aGraphic.GetChecksum());
+ CPPUNIT_ASSERT_EQUAL(BitmapChecksum(SAL_CONST_UINT64(18203404956065762943)), aGraphic.GetChecksum());
#endif
}
diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx
index b345257..69d2539 100644
--- a/vcl/inc/salbmp.hxx
+++ b/vcl/inc/salbmp.hxx
@@ -103,7 +103,8 @@ protected:
BitmapBuffer* pBuf = pThis->AcquireBuffer(BitmapAccessMode::Read);
if (pBuf)
{
- nCrc = vcl_get_checksum(0, pBuf->mpBits, pBuf->mnScanlineSize * pBuf->mnHeight);
+ nCrc = pBuf->maPalette.GetChecksum();
+ nCrc = vcl_get_checksum(nCrc, pBuf->mpBits, pBuf->mnScanlineSize * pBuf->mnHeight);
pThis->ReleaseBuffer(pBuf, BitmapAccessMode::Read);
pThis->mnChecksum = nCrc;
pThis->mbChecksumValid = true;
More information about the Libreoffice-commits
mailing list