include/vcl/checksum.hxx | 5 ++--- sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 +- vcl/inc/salbmp.hxx | 10 +++++----- vcl/opengl/salbmp.cxx | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-)
New commits: commit e8c983e47fa993d32ffff02bd62e735c53cf6c80 Author: Marco Cecchetti <marco.cecche...@collabora.com> Date: Fri Aug 28 15:35:43 2015 +0200 switch to 64-bit checksum: now BitmapChecksum is a sal_uInt64 Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: Ied43bf626be82c0e7f6c62e965d0704fc645ac19 diff --git a/include/vcl/checksum.hxx b/include/vcl/checksum.hxx index 83facef..6efb4ac 100644 --- a/include/vcl/checksum.hxx +++ b/include/vcl/checksum.hxx @@ -125,11 +125,10 @@ static const sal_uInt64 vcl_crc64Table[256] = { 0x29b7d047efec8728ULL }; -#define BITMAP_CHECKSUM_SIZE 4 +#define BITMAP_CHECKSUM_SIZE 8 #define BITMAP_CHECKSUM_BITS BOOST_PP_MUL(BITMAP_CHECKSUM_SIZE, 8) -typedef sal_uLong BitmapChecksum; - +typedef sal_uInt64 BitmapChecksum; typedef sal_uInt8 BitmapChecksumOctetArray[BITMAP_CHECKSUM_SIZE]; #define BITMAP_CHECKSUM_SET_OCTET(z, i, unused) \ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 6bd8269..0c2900f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -750,7 +750,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(sal_uLong(1256330431U), aGraphic.GetChecksum()); + CPPUNIT_ASSERT_EQUAL(BitmapChecksum(3652741777587093783), aGraphic.GetChecksum()); #endif } commit 38499e232728d108a849949a62422b000d2ce2a0 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu Aug 27 21:28:48 2015 +0100 CRC is an integer type -> mnChecksum. Change-Id: I9e4d36105a59c5f81677d8e062106dae6f709464 diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index 26a0b6f..89846b1 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -73,7 +73,7 @@ public: { updateChecksum(); assert(mbChecksumValid); - rChecksum = maChecksum; + rChecksum = mnChecksum; return mbChecksumValid; } @@ -83,8 +83,8 @@ public: } protected: - ChecksumType maChecksum; - bool mbChecksumValid; + ChecksumType mnChecksum; + bool mbChecksumValid; protected: virtual void updateChecksum() const @@ -99,7 +99,7 @@ protected: { nCrc = vcl_get_checksum(0, pBuf->mpBits, pBuf->mnScanlineSize * pBuf->mnHeight); pThis->ReleaseBuffer(pBuf, BITMAP_READ_ACCESS); - pThis->maChecksum = nCrc; + pThis->mnChecksum = nCrc; pThis->mbChecksumValid = true; } else diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 4c42a7a..fae994f 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -594,7 +594,7 @@ void OpenGLSalBitmap::updateChecksum() const pThis->CreateTexture(); } - pThis->mbChecksumValid = calcChecksumGL(pThis->maTexture, pThis->maChecksum); + pThis->mbChecksumValid = calcChecksumGL(pThis->maTexture, pThis->mnChecksum); } OpenGLContext* OpenGLSalBitmap::GetBitmapContext() commit f4994b11da0bb3938194efb38d341caea3cb55c9 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu Aug 27 21:27:16 2015 +0100 squash into Marco's commit. g Conflicts: vcl/inc/salbmp.hxx Change-Id: I57d1e4b8e4909ce0b82c9e61ca271768cc73cd8b diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index 40ec937..26a0b6f 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -97,8 +97,8 @@ protected: BitmapBuffer* pBuf = pThis->AcquireBuffer(BITMAP_READ_ACCESS); if (pBuf) { - pThis->ReleaseBuffer(pBuf, BITMAP_READ_ACCESS); nCrc = vcl_get_checksum(0, pBuf->mpBits, pBuf->mnScanlineSize * pBuf->mnHeight); + pThis->ReleaseBuffer(pBuf, BITMAP_READ_ACCESS); pThis->maChecksum = nCrc; pThis->mbChecksumValid = true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits