tdf#93532 - adapt CRC methods to use SalChecksum type and extend precision.

Change-Id: Ie303e645a065604d75b7ea886c5b53863521ddd0
diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx
index 13cf4f8..62e0e34 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 @@
 
     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 2ef68e7..8c74445 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -88,7 +88,7 @@
                         { return !( *this == rAnimBmp ); }
 
 
-    sal_uLong       GetChecksum() const;
+    SalChecksum     GetChecksum() const;
 };
 
 struct AInfo
@@ -162,7 +162,7 @@
     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 124ddbe..109b30e 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 @@
     */
     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 0937f0b..69b7432 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -91,7 +91,7 @@
 
     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 197d795f..491fad5 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -190,7 +190,7 @@
     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 7e01040..8b27c3f 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -158,9 +158,9 @@
     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 c7b573e..d90d95b 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -134,6 +134,7 @@
     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 3b27e39..5d5adfe 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -749,7 +749,7 @@
     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 9dd483a..69faad9 100644
--- a/vcl/inc/impbmp.hxx
+++ b/vcl/inc/impbmp.hxx
@@ -69,7 +69,7 @@
     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 6baed71..c30f483 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -145,7 +145,7 @@
     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 bd03f54..9014b53 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 @@
     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;