diff options
Diffstat (limited to 'package/source/zipapi')
-rw-r--r-- | package/source/zipapi/ByteChucker.cxx | 6 | ||||
-rw-r--r-- | package/source/zipapi/ByteGrabber.cxx | 30 | ||||
-rw-r--r-- | package/source/zipapi/CRC32.cxx | 10 | ||||
-rw-r--r-- | package/source/zipapi/Deflater.cxx | 26 | ||||
-rw-r--r-- | package/source/zipapi/EntryInputStream.cxx | 26 | ||||
-rw-r--r-- | package/source/zipapi/EntryInputStream.hxx | 24 | ||||
-rw-r--r-- | package/source/zipapi/Inflater.cxx | 12 | ||||
-rw-r--r-- | package/source/zipapi/MemoryByteGrabber.hxx | 28 | ||||
-rw-r--r-- | package/source/zipapi/XMemoryStream.cxx | 14 | ||||
-rw-r--r-- | package/source/zipapi/XMemoryStream.hxx | 4 | ||||
-rw-r--r-- | package/source/zipapi/XUnbufferedStream.hxx | 6 | ||||
-rw-r--r-- | package/source/zipapi/ZipEnumeration.cxx | 2 | ||||
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 6 | ||||
-rw-r--r-- | package/source/zipapi/ZipOutputStream.cxx | 28 |
14 files changed, 111 insertions, 111 deletions
diff --git a/package/source/zipapi/ByteChucker.cxx b/package/source/zipapi/ByteChucker.cxx index 8ff31dc49926..73025fe12515 100644 --- a/package/source/zipapi/ByteChucker.cxx +++ b/package/source/zipapi/ByteChucker.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; ByteChucker::ByteChucker(Reference<XOutputStream> xOstream) -: xStream(xOstream) +: xStream(xOstream) , xSeek (xOstream, UNO_QUERY ) , a1Sequence ( 1 ) , a2Sequence ( 2 ) @@ -59,7 +59,7 @@ void ByteChucker::WriteBytes( const Sequence< sal_Int8 >& aData ) xStream->writeBytes(aData); } -sal_Int64 ByteChucker::GetPosition( ) +sal_Int64 ByteChucker::GetPosition( ) throw(IOException, RuntimeException) { return xSeek->getPosition(); diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx index 50546707d54e..34bd9a7ac827 100644 --- a/package/source/zipapi/ByteGrabber.cxx +++ b/package/source/zipapi/ByteGrabber.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ using namespace ::com::sun::star; */ ByteGrabber::ByteGrabber(uno::Reference < io::XInputStream > xIstream) -: xStream(xIstream) +: xStream(xIstream) , xSeek (xIstream, uno::UNO_QUERY ) , aSequence ( 4 ) { @@ -58,8 +58,8 @@ void ByteGrabber::setInputStream (uno::Reference < io::XInputStream > xNewStream } // XInputStream chained -sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, - sal_Int32 nBytesToRead ) +sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, + sal_Int32 nBytesToRead ) throw(io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -67,7 +67,7 @@ sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, } // XSeekable chained... -sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) +sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) throw(lang::IllegalArgumentException, io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -80,12 +80,12 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) location = nLen; xSeek->seek( location ); return location; - } + } else throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } -sal_Int64 SAL_CALL ByteGrabber::getPosition( ) +sal_Int64 SAL_CALL ByteGrabber::getPosition( ) throw(io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -123,8 +123,8 @@ ByteGrabber& ByteGrabber::operator >> (sal_Int16& rInt16) else { pSequence = aSequence.getConstArray(); - rInt16 = static_cast <sal_Int16> - ( (pSequence[0] & 0xFF) + rInt16 = static_cast <sal_Int16> + ( (pSequence[0] & 0xFF) | (pSequence[1] & 0xFF) << 8); } return *this; @@ -139,9 +139,9 @@ ByteGrabber& ByteGrabber::operator >> (sal_Int32& rInt32) else { pSequence = aSequence.getConstArray(); - rInt32 = static_cast < sal_Int32 > + rInt32 = static_cast < sal_Int32 > ( (pSequence[0] & 0xFF) - | ( pSequence[1] & 0xFF ) << 8 + | ( pSequence[1] & 0xFF ) << 8 | ( pSequence[2] & 0xFF ) << 16 | ( pSequence[3] & 0xFF ) << 24 ); } @@ -167,8 +167,8 @@ ByteGrabber& ByteGrabber::operator >> (sal_uInt16& rInt16) else { pSequence = aSequence.getConstArray(); - rInt16 = static_cast <sal_uInt16> - ( (pSequence[0] & 0xFF) + rInt16 = static_cast <sal_uInt16> + ( (pSequence[0] & 0xFF) | (pSequence[1] & 0xFF) << 8); } return *this; @@ -182,9 +182,9 @@ ByteGrabber& ByteGrabber::operator >> (sal_uInt32& ruInt32) else { pSequence = aSequence.getConstArray(); - ruInt32 = static_cast < sal_uInt32 > + ruInt32 = static_cast < sal_uInt32 > ( (pSequence[0] & 0xFF) - | ( pSequence[1] & 0xFF ) << 8 + | ( pSequence[1] & 0xFF ) << 8 | ( pSequence[2] & 0xFF ) << 16 | ( pSequence[3] & 0xFF ) << 24 ); } diff --git a/package/source/zipapi/CRC32.cxx b/package/source/zipapi/CRC32.cxx index 9334831ea30c..6e15614bf67c 100644 --- a/package/source/zipapi/CRC32.cxx +++ b/package/source/zipapi/CRC32.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,10 +48,10 @@ using namespace com::sun::star::io; CRC32::CRC32() : nCRC(0) -{ +{ } CRC32::~CRC32() -{ +{ } void SAL_CALL CRC32::reset() throw(RuntimeException) @@ -65,8 +65,8 @@ sal_Int32 SAL_CALL CRC32::getValue() } /** Update CRC32 with specified sequence of bytes */ -void SAL_CALL CRC32::updateSegment(const Sequence< sal_Int8 > &b, - sal_Int32 off, +void SAL_CALL CRC32::updateSegment(const Sequence< sal_Int8 > &b, + sal_Int32 off, sal_Int32 len) throw(RuntimeException) { diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx index b2c1edb07cbc..a0005f5fe973 100644 --- a/package/source/zipapi/Deflater.cxx +++ b/package/source/zipapi/Deflater.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ using namespace com::sun::star; Deflater::~Deflater(void) { - end(); + end(); } void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, sal_Bool bNowrap) { @@ -142,15 +142,15 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int } } -void SAL_CALL Deflater::setInputSegment( const uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) +void SAL_CALL Deflater::setInputSegment( const uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) { OSL_ASSERT( !(nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength())); - + sInBuffer = rBuffer; nOffset = nNewOffset; nLength = nNewLength; } -void SAL_CALL Deflater::setLevel( sal_Int32 nNewLevel ) +void SAL_CALL Deflater::setLevel( sal_Int32 nNewLevel ) { if ((nNewLevel < 0 || nNewLevel > 9) && nNewLevel != DEFAULT_COMPRESSION) { @@ -162,32 +162,32 @@ void SAL_CALL Deflater::setLevel( sal_Int32 nNewLevel ) bSetParams = sal_True; } } -sal_Bool SAL_CALL Deflater::needsInput( ) +sal_Bool SAL_CALL Deflater::needsInput( ) { return nLength <=0; } -void SAL_CALL Deflater::finish( ) +void SAL_CALL Deflater::finish( ) { bFinish = sal_True; } -sal_Bool SAL_CALL Deflater::finished( ) +sal_Bool SAL_CALL Deflater::finished( ) { return bFinished; } -sal_Int32 SAL_CALL Deflater::doDeflateSegment( uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) +sal_Int32 SAL_CALL Deflater::doDeflateSegment( uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) { OSL_ASSERT( !(nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength())); return doDeflateBytes(rBuffer, nNewOffset, nNewLength); } -sal_Int32 SAL_CALL Deflater::getTotalIn( ) +sal_Int32 SAL_CALL Deflater::getTotalIn( ) { return pStream->total_in; } -sal_Int32 SAL_CALL Deflater::getTotalOut( ) +sal_Int32 SAL_CALL Deflater::getTotalOut( ) { return pStream->total_out; } -void SAL_CALL Deflater::reset( ) +void SAL_CALL Deflater::reset( ) { #ifdef SYSTEM_ZLIB deflateReset(pStream); @@ -198,7 +198,7 @@ void SAL_CALL Deflater::reset( ) bFinished = sal_False; nOffset = nLength = 0; } -void SAL_CALL Deflater::end( ) +void SAL_CALL Deflater::end( ) { if (pStream != NULL) { diff --git a/package/source/zipapi/EntryInputStream.cxx b/package/source/zipapi/EntryInputStream.cxx index cd43622ea8ac..eb89646916e4 100644 --- a/package/source/zipapi/EntryInputStream.cxx +++ b/package/source/zipapi/EntryInputStream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::packages::zip; using namespace com::sun::star::packages::zip::ZipConstants; -/** Provides access to the compressed data in a zipfile. +/** Provides access to the compressed data in a zipfile. * * 04/12/00 - uncompresses the stream into memory and seeks on it 'in memory' * This and the ZipPackageBuffer used in the ZipOutputStream are memory hogs @@ -51,7 +51,7 @@ using namespace com::sun::star::packages::zip::ZipConstants; * seek to it before performing any reads. */ -EntryInputStream::EntryInputStream( Reference < io::XInputStream > xNewInput, +EntryInputStream::EntryInputStream( Reference < io::XInputStream > xNewInput, const ZipEntry & rNewEntry, const rtl::Reference < EncryptionData > &xEncryptData, sal_Bool bGetRawStream) @@ -99,22 +99,22 @@ void EntryInputStream::readIntoMemory() // Get the key rtl_digest_PBKDF2 ( aDerivedKey.getArray(), 16, - reinterpret_cast < const sal_uInt8 * > (xEncryptionData->aKey.getConstArray()), + reinterpret_cast < const sal_uInt8 * > (xEncryptionData->aKey.getConstArray()), xEncryptionData->aKey.getLength(), - xEncryptionData->aSalt.getConstArray(), + xEncryptionData->aSalt.getConstArray(), xEncryptionData->aSalt.getLength(), xEncryptionData->nIterationCount ); - + rtlCipher aCipher = rtl_cipher_create (rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream); - aResult = rtl_cipher_init( aCipher, rtl_Cipher_DirectionDecode, + aResult = rtl_cipher_init( aCipher, rtl_Cipher_DirectionDecode, aDerivedKey.getConstArray(), aDerivedKey.getLength(), xEncryptionData->aInitVector.getConstArray(), xEncryptionData->aInitVector.getLength()); OSL_ASSERT (aResult == rtl_Cipher_E_None); aDecryptBuffer.realloc ( nSize ); - aResult = rtl_cipher_decode ( aCipher, - aReadBuffer.getConstArray(), + aResult = rtl_cipher_decode ( aCipher, + aReadBuffer.getConstArray(), nSize, reinterpret_cast < sal_uInt8 * > (aDecryptBuffer.getArray()), nSize); @@ -171,17 +171,17 @@ void SAL_CALL EntryInputStream::skipBytes( sal_Int32 nBytesToSkip ) nCurrent+=nBytesToSkip; } -sal_Int32 SAL_CALL EntryInputStream::available( ) +sal_Int32 SAL_CALL EntryInputStream::available( ) throw(io::NotConnectedException, io::IOException, RuntimeException) { return static_cast < sal_Int32 > (nUncompressedSize - nCurrent); } -void SAL_CALL EntryInputStream::closeInput( ) +void SAL_CALL EntryInputStream::closeInput( ) throw(io::NotConnectedException, io::IOException, RuntimeException) { } -void SAL_CALL EntryInputStream::seek( sal_Int64 location ) +void SAL_CALL EntryInputStream::seek( sal_Int64 location ) throw(lang::IllegalArgumentException, io::IOException, RuntimeException) { if (location > nUncompressedSize) @@ -190,7 +190,7 @@ void SAL_CALL EntryInputStream::seek( sal_Int64 location ) location = 0; nCurrent = location; } -sal_Int64 SAL_CALL EntryInputStream::getPosition( ) +sal_Int64 SAL_CALL EntryInputStream::getPosition( ) throw(io::IOException, RuntimeException) { return nCurrent; diff --git a/package/source/zipapi/EntryInputStream.hxx b/package/source/zipapi/EntryInputStream.hxx index 8a5bf0dc835f..cf1bf5aeb58f 100644 --- a/package/source/zipapi/EntryInputStream.hxx +++ b/package/source/zipapi/EntryInputStream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #include <com/sun/star/packages/zip/ZipEntry.hpp> #include <rtl/ref.hxx> #include <EncryptionData.hxx> -class EntryInputStream : public cppu::WeakImplHelper2< com::sun::star::io::XInputStream, +class EntryInputStream : public cppu::WeakImplHelper2< com::sun::star::io::XInputStream, com::sun::star::io::XSeekable > { protected: @@ -50,29 +50,29 @@ protected: void readIntoMemory() throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); public: - EntryInputStream( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xInput, - const com::sun::star::packages::zip::ZipEntry &rNewEntry, + EntryInputStream( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xInput, + const com::sun::star::packages::zip::ZipEntry &rNewEntry, const rtl::Reference < EncryptionData > &xEncryptData, sal_Bool bGetRawStream = sal_False); virtual ~EntryInputStream(); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) + virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available( ) + virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput( ) + virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); // XSeekable - virtual void SAL_CALL seek( sal_Int64 location ) + virtual void SAL_CALL seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int64 SAL_CALL getPosition( ) + virtual sal_Int64 SAL_CALL getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int64 SAL_CALL getLength( ) + virtual sal_Int64 SAL_CALL getLength( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); /* private: diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx index 26ba278cc9de..398742022138 100644 --- a/package/source/zipapi/Inflater.cxx +++ b/package/source/zipapi/Inflater.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,24 +76,24 @@ Inflater::~Inflater() end(); } -void SAL_CALL Inflater::setInput( const Sequence< sal_Int8 >& rBuffer ) +void SAL_CALL Inflater::setInput( const Sequence< sal_Int8 >& rBuffer ) { sInBuffer = rBuffer; nOffset = 0; nLength = rBuffer.getLength(); } -sal_Bool SAL_CALL Inflater::needsDictionary( ) +sal_Bool SAL_CALL Inflater::needsDictionary( ) { return bNeedDict; } -sal_Bool SAL_CALL Inflater::finished( ) +sal_Bool SAL_CALL Inflater::finished( ) { return bFinished; } -sal_Int32 SAL_CALL Inflater::doInflateSegment( Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) +sal_Int32 SAL_CALL Inflater::doInflateSegment( Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) { if (nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength()) { @@ -102,7 +102,7 @@ sal_Int32 SAL_CALL Inflater::doInflateSegment( Sequence< sal_Int8 >& rBuffer, sa return doInflateBytes(rBuffer, nNewOffset, nNewLength); } -void SAL_CALL Inflater::end( ) +void SAL_CALL Inflater::end( ) { if (pStream != NULL) { diff --git a/package/source/zipapi/MemoryByteGrabber.hxx b/package/source/zipapi/MemoryByteGrabber.hxx index 5e167490d632..bc413490443f 100644 --- a/package/source/zipapi/MemoryByteGrabber.hxx +++ b/package/source/zipapi/MemoryByteGrabber.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ #include <com/sun/star/io/XSeekable.hpp> #include <string.h> -class MemoryByteGrabber +class MemoryByteGrabber { protected: const com::sun::star::uno::Sequence < sal_Int8 > maBuffer; @@ -42,8 +42,8 @@ public: MemoryByteGrabber ( const com::sun::star::uno::Sequence < sal_Int8 > & rBuffer ) : maBuffer ( rBuffer ) , mpBuffer ( rBuffer.getConstArray() ) - , mnCurrent ( 0 ) - , mnEnd ( rBuffer.getLength() ) + , mnCurrent ( 0 ) + , mnEnd ( rBuffer.getLength() ) { } MemoryByteGrabber() @@ -52,8 +52,8 @@ public: const sal_Int8 * getCurrentPos () { return mpBuffer + mnCurrent; } // XInputStream chained - sal_Int32 SAL_CALL readBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nBytesToRead ) + sal_Int32 SAL_CALL readBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData, + sal_Int32 nBytesToRead ) throw(com::sun::star::io::NotConnectedException, com::sun::star::io::BufferSizeExceededException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { if ( nBytesToRead < 0) @@ -68,29 +68,29 @@ public: return nBytesToRead; } - sal_Int32 SAL_CALL readSomeBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nMaxBytesToRead ) + sal_Int32 SAL_CALL readSomeBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData, + sal_Int32 nMaxBytesToRead ) throw(com::sun::star::io::NotConnectedException, com::sun::star::io::BufferSizeExceededException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { - return readBytes( aData, nMaxBytesToRead ); + return readBytes( aData, nMaxBytesToRead ); } - void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(com::sun::star::io::NotConnectedException, com::sun::star::io::BufferSizeExceededException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { mnCurrent += nBytesToSkip; } - sal_Int32 SAL_CALL available( ) + sal_Int32 SAL_CALL available( ) throw(com::sun::star::io::NotConnectedException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { return mnEnd - mnCurrent; } - void SAL_CALL closeInput( ) + void SAL_CALL closeInput( ) throw(com::sun::star::io::NotConnectedException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { } // XSeekable chained... - sal_Int64 SAL_CALL seek( sal_Int64 location ) + sal_Int64 SAL_CALL seek( sal_Int64 location ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { if ( location < 0 || location > mnEnd ) @@ -98,7 +98,7 @@ public: mnCurrent = static_cast < sal_Int32 > ( location ); return mnCurrent; } - sal_Int64 SAL_CALL getPosition( ) + sal_Int64 SAL_CALL getPosition( ) throw(com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) { return mnCurrent; diff --git a/package/source/zipapi/XMemoryStream.cxx b/package/source/zipapi/XMemoryStream.cxx index 7003bf1b814b..8b737db6e2d2 100644 --- a/package/source/zipapi/XMemoryStream.cxx +++ b/package/source/zipapi/XMemoryStream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,16 +40,16 @@ XMemoryStream::XMemoryStream ( com::sun::star::uno::Sequence < sal_Int8 > & rNew XMemoryStream::~XMemoryStream(void) { } -::com::sun::star::uno::Any SAL_CALL XMemoryStream::queryInterface( const com::sun::star::uno::Type& rType ) +::com::sun::star::uno::Any SAL_CALL XMemoryStream::queryInterface( const com::sun::star::uno::Type& rType ) throw(com::sun::star::uno::RuntimeException) { - return ::cppu::queryInterface ( rType , + return ::cppu::queryInterface ( rType , // OWeakObject interfaces - reinterpret_cast< XInterface* > ( this ) , - static_cast< XWeak* > ( this ) , + reinterpret_cast< XInterface* > ( this ) , + static_cast< XWeak* > ( this ) , // my interfaces - static_cast< XInputStream* > ( this ) , - static_cast< XSeekable* > ( this ) ); + static_cast< XInputStream* > ( this ) , + static_cast< XSeekable* > ( this ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/package/source/zipapi/XMemoryStream.hxx b/package/source/zipapi/XMemoryStream.hxx index 935712abbe42..e6bc88e81797 100644 --- a/package/source/zipapi/XMemoryStream.hxx +++ b/package/source/zipapi/XMemoryStream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ class XMemoryStream: public ZipPackageBuffer public: XMemoryStream ( com::sun::star::uno::Sequence < sal_Int8 > & rNewBuffer ); virtual ~XMemoryStream(void); - virtual com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& rType ) + virtual com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& rType ) throw(com::sun::star::uno::RuntimeException); }; #endif diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx index 6da133e32ef4..6f9e0d572b3e 100644 --- a/package/source/zipapi/XUnbufferedStream.hxx +++ b/package/source/zipapi/XUnbufferedStream.hxx @@ -40,9 +40,9 @@ #include <CRC32.hxx> #include <mutexholder.hxx> -#define UNBUFF_STREAM_DATA 0 -#define UNBUFF_STREAM_RAW 1 -#define UNBUFF_STREAM_WRAPPEDRAW 2 +#define UNBUFF_STREAM_DATA 0 +#define UNBUFF_STREAM_RAW 1 +#define UNBUFF_STREAM_WRAPPEDRAW 2 class EncryptionData; typedef void* rtlCipher; diff --git a/package/source/zipapi/ZipEnumeration.cxx b/package/source/zipapi/ZipEnumeration.cxx index 767aacc92a54..45ac260ea7e8 100644 --- a/package/source/zipapi/ZipEnumeration.cxx +++ b/package/source/zipapi/ZipEnumeration.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 005d29196fd6..7a1b5d964ba9 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -252,9 +252,9 @@ sal_Bool ZipFile::StaticFillData ( rtl::Reference < EncryptionData > & rData, sal_Int16 nSaltLength = pBuffer[nPos++] & 0xFF; nSaltLength |= ( pBuffer[nPos++] & 0xFF ) << 8; sal_Int16 nIVLength = ( pBuffer[nPos++] & 0xFF ); - nIVLength |= ( pBuffer[nPos++] & 0xFF ) << 8; + nIVLength |= ( pBuffer[nPos++] & 0xFF ) << 8; sal_Int16 nDigestLength = pBuffer[nPos++] & 0xFF; - nDigestLength |= ( pBuffer[nPos++] & 0xFF ) << 8; + nDigestLength |= ( pBuffer[nPos++] & 0xFF ) << 8; sal_Int16 nMediaTypeLength = pBuffer[nPos++] & 0xFF; nMediaTypeLength |= ( pBuffer[nPos++] & 0xFF ) << 8; @@ -286,7 +286,7 @@ sal_Bool ZipFile::StaticFillData ( rtl::Reference < EncryptionData > & rData, return bOk; } -Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const Reference< XInputStream >& xStream, +Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const Reference< XInputStream >& xStream, const rtl::Reference < EncryptionData > &rData ) throw ( packages::WrongPasswordException, ZipIOException, RuntimeException ) { diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 02b66bad182b..d4778a87b04b 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,18 +68,18 @@ ZipOutputStream::~ZipOutputStream( void ) delete aZipList[i]; } -void SAL_CALL ZipOutputStream::setMethod( sal_Int32 nNewMethod ) +void SAL_CALL ZipOutputStream::setMethod( sal_Int32 nNewMethod ) throw(RuntimeException) { nMethod = static_cast < sal_Int16 > (nNewMethod); } -void SAL_CALL ZipOutputStream::setLevel( sal_Int32 nNewLevel ) +void SAL_CALL ZipOutputStream::setLevel( sal_Int32 nNewLevel ) throw(RuntimeException) { aDeflater.setLevel( nNewLevel); } -void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry, +void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry, rtl::Reference < EncryptionData > &xEncryptData, sal_Bool bEncrypt) throw(IOException, RuntimeException) @@ -113,7 +113,7 @@ void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry, pCurrentEntry = &rEntry; } -void SAL_CALL ZipOutputStream::closeEntry( ) +void SAL_CALL ZipOutputStream::closeEntry( ) throw(IOException, RuntimeException) { ZipEntry *pEntry = pCurrentEntry; @@ -170,7 +170,7 @@ void SAL_CALL ZipOutputStream::closeEntry( ) bEncryptCurrentEntry = sal_False; rtl_cipher_destroy ( aCipher ); pCurrentEncryptData->aDigest.realloc ( RTL_DIGEST_LENGTH_SHA1 ); - aDigestResult = rtl_digest_getSHA1 ( aDigest, + aDigestResult = rtl_digest_getSHA1 ( aDigest, reinterpret_cast < sal_uInt8 * > ( pCurrentEncryptData->aDigest.getArray() ), RTL_DIGEST_LENGTH_SHA1 ); OSL_ASSERT( aDigestResult == rtl_Digest_E_None ); @@ -180,7 +180,7 @@ void SAL_CALL ZipOutputStream::closeEntry( ) } } -void SAL_CALL ZipOutputStream::write( const Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) +void SAL_CALL ZipOutputStream::write( const Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) throw(IOException, RuntimeException) { switch (pCurrentEntry->nMethod) @@ -204,14 +204,14 @@ void SAL_CALL ZipOutputStream::write( const Sequence< sal_Int8 >& rBuffer, sal_I } } -void SAL_CALL ZipOutputStream::rawWrite( Sequence< sal_Int8 >& rBuffer, sal_Int32 /*nNewOffset*/, sal_Int32 nNewLength ) +void SAL_CALL ZipOutputStream::rawWrite( Sequence< sal_Int8 >& rBuffer, sal_Int32 /*nNewOffset*/, sal_Int32 nNewLength ) throw(IOException, RuntimeException) { Sequence < sal_Int8 > aTmpBuffer ( rBuffer.getConstArray(), nNewLength ); aChucker.WriteBytes( aTmpBuffer ); } -void SAL_CALL ZipOutputStream::rawCloseEntry( ) +void SAL_CALL ZipOutputStream::rawCloseEntry( ) throw(IOException, RuntimeException) { if ( pCurrentEntry->nMethod == DEFLATED && ( pCurrentEntry->nFlag & 8 ) ) @@ -219,7 +219,7 @@ void SAL_CALL ZipOutputStream::rawCloseEntry( ) pCurrentEntry = NULL; } -void SAL_CALL ZipOutputStream::finish( ) +void SAL_CALL ZipOutputStream::finish( ) throw(IOException, RuntimeException) { if (bFinished) @@ -295,7 +295,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry ) throw IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected character is used in file name." ) ), Reference< XInterface >() ); ::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); - sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); + sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); aChucker << CENSIG; aChucker << rEntry.nVersion; @@ -344,7 +344,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry ) throw IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected character is used in file name." ) ), Reference< XInterface >() ); ::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); - sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); + sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); aChucker << LOCSIG; aChucker << rEntry.nVersion; @@ -397,7 +397,7 @@ sal_uInt32 ZipOutputStream::getCurrentDosTime( ) nYear-=1980; else if (nYear>80) nYear-=80; - sal_uInt32 nResult = static_cast < sal_uInt32>( ( ( ( aDateTime.Day) + + sal_uInt32 nResult = static_cast < sal_uInt32>( ( ( ( aDateTime.Day) + ( 32 * (aDateTime.Month)) + ( 512 * nYear ) ) << 16) | ( ( aDateTime.Seconds/2) + @@ -407,7 +407,7 @@ sal_uInt32 ZipOutputStream::getCurrentDosTime( ) } /* - This is actually never used, so I removed it, but thought that the + This is actually never used, so I removed it, but thought that the implementation details may be useful in the future...mtg 20010307 I stopped using the time library and used the OSL version instead, but |