Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
58c00745
Commit
58c00745
authored
Jun 24, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4015e8ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.cpp
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.cpp
+18
-14
ASCOfficePPTFile/PPTFormatLib/Reader/ReadStructures.cpp
ASCOfficePPTFile/PPTFormatLib/Reader/ReadStructures.cpp
+5
-5
No files found.
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.cpp
View file @
58c00745
...
@@ -198,7 +198,6 @@ void CPPTFileReader::ReadEncryptedSummary()
...
@@ -198,7 +198,6 @@ void CPPTFileReader::ReadEncryptedSummary()
if
(
!
pStream
)
return
;
if
(
!
pStream
)
return
;
SRecordHeader
oHeader
;
SRecordHeader
oHeader
;
ULONG
nRd
=
0
;
if
(
oHeader
.
ReadFromStream
(
pStream
)
==
false
)
if
(
oHeader
.
ReadFromStream
(
pStream
)
==
false
)
{
{
...
@@ -225,12 +224,10 @@ void CPPTFileReader::ReadDocumentSummary()
...
@@ -225,12 +224,10 @@ void CPPTFileReader::ReadDocumentSummary()
void
CPPTFileReader
::
ReadPictures
()
void
CPPTFileReader
::
ReadPictures
()
{
{
if
(
m_oDocumentInfo
.
m_arUsers
.
empty
())
return
;
if
(
m_oDocumentInfo
.
m_arUsers
.
empty
())
return
;
CFStreamPtr
pStream
=
GetPictureStream
();
CFStreamPtr
pStream
=
GetPictureStream
();
if
(
!
pStream
)
return
;
if
(
!
pStream
)
return
;
SRecordHeader
oHeader
;
ULONG
nRd
=
0
;
CRYPT
::
ECMADecryptor
*
pDecryptor
=
m_oDocumentInfo
.
m_arUsers
[
0
]
->
m_pDecryptor
;
CRYPT
::
ECMADecryptor
*
pDecryptor
=
m_oDocumentInfo
.
m_arUsers
[
0
]
->
m_pDecryptor
;
while
(
true
)
while
(
true
)
...
@@ -238,25 +235,32 @@ void CPPTFileReader::ReadPictures()
...
@@ -238,25 +235,32 @@ void CPPTFileReader::ReadPictures()
if
(
pStream
->
isEOF
())
if
(
pStream
->
isEOF
())
break
;
break
;
int
pos
=
pStream
->
getStreamPointer
();
int
pos
=
pStream
->
getStreamPointer
();
POLE
::
Stream
*
pStreamTmp
=
pStream
->
stream_
;
SRecordHeader
oHeader
;
if
(
pDecryptor
)
if
(
pDecryptor
)
{
{
m_oDocumentInfo
.
m_arUsers
[
0
]
->
DecryptStream
(
pStreamTmp
,
0
);
BYTE
pHeader
[
8
];
pStreamTmp
=
m_oDocumentInfo
.
m_arUsers
[
0
]
->
m_arStreamDecrypt
.
back
()
->
stream_
;
pStream
->
read
(
pHeader
,
8
);
pDecryptor
->
Decrypt
((
char
*
)
pHeader
,
8
,
0
);
unsigned
short
rec
=
0
;
memcpy
(
&
rec
,
pHeader
+
0
,
2
);
memcpy
(
&
oHeader
.
RecType
,
pHeader
+
2
,
2
);
memcpy
(
&
oHeader
.
RecLen
,
pHeader
+
4
,
4
);
}
oHeader
.
RecInstance
=
rec
>>
4
;
oHeader
.
ReadFromStream
(
pStreamTmp
);
oHeader
.
RecVersion
=
rec
-
(
oHeader
.
RecInstance
<<
4
);
}
else
oHeader
.
ReadFromStream
(
pStream
->
stream_
);
CRecordOfficeArtBlip
art_blip
;
CRecordOfficeArtBlip
art_blip
;
art_blip
.
m_strTmpDirectory
=
m_strTmpDirectory
;
art_blip
.
m_strTmpDirectory
=
m_strTmpDirectory
;
art_blip
.
m_oDocumentInfo
=
&
m_oDocumentInfo
;
art_blip
.
m_oDocumentInfo
=
&
m_oDocumentInfo
;
//
pStream
->
seekFromBegin
(
pos
+
8
);
pStreamTmp
=
pStream
->
stream_
;
//каждое поле отдельно нужно
art_blip
.
ReadFromStream
(
oHeader
,
pStream
Tmp
);
art_blip
.
ReadFromStream
(
oHeader
,
pStream
->
stream_
);
m_oDocumentInfo
.
m_mapStoreImageFile
[
pos
]
=
art_blip
.
m_sFileName
;
m_oDocumentInfo
.
m_mapStoreImageFile
[
pos
]
=
art_blip
.
m_sFileName
;
pStream
->
seekFromBegin
(
pos
+
oHeader
.
RecLen
+
8
);
pStream
->
seekFromBegin
(
pos
+
oHeader
.
RecLen
+
8
);
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/ReadStructures.cpp
View file @
58c00745
...
@@ -643,14 +643,14 @@ namespace NSPresentationEditor
...
@@ -643,14 +643,14 @@ namespace NSPresentationEditor
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
void
CMetaHeader
::
FromStream
(
POLE
::
Stream
*
pStream
,
CRYPT
::
ECMADecryptor
*
pDecryptor
)
void
CMetaHeader
::
FromStream
(
POLE
::
Stream
*
pStream
,
CRYPT
::
ECMADecryptor
*
pDecryptor
)
{
{
int
size
=
34
;
BYTE
pData
[
34
]
;
BYTE
*
pData
=
new
BYTE
[
size
];
pStream
->
read
(
pData
,
34
);
pStream
->
read
(
pData
,
size
);
if
(
pDecryptor
)
if
(
pDecryptor
)
{
{
pDecryptor
->
Decrypt
((
char
*
)
pData
,
size
,
0
);
pDecryptor
->
Decrypt
((
char
*
)
pData
,
34
,
0
);
}
}
MemoryStream
memStream
(
pData
,
size
,
false
);
MemoryStream
memStream
(
pData
,
34
,
false
);
cbSize
=
memStream
.
ReadUInt32
();
cbSize
=
memStream
.
ReadUInt32
();
...
...
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