Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2408ca20
Kaydet (Commit)
2408ca20
authored
Ara 17, 2003
tarafından
Vladimir Glazounov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS geordi2q11 (1.10.94); FILE MERGED
2003/12/16 13:57:12 hr 1.10.94.1: #111934#: join CWS ooo111fix1
üst
44425aa1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
4 deletions
+58
-4
Deflater.cxx
package/source/zipapi/Deflater.cxx
+30
-2
Inflater.cxx
package/source/zipapi/Inflater.cxx
+28
-2
No files found.
package/source/zipapi/Deflater.cxx
Dosyayı görüntüle @
2408ca20
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: Deflater.cxx,v $
* $RCSfile: Deflater.cxx,v $
*
*
* $Revision: 1.1
0
$
* $Revision: 1.1
1
$
*
*
* last change: $Author:
mtg $ $Date: 2001-11-15 20:16:11
$
* last change: $Author:
vg $ $Date: 2003-12-17 18:02:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -62,8 +62,12 @@
...
@@ -62,8 +62,12 @@
#include <Deflater.hxx>
#include <Deflater.hxx>
#endif
#endif
#ifndef _ZLIB_H
#ifndef _ZLIB_H
#ifdef SYSTEM_ZLIB
#include <zlib.h>
#else
#include <external/zlib/zlib.h>
#include <external/zlib/zlib.h>
#endif
#endif
#endif
#ifndef _VOS_DIAGNOSE_H_
#ifndef _VOS_DIAGNOSE_H_
#include <vos/diagnose.hxx>
#include <vos/diagnose.hxx>
#endif
#endif
...
@@ -150,7 +154,11 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
...
@@ -150,7 +154,11 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
pStream
->
avail_in
=
nLength
;
pStream
->
avail_in
=
nLength
;
pStream
->
avail_out
=
nNewLength
;
pStream
->
avail_out
=
nNewLength
;
#ifdef SYSTEM_ZLIB
nResult
=
deflateParams
(
pStream
,
nLevel
,
nStrategy
);
#else
nResult
=
z_deflateParams
(
pStream
,
nLevel
,
nStrategy
);
nResult
=
z_deflateParams
(
pStream
,
nLevel
,
nStrategy
);
#endif
switch
(
nResult
)
switch
(
nResult
)
{
{
case
Z_OK
:
case
Z_OK
:
...
@@ -174,7 +182,11 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
...
@@ -174,7 +182,11 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int
pStream
->
avail_in
=
nLength
;
pStream
->
avail_in
=
nLength
;
pStream
->
avail_out
=
nNewLength
;
pStream
->
avail_out
=
nNewLength
;
#ifdef SYSTEM_ZLIB
nResult
=
deflate
(
pStream
,
bFinish
?
Z_FINISH
:
Z_NO_FLUSH
);
#else
nResult
=
z_deflate
(
pStream
,
bFinish
?
Z_FINISH
:
Z_NO_FLUSH
);
nResult
=
z_deflate
(
pStream
,
bFinish
?
Z_FINISH
:
Z_NO_FLUSH
);
#endif
switch
(
nResult
)
switch
(
nResult
)
{
{
case
Z_STREAM_END
:
case
Z_STREAM_END
:
...
@@ -220,7 +232,11 @@ void SAL_CALL Deflater::setDictionarySegment( const uno::Sequence< sal_Int8 >& r
...
@@ -220,7 +232,11 @@ void SAL_CALL Deflater::setDictionarySegment( const uno::Sequence< sal_Int8 >& r
{
{
// do error handling
// do error handling
}
}
#ifdef SYSTEM_ZLIB
sal_Int32
nResult
=
deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nOffset
,
nLength
);
#else
sal_Int32
nResult
=
z_deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nOffset
,
nLength
);
sal_Int32
nResult
=
z_deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nOffset
,
nLength
);
#endif
}
}
void
SAL_CALL
Deflater
::
setDictionary
(
const
uno
::
Sequence
<
sal_Int8
>&
rBuffer
)
void
SAL_CALL
Deflater
::
setDictionary
(
const
uno
::
Sequence
<
sal_Int8
>&
rBuffer
)
{
{
...
@@ -230,7 +246,11 @@ void SAL_CALL Deflater::setDictionary( const uno::Sequence< sal_Int8 >& rBuffer
...
@@ -230,7 +246,11 @@ void SAL_CALL Deflater::setDictionary( const uno::Sequence< sal_Int8 >& rBuffer
VOS_DEBUG_ONLY
(
"No stream!"
);
VOS_DEBUG_ONLY
(
"No stream!"
);
}
}
#ifdef SYSTEM_ZLIB
sal_Int32
nResult
=
deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
rBuffer
.
getLength
());
#else
sal_Int32
nResult
=
z_deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
rBuffer
.
getLength
());
sal_Int32
nResult
=
z_deflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
rBuffer
.
getLength
());
#endif
}
}
void
SAL_CALL
Deflater
::
setStrategy
(
sal_Int32
nNewStrategy
)
void
SAL_CALL
Deflater
::
setStrategy
(
sal_Int32
nNewStrategy
)
{
{
...
@@ -295,7 +315,11 @@ sal_Int32 SAL_CALL Deflater::getTotalOut( )
...
@@ -295,7 +315,11 @@ sal_Int32 SAL_CALL Deflater::getTotalOut( )
}
}
void
SAL_CALL
Deflater
::
reset
(
)
void
SAL_CALL
Deflater
::
reset
(
)
{
{
#ifdef SYSTEM_ZLIB
deflateReset
(
pStream
);
#else
z_deflateReset
(
pStream
);
z_deflateReset
(
pStream
);
#endif
bFinish
=
sal_False
;
bFinish
=
sal_False
;
bFinished
=
sal_False
;
bFinished
=
sal_False
;
nOffset
=
nLength
=
0
;
nOffset
=
nLength
=
0
;
...
@@ -304,7 +328,11 @@ void SAL_CALL Deflater::end( )
...
@@ -304,7 +328,11 @@ void SAL_CALL Deflater::end( )
{
{
if
(
pStream
!=
NULL
)
if
(
pStream
!=
NULL
)
{
{
#ifdef SYSTEM_ZLIB
deflateEnd
(
pStream
);
#else
z_deflateEnd
(
pStream
);
z_deflateEnd
(
pStream
);
#endif
delete
pStream
;
delete
pStream
;
}
}
pStream
=
NULL
;
pStream
=
NULL
;
...
...
package/source/zipapi/Inflater.cxx
Dosyayı görüntüle @
2408ca20
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: Inflater.cxx,v $
* $RCSfile: Inflater.cxx,v $
*
*
* $Revision: 1.1
0
$
* $Revision: 1.1
1
$
*
*
* last change: $Author:
mtg $ $Date: 2001-11-15 20:17:02
$
* last change: $Author:
vg $ $Date: 2003-12-17 18:02:28
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -62,8 +62,12 @@
...
@@ -62,8 +62,12 @@
#include <Inflater.hxx>
#include <Inflater.hxx>
#endif
#endif
#ifndef _ZLIB_H
#ifndef _ZLIB_H
#ifdef SYSTEM_ZLIB
#include <zlib.h>
#else
#include <external/zlib/zlib.h>
#include <external/zlib/zlib.h>
#endif
#endif
#endif
#ifndef _VOS_DIAGNOSE_H_
#ifndef _VOS_DIAGNOSE_H_
#include <vos/diagnose.hxx>
#include <vos/diagnose.hxx>
#endif
#endif
...
@@ -133,8 +137,13 @@ void SAL_CALL Inflater::setDictionarySegment( const Sequence< sal_Int8 >& rBuffe
...
@@ -133,8 +137,13 @@ void SAL_CALL Inflater::setDictionarySegment( const Sequence< sal_Int8 >& rBuffe
{
{
// do error handling
// do error handling
}
}
#ifdef SYSTEM_ZLIB
inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nNewOffset
,
nNewLength
);
#else
z_inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nNewOffset
,
z_inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
()
+
nNewOffset
,
nNewLength
);
nNewLength
);
#endif
}
}
void
SAL_CALL
Inflater
::
setDictionary
(
const
Sequence
<
sal_Int8
>&
rBuffer
)
void
SAL_CALL
Inflater
::
setDictionary
(
const
Sequence
<
sal_Int8
>&
rBuffer
)
...
@@ -143,8 +152,13 @@ void SAL_CALL Inflater::setDictionary( const Sequence< sal_Int8 >& rBuffer )
...
@@ -143,8 +152,13 @@ void SAL_CALL Inflater::setDictionary( const Sequence< sal_Int8 >& rBuffer )
{
{
// do error handling
// do error handling
}
}
#ifdef SYSTEM_ZLIB
inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
rBuffer
.
getLength
());
#else
z_inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
z_inflateSetDictionary
(
pStream
,
(
const
unsigned
char
*
)
rBuffer
.
getConstArray
(),
rBuffer
.
getLength
());
rBuffer
.
getLength
());
#endif
}
}
sal_Int32
SAL_CALL
Inflater
::
getRemaining
(
)
sal_Int32
SAL_CALL
Inflater
::
getRemaining
(
)
...
@@ -202,7 +216,11 @@ sal_Int32 SAL_CALL Inflater::getTotalOut( )
...
@@ -202,7 +216,11 @@ sal_Int32 SAL_CALL Inflater::getTotalOut( )
void
SAL_CALL
Inflater
::
reset
(
)
void
SAL_CALL
Inflater
::
reset
(
)
{
{
#ifdef SYSTEM_ZLIB
inflateReset
(
pStream
);
#else
z_inflateReset
(
pStream
);
z_inflateReset
(
pStream
);
#endif
bFinish
=
bNeedDict
=
bFinished
=
sal_False
;
bFinish
=
bNeedDict
=
bFinished
=
sal_False
;
nOffset
=
nLength
=
0
;
nOffset
=
nLength
=
0
;
}
}
...
@@ -211,7 +229,11 @@ void SAL_CALL Inflater::end( )
...
@@ -211,7 +229,11 @@ void SAL_CALL Inflater::end( )
{
{
if
(
pStream
!=
NULL
)
if
(
pStream
!=
NULL
)
{
{
#ifdef SYSTEM_ZLIB
inflateEnd
(
pStream
);
#else
z_inflateEnd
(
pStream
);
z_inflateEnd
(
pStream
);
#endif
delete
pStream
;
delete
pStream
;
}
}
pStream
=
NULL
;
pStream
=
NULL
;
...
@@ -225,7 +247,11 @@ sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 n
...
@@ -225,7 +247,11 @@ sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 n
pStream
->
next_out
=
reinterpret_cast
<
unsigned
char
*
>
(
rBuffer
.
getArray
()
+
nNewOffset
);
pStream
->
next_out
=
reinterpret_cast
<
unsigned
char
*
>
(
rBuffer
.
getArray
()
+
nNewOffset
);
pStream
->
avail_out
=
nNewLength
;
pStream
->
avail_out
=
nNewLength
;
#ifdef SYSTEM_ZLIB
nResult
=
::
inflate
(
pStream
,
bFinish
?
Z_SYNC_FLUSH
:
Z_PARTIAL_FLUSH
);
#else
nResult
=
::
z_inflate
(
pStream
,
bFinish
?
Z_SYNC_FLUSH
:
Z_PARTIAL_FLUSH
);
nResult
=
::
z_inflate
(
pStream
,
bFinish
?
Z_SYNC_FLUSH
:
Z_PARTIAL_FLUSH
);
#endif
switch
(
nResult
)
switch
(
nResult
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment