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
4f1f317a
Kaydet (Commit)
4f1f317a
authored
Agu 14, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
extract compression methods to make them testable
Change-Id: I2ad28134ef723872b9940c02657ee89758efa06f
üst
a1b31c0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
67 deletions
+70
-67
vbaexport.hxx
include/oox/ole/vbaexport.hxx
+69
-0
vbaexport.cxx
oox/source/ole/vbaexport.cxx
+1
-67
No files found.
include/oox/ole/vbaexport.hxx
Dosyayı görüntüle @
4f1f317a
...
...
@@ -11,6 +11,9 @@
#define __INCLUDED_INCLUDE_OOX_OLE_VBAEXPORT_HXX__
#include <com/sun/star/uno/XInterface.hpp>
#include <tools/stream.hxx>
#include <oox/dllapi.h>
namespace
com
{
namespace
sun
{
namespace
star
{
...
...
@@ -35,6 +38,72 @@ private:
OUString
maProjectName
;
};
class
VBACompressionChunk
{
public
:
VBACompressionChunk
(
SvStream
&
rCompressedStream
,
const
sal_uInt8
*
pData
,
sal_Size
nChunkSize
);
void
write
();
private
:
SvStream
&
mrCompressedStream
;
const
sal_uInt8
*
mpUncompressedData
;
sal_uInt8
*
mpCompressedChunkStream
;
// same as DecompressedChunkEnd in the spec
sal_Size
mnChunkSize
;
// CompressedCurrent according to the spec
sal_uInt64
mnCompressedCurrent
;
// CompressedEnd according to the spec
sal_uInt64
mnCompressedEnd
;
// DecompressedCurrent according to the spec
sal_uInt64
mnDecompressedCurrent
;
// DecompressedEnd according to the spec
sal_uInt64
mnDecompressedEnd
;
// Start of the current decompressed chunk
sal_uInt64
mnChunkStart
;
void
PackCompressedChunkSize
(
size_t
nSize
,
sal_uInt16
&
rHeader
);
void
PackCompressedChunkFlag
(
bool
bCompressed
,
sal_uInt16
&
rHeader
);
void
PackCompressedChunkSignature
(
sal_uInt16
&
rHeader
);
void
compressTokenSequence
();
void
compressToken
(
size_t
index
,
sal_uInt8
&
nFlagByte
);
void
SetFlagBit
(
size_t
index
,
bool
bVal
,
sal_uInt8
&
rFlag
);
sal_uInt16
CopyToken
(
size_t
nLength
,
size_t
nOffset
);
void
match
(
size_t
&
rLength
,
size_t
&
rOffset
);
void
CopyTokenHelp
(
sal_uInt16
&
rLengthMask
,
sal_uInt16
&
rOffsetMask
,
sal_uInt16
&
rBitCount
,
sal_uInt16
&
rMaximumLength
);
void
writeRawChunk
();
};
class
VBACompression
{
public
:
VBACompression
(
SvStream
&
rCompressedStream
,
SvMemoryStream
&
rUncompressedStream
);
void
write
();
private
:
SvStream
&
mrCompressedStream
;
SvMemoryStream
&
mrUncompressedStream
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
oox/source/ole/vbaexport.cxx
Dosyayı görüntüle @
4f1f317a
...
...
@@ -46,58 +46,7 @@ void exportUTF16String(SvStream& rStrm, const OUString& rString)
}
}
class
VBACompressionChunk
{
public
:
VBACompressionChunk
(
SvStream
&
rCompressedStream
,
const
sal_uInt8
*
pData
,
sal_Size
nChunkSize
);
void
write
();
private
:
SvStream
&
mrCompressedStream
;
const
sal_uInt8
*
mpUncompressedData
;
sal_uInt8
*
mpCompressedChunkStream
;
// same as DecompressedChunkEnd in the spec
sal_Size
mnChunkSize
;
// CompressedCurrent according to the spec
sal_uInt64
mnCompressedCurrent
;
// CompressedEnd according to the spec
sal_uInt64
mnCompressedEnd
;
// DecompressedCurrent according to the spec
sal_uInt64
mnDecompressedCurrent
;
// DecompressedEnd according to the spec
sal_uInt64
mnDecompressedEnd
;
// Start of the current decompressed chunk
sal_uInt64
mnChunkStart
;
void
PackCompressedChunkSize
(
size_t
nSize
,
sal_uInt16
&
rHeader
);
void
PackCompressedChunkFlag
(
bool
bCompressed
,
sal_uInt16
&
rHeader
);
void
PackCompressedChunkSignature
(
sal_uInt16
&
rHeader
);
void
compressTokenSequence
();
void
compressToken
(
size_t
index
,
sal_uInt8
&
nFlagByte
);
void
SetFlagBit
(
size_t
index
,
bool
bVal
,
sal_uInt8
&
rFlag
);
sal_uInt16
CopyToken
(
size_t
nLength
,
size_t
nOffset
);
void
match
(
size_t
&
rLength
,
size_t
&
rOffset
);
void
CopyTokenHelp
(
sal_uInt16
&
rLengthMask
,
sal_uInt16
&
rOffsetMask
,
sal_uInt16
&
rBitCount
,
sal_uInt16
&
rMaximumLength
);
void
writeRawChunk
();
};
}
VBACompressionChunk
::
VBACompressionChunk
(
SvStream
&
rCompressedStream
,
const
sal_uInt8
*
pData
,
sal_Size
nChunkSize
)
:
mrCompressedStream
(
rCompressedStream
),
...
...
@@ -328,19 +277,6 @@ void VBACompressionChunk::writeRawChunk()
}
}
class
VBACompression
{
public
:
VBACompression
(
SvStream
&
rCompressedStream
,
SvMemoryStream
&
rUncompressedStream
);
void
write
();
private
:
SvStream
&
mrCompressedStream
;
SvMemoryStream
&
mrUncompressedStream
;
};
VBACompression
::
VBACompression
(
SvStream
&
rCompressedStream
,
SvMemoryStream
&
rUncompressedStream
)
:
mrCompressedStream
(
rCompressedStream
),
...
...
@@ -368,8 +304,6 @@ void VBACompression::write()
}
}
}
VbaExport
::
VbaExport
(
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
xModel
)
:
mxModel
(
xModel
)
{
...
...
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