Kaydet (Commit) 6f7ca495 authored tarafından Noel Grandin's avatar Noel Grandin

package: sal_Bool->bool

Change-Id: I66999e5d9f827650f4c1bccb14178f8fa8a57cbf
üst 2cf50102
......@@ -128,7 +128,7 @@ namespace XSLT
}
// Decompress the bytes
::ZipUtils::Inflater* decompresser = new ::ZipUtils::Inflater(sal_False);
::ZipUtils::Inflater* decompresser = new ::ZipUtils::Inflater(false);
decompresser->setInput(content);
Sequence<sal_Int8> result(oleLength);
decompresser->doInflateSegment(result, 0, oleLength);
......@@ -196,7 +196,7 @@ namespace XSLT
// Compress the bytes
Sequence<sal_Int8> output(oledata.getLength());
::ZipUtils::Deflater* compresser = new ::ZipUtils::Deflater((sal_Int32) 3, sal_False);
::ZipUtils::Deflater* compresser = new ::ZipUtils::Deflater((sal_Int32) 3, false);
compresser->setInputSegment(oledata, 0, oledata.getLength());
compresser->finish();
int compressedDataLength = compresser->doDeflateSegment(output, 0, oledata.getLength());
......
......@@ -33,24 +33,24 @@ class DLLPUBLIC_PACKAGE Deflater
protected:
com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
sal_Bool bFinish;
sal_Bool bFinished;
sal_Bool bSetParams;
bool bFinish;
bool bFinished;
bool bSetParams;
sal_Int32 nLevel, nStrategy;
sal_Int64 nOffset, nLength;
z_stream* pStream;
void init (sal_Int32 nLevel, sal_Int32 nStrategy, sal_Bool bNowrap);
void init (sal_Int32 nLevel, sal_Int32 nStrategy, bool bNowrap);
sal_Int32 doDeflateBytes (com::sun::star::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);
public:
~Deflater();
Deflater(sal_Int32 nSetLevel, sal_Bool bNowrap);
Deflater(sal_Int32 nSetLevel, bool bNowrap);
void SAL_CALL setInputSegment( const ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength );
void SAL_CALL setLevel( sal_Int32 nNewLevel );
sal_Bool SAL_CALL needsInput( );
bool SAL_CALL needsInput( );
void SAL_CALL finish( );
sal_Bool SAL_CALL finished( );
bool SAL_CALL finished( );
sal_Int32 SAL_CALL doDeflateSegment( ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength );
sal_Int64 SAL_CALL getTotalIn( );
sal_Int64 SAL_CALL getTotalOut( );
......
......@@ -32,18 +32,18 @@ class DLLPUBLIC_PACKAGE Inflater
typedef struct z_stream_s z_stream;
protected:
sal_Bool bFinished, bSetParams, bNeedDict;
bool bFinished, bSetParams, bNeedDict;
sal_Int32 nOffset, nLength, nLastInflateError;
z_stream* pStream;
com::sun::star::uno::Sequence < sal_Int8 > sInBuffer;
sal_Int32 doInflateBytes (com::sun::star::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);
public:
Inflater(sal_Bool bNoWrap = sal_False);
Inflater(bool bNoWrap = false);
~Inflater();
void SAL_CALL setInput( const ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer );
sal_Bool SAL_CALL needsDictionary( );
sal_Bool SAL_CALL finished( );
bool SAL_CALL needsDictionary( );
bool SAL_CALL finished( );
sal_Int32 SAL_CALL doInflateSegment( ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength );
void SAL_CALL end( );
......
......@@ -34,7 +34,7 @@ Deflater::~Deflater(void)
{
end();
}
void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, sal_Bool bNowrap)
void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, bool bNowrap)
{
pStream = new z_stream;
/* Memset it to 0...sets zalloc/zfree/opaque to NULL */
......@@ -56,10 +56,10 @@ void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, sal_Bool bNowr
}
}
Deflater::Deflater(sal_Int32 nSetLevel, sal_Bool bNowrap)
: bFinish(sal_False)
, bFinished(sal_False)
, bSetParams(sal_False)
Deflater::Deflater(sal_Int32 nSetLevel, bool bNowrap)
: bFinish(false)
, bFinished(false)
, bSetParams(false)
, nLevel(nSetLevel)
, nStrategy(DEFAULT_STRATEGY)
, nOffset(0)
......@@ -86,12 +86,12 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
switch (nResult)
{
case Z_OK:
bSetParams = sal_False;
bSetParams = false;
nOffset += nLength - pStream->avail_in;
nLength = pStream->avail_in;
return nNewLength - pStream->avail_out;
case Z_BUF_ERROR:
bSetParams = sal_False;
bSetParams = false;
return 0;
default:
return 0;
......@@ -112,13 +112,13 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
switch (nResult)
{
case Z_STREAM_END:
bFinished = sal_True;
bFinished = true;
case Z_OK:
nOffset += nLength - pStream->avail_in;
nLength = pStream->avail_in;
return nNewLength - pStream->avail_out;
case Z_BUF_ERROR:
bSetParams = sal_False;
bSetParams = false;
return 0;
default:
return 0;
......@@ -143,18 +143,18 @@ void SAL_CALL Deflater::setLevel( sal_Int32 nNewLevel )
if (nNewLevel != nLevel)
{
nLevel = nNewLevel;
bSetParams = sal_True;
bSetParams = true;
}
}
sal_Bool SAL_CALL Deflater::needsInput( )
bool SAL_CALL Deflater::needsInput( )
{
return nLength <=0;
}
void SAL_CALL Deflater::finish( )
{
bFinish = sal_True;
bFinish = true;
}
sal_Bool SAL_CALL Deflater::finished( )
bool SAL_CALL Deflater::finished( )
{
return bFinished;
}
......@@ -178,8 +178,8 @@ void SAL_CALL Deflater::reset( )
#else
z_deflateReset(pStream);
#endif
bFinish = sal_False;
bFinished = sal_False;
bFinish = false;
bFinished = false;
nOffset = nLength = 0;
}
void SAL_CALL Deflater::end( )
......
......@@ -26,10 +26,10 @@ using namespace ZipUtils;
/** Provides general purpose decompression using the ZLIB library */
Inflater::Inflater(sal_Bool bNoWrap)
: bFinished(sal_False),
bSetParams(sal_False),
bNeedDict(sal_False),
Inflater::Inflater(bool bNoWrap)
: bFinished(false),
bSetParams(false),
bNeedDict(false),
nOffset(0),
nLength(0),
nLastInflateError(0),
......@@ -67,12 +67,12 @@ void SAL_CALL Inflater::setInput( const Sequence< sal_Int8 >& rBuffer )
nLength = rBuffer.getLength();
}
sal_Bool SAL_CALL Inflater::needsDictionary( )
bool SAL_CALL Inflater::needsDictionary( )
{
return bNeedDict;
}
sal_Bool SAL_CALL Inflater::finished( )
bool SAL_CALL Inflater::finished( )
{
return bFinished;
}
......@@ -124,14 +124,14 @@ sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 n
switch (nResult)
{
case Z_STREAM_END:
bFinished = sal_True;
bFinished = true;
case Z_OK:
nOffset += nLength - pStream->avail_in;
nLength = pStream->avail_in;
return nNewLength - pStream->avail_out;
case Z_NEED_DICT:
bNeedDict = sal_True;
bNeedDict = true;
nOffset += nLength - pStream->avail_in;
nLength = pStream->avail_in;
return 0;
......
......@@ -54,7 +54,7 @@ XUnbufferedStream::XUnbufferedStream(
, maEntry ( rEntry )
, mxData ( rData )
, mnBlockSize( 1 )
, maInflater ( sal_True )
, maInflater ( true )
, mbRawStream ( nStreamMode == UNBUFF_STREAM_RAW || nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
, mbWrappedRaw ( nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
, mbFinished ( sal_False )
......@@ -117,7 +117,7 @@ XUnbufferedStream::XUnbufferedStream(
, mxZipSeek ( xRawStream, UNO_QUERY )
, mxData ( rData )
, mnBlockSize( 1 )
, maInflater ( sal_True )
, maInflater ( true )
, mbRawStream ( sal_False )
, mbWrappedRaw ( sal_False )
, mbFinished ( sal_False )
......
......@@ -68,7 +68,7 @@ using ZipUtils::Inflater;
ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise )
throw(IOException, ZipException, RuntimeException)
: aGrabber(xInput)
, aInflater (sal_True)
, aInflater( true )
, xStream(xInput)
, xSeek(xInput, UNO_QUERY)
, m_xContext ( rxContext )
......@@ -87,7 +87,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise, sal_Bool bForceRecovery, uno::Reference < XProgressHandler > xProgress )
throw(IOException, ZipException, RuntimeException)
: aGrabber(xInput)
, aInflater (sal_True)
, aInflater( true )
, xStream(xInput)
, xSeek(xInput, UNO_QUERY)
, m_xContext ( rxContext )
......@@ -1093,7 +1093,7 @@ void ZipFile::getSizeAndCRC( sal_Int64 nOffset, sal_Int64 nCompressedSize, sal_I
Sequence < sal_Int8 > aBuffer;
CRC32 aCRC;
sal_Int64 nRealSize = 0;
Inflater aInflaterLocal( sal_True );
Inflater aInflaterLocal( true );
sal_Int32 nBlockSize = static_cast< sal_Int32 > (::std::min( nCompressedSize, static_cast< sal_Int64 >( 32000 ) ) );
aGrabber.seek( nOffset );
......
......@@ -44,7 +44,7 @@ ZipOutputStream::ZipOutputStream( const uno::Reference< uno::XComponentContext >
: m_xContext( rxContext )
, xStream(xOStream)
, m_aDeflateBuffer(n_ConstBufferSize)
, aDeflater(DEFAULT_COMPRESSION, sal_True)
, aDeflater(DEFAULT_COMPRESSION, true)
, aChucker(xOStream)
, pCurrentEntry(NULL)
, nMethod(DEFLATED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment