summaryrefslogtreecommitdiff
path: root/package/source/zipapi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-15 16:08:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-15 16:08:46 +0000
commitdcfc99705f958114e9b28aeb58b8081b58a32a6a (patch)
treea208d70ee7fe6d544aeab0f9f1641302f0d25557 /package/source/zipapi
parent372a0d505c722fd8b39cf4f65487e7f08049896b (diff)
use sal crc32 and skip cast frenzy
Diffstat (limited to 'package/source/zipapi')
-rw-r--r--package/source/zipapi/CRC32.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/package/source/zipapi/CRC32.cxx b/package/source/zipapi/CRC32.cxx
index 5c5dedce8756..274fb58d6184 100644
--- a/package/source/zipapi/CRC32.cxx
+++ b/package/source/zipapi/CRC32.cxx
@@ -27,14 +27,8 @@
************************************************************************/
#include <CRC32.hxx>
-#ifndef _ZLIB_H
-#ifdef SYSTEM_ZLIB
-#include <zlib.h>
-#else
-#include <external/zlib/zlib.h>
-#endif
-#endif
#include <PackageConstants.hxx>
+#include <rtl/crc.h>
#include <com/sun/star/io/XInputStream.hpp>
using namespace com::sun::star::uno;
@@ -67,14 +61,14 @@ void SAL_CALL CRC32::updateSegment(const Sequence< sal_Int8 > &b,
sal_Int32 len)
throw(RuntimeException)
{
- nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray()+off, len );
+ nCRC = rtl_crc32(nCRC, b.getConstArray()+off, len );
}
/** Update CRC32 with specified sequence of bytes
*/
void SAL_CALL CRC32::update(const Sequence< sal_Int8 > &b)
throw(RuntimeException)
{
- nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray(),b.getLength());
+ nCRC = rtl_crc32(nCRC, b.getConstArray(),b.getLength());
}
sal_Int32 SAL_CALL CRC32::updateStream( Reference < XInputStream > & xStream )