summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-27 21:50:15 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-27 21:50:15 +0100
commita5f9e5d7e32ef5320fec3bf16baf9f0ce1ef63db (patch)
treec4ca543c164d36961e067c93c6b70d624f8ee51c
parentFixup type names - squash into Marco's commit. (diff)
downloadcore-private/mmeeks/bitmapcrc64.tar.gz
core-private/mmeeks/bitmapcrc64.zip
tdf#93532 - adapt CRC methods to use SalChecksum type and extend precision. private/mmeeks/bitmapcrc64
Change-Id: Ie303e645a065604d75b7ea886c5b53863521ddd0
-rw-r--r--include/vcl/alpha.hxx3
-rw-r--r--include/vcl/animate.hxx4
-rw-r--r--include/vcl/bitmap.hxx3
-rw-r--r--include/vcl/bitmapex.hxx2
-rw-r--r--include/vcl/gdimtf.hxx2
-rw-r--r--include/vcl/graph.hxx4
-rw-r--r--svtools/source/graphic/grfcache.cxx1
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx2
-rw-r--r--vcl/inc/impbmp.hxx2
-rw-r--r--vcl/inc/impgraph.hxx2
-rw-r--r--vcl/source/gdi/animate.cxx33
11 files changed, 30 insertions, 28 deletions
diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx
index 13cf4f873e0b..62e0e349db33 100644
--- a/include/vcl/alpha.hxx
+++ b/include/vcl/alpha.hxx
@@ -23,7 +23,6 @@
#include <vcl/dllapi.h>
#include <vcl/bitmap.hxx>
-
class ImageList;
class BitmapEx;
@@ -49,7 +48,7 @@ public:
Size GetSizePixel() const { return Bitmap::GetSizePixel(); }
- sal_uLong GetChecksum() const { return Bitmap::GetChecksum(); }
+ ::SalChecksum GetChecksum() const { return Bitmap::GetChecksum(); }
Bitmap GetBitmap() const;
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 2ef68e723fa1..8c74445478d7 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -88,7 +88,7 @@ struct VCL_DLLPUBLIC AnimationBitmap
{ return !( *this == rAnimBmp ); }
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
};
struct AInfo
@@ -162,7 +162,7 @@ public:
void Replace( const AnimationBitmap& rNewAnimationBmp, sal_uInt16 nAnimation );
sal_uLong GetSizeBytes() const;
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
public:
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 124ddbedc1cf..109b30e667ec 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -24,6 +24,7 @@
#include <tools/link.hxx>
#include <tools/solar.h>
#include <vcl/dllapi.h>
+#include <vcl/salgtype.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/region.hxx>
#include <vcl/scopedbitmapaccess.hxx>
@@ -289,7 +290,7 @@ public:
*/
bool GetSystemData( BitmapSystemData& rData ) const;
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
Bitmap CreateDisplayBitmap( OutputDevice* pDisplay );
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 0937f0bb05d3..69b743298fd7 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -91,7 +91,7 @@ public:
sal_uInt16 GetBitCount() const { return aBitmap.GetBitCount(); }
sal_uLong GetSizeBytes() const;
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
public:
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 197d795fa122..491fad503637 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -190,7 +190,7 @@ public:
void SetPrefMapMode( const MapMode& rMapMode ) { aPrefMapMode = rMapMode; }
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
sal_uLong GetSizeBytes() const;
// Methods for reading and writing the new formats;
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 7e0104055dbc..8b27c3f9d0d6 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -158,9 +158,9 @@ public:
void SetAnimationNotifyHdl( const Link<>& rLink );
Link<> GetAnimationNotifyHdl() const;
- sal_uLong GetAnimationLoopCount() const;
+ sal_uLong GetAnimationLoopCount() const;
- sal_uLong GetChecksum() const;
+ SalChecksum GetChecksum() const;
public:
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index c7b573e772fb..d90d95bac4ae 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -134,6 +134,7 @@ OString GraphicID::GetIDString() const
for( nShift = 28; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID3 >> (sal_uInt32) nShift ) & 0xf ];
+#error update me ...
for( nShift = 28; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID4 >> (sal_uInt32) nShift ) & 0xf ];
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3b27e3993403..5d5adfe2c916 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -749,7 +749,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(sal_uInt64(1256330431U), aGraphic.GetChecksum());
#endif
}
diff --git a/vcl/inc/impbmp.hxx b/vcl/inc/impbmp.hxx
index 9dd483a8a7f1..69faad9981c8 100644
--- a/vcl/inc/impbmp.hxx
+++ b/vcl/inc/impbmp.hxx
@@ -69,7 +69,7 @@ public:
void ImplIncRefCount() { mnRefCount++; }
void ImplDecRefCount() { mnRefCount--; }
- sal_uLong ImplGetChecksum() const;
+ SalChecksum ImplGetChecksum() const;
void ImplInvalidateChecksum();
bool ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag );
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 6baed716244b..c30f48394020 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -145,7 +145,7 @@ private:
GfxLink ImplGetLink();
bool ImplIsLink() const;
- sal_uLong ImplGetChecksum() const;
+ SalChecksum ImplGetChecksum() const;
bool ImplExportNative( SvStream& rOStm ) const;
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index bd03f5423c5f..9014b5338021 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -25,37 +25,38 @@
#include <vcl/window.hxx>
#include <impanmvw.hxx>
#include <vcl/dibtools.hxx>
+#include "checksum.hxx"
#define MIN_TIMEOUT 2L
#define INC_TIMEOUT 0L
sal_uLong Animation::mnAnimCount = 0UL;
-sal_uLong AnimationBitmap::GetChecksum() const
+SalChecksum AnimationBitmap::GetChecksum() const
{
- sal_uInt32 nCrc = aBmpEx.GetChecksum();
+ SalChecksum nCrc = aBmpEx.GetChecksum();
SVBT32 aBT32;
UInt32ToSVBT32( aPosPix.X(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( aPosPix.Y(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( aSizePix.Width(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( aSizePix.Height(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( (long) nWait, aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( (long) eDisposal, aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( (long) bUserInput, aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
return nCrc;
}
@@ -206,27 +207,27 @@ sal_uLong Animation::GetSizeBytes() const
return nSizeBytes;
}
-sal_uLong Animation::GetChecksum() const
+SalChecksum Animation::GetChecksum() const
{
SVBT32 aBT32;
- sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
+ SalChecksum nCrc = GetBitmapEx().GetChecksum();
UInt32ToSVBT32( maList.size(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( maGlobalSize.Width(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( maGlobalSize.Height(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
UInt32ToSVBT32( (long) meCycleMode, aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
for( size_t i = 0, nCount = maList.size(); i < nCount; i++ )
{
UInt32ToSVBT32( maList[ i ]->GetChecksum(), aBT32 );
- nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ nCrc = vcl_crc64( nCrc, aBT32, 4 );
}
return nCrc;