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
3187eeab
Kaydet (Commit)
3187eeab
authored
Agu 23, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
small refactoring in the vba export code
Change-Id: I68a7c7700b8405f4fe2b75516deff684f21e256c
üst
4389db13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
vbaexport.cxx
oox/source/ole/vbaexport.cxx
+27
-17
No files found.
oox/source/ole/vbaexport.cxx
Dosyayı görüntüle @
3187eeab
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
#define CODEPAGE RTL_TEXTENCODING_MS_1252
#define CODEPAGE RTL_TEXTENCODING_MS_1252
#endif
#endif
#define VBA_EXPORT_DEBUG 1
namespace
{
namespace
{
void
exportString
(
SvStream
&
rStrm
,
const
OUString
&
rString
)
void
exportString
(
SvStream
&
rStrm
,
const
OUString
&
rString
)
...
@@ -582,11 +584,30 @@ void writePROJECTMODULES(SvStream& rStrm)
...
@@ -582,11 +584,30 @@ void writePROJECTMODULES(SvStream& rStrm)
// section 2.3.4.2
// section 2.3.4.2
void
exportDirStream
(
SvStream
&
rStrm
)
void
exportDirStream
(
SvStream
&
rStrm
)
{
{
writePROJECTINFORMATION
(
rStrm
);
SvMemoryStream
aDirStream
(
4096
,
4096
);
writePROJECTREFERENCES
(
rStrm
);
writePROJECTMODULES
(
rStrm
);
writePROJECTINFORMATION
(
aDirStream
);
rStrm
.
WriteUInt16
(
0x0010
);
// terminator
writePROJECTREFERENCES
(
aDirStream
);
rStrm
.
WriteUInt32
(
0x00000000
);
// reserved
writePROJECTMODULES
(
aDirStream
);
aDirStream
.
WriteUInt16
(
0x0010
);
// terminator
aDirStream
.
WriteUInt32
(
0x00000000
);
// reserved
aDirStream
.
Seek
(
0
);
#if VBA_EXPORT_DEBUG
const
OUString
aDirFileName
(
"/tmp/vba_dir_out.bin"
);
SvFileStream
aDirStreamDebug
(
aDirFileName
,
STREAM_READWRITE
);
aDirStreamDebug
.
WriteStream
(
aDirStream
);
aDirStream
.
Seek
(
0
);
#endif
// the stream for the compression
SvMemoryStream
aMemoryStream
(
4096
,
4096
);
aMemoryStream
.
WriteStream
(
aDirStream
);
VBACompression
aCompression
(
rStrm
,
aDirStream
);
aCompression
.
write
();
}
}
}
}
...
@@ -602,19 +623,8 @@ void VbaExport::exportVBA()
...
@@ -602,19 +623,8 @@ void VbaExport::exportVBA()
SotStorage
*
pVBAStream
=
aStorage
->
OpenSotStorage
(
"VBA"
,
STREAM_READWRITE
);
SotStorage
*
pVBAStream
=
aStorage
->
OpenSotStorage
(
"VBA"
,
STREAM_READWRITE
);
SotStorageStream
*
pDirStream
=
pVBAStream
->
OpenSotStream
(
"dir"
,
STREAM_READWRITE
);
SotStorageStream
*
pDirStream
=
pVBAStream
->
OpenSotStream
(
"dir"
,
STREAM_READWRITE
);
const
OUString
aDirFileName
(
"/tmp/vba_dir_out.bin"
);
SvFileStream
aDirStream
(
aDirFileName
,
STREAM_READWRITE
);
// export
// export
exportDirStream
(
aDirStream
);
exportDirStream
(
*
pDirStream
);
aDirStream
.
Seek
(
0
);
SvMemoryStream
aMemoryStream
(
4096
,
4096
);
aMemoryStream
.
WriteStream
(
aDirStream
);
VBACompression
aCompression
(
*
pDirStream
,
aMemoryStream
);
aCompression
.
write
();
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
xNameContainer
=
getBasicLibrary
();
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
xNameContainer
=
getBasicLibrary
();
css
::
uno
::
Sequence
<
OUString
>
aElementNames
=
xNameContainer
->
getElementNames
();
css
::
uno
::
Sequence
<
OUString
>
aElementNames
=
xNameContainer
->
getElementNames
();
...
...
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