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
4af8d396
Commit
4af8d396
authored
Apr 20, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocFormatReader - fix Календарный_график_учебного_процесса.doc (кривые ole-объекты)
parent
3ee9c0fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
ASCOfficeDocFile/DocDocxConverter/OleObject.h
ASCOfficeDocFile/DocDocxConverter/OleObject.h
+7
-3
ASCOfficeDocFile/DocDocxConverter/PictureDescriptor.cpp
ASCOfficeDocFile/DocDocxConverter/PictureDescriptor.cpp
+2
-0
ASCOfficeDocFile/DocDocxConverter/VirtualStreamReader.h
ASCOfficeDocFile/DocDocxConverter/VirtualStreamReader.h
+12
-7
No files found.
ASCOfficeDocFile/DocDocxConverter/OleObject.h
View file @
4af8d396
...
...
@@ -183,10 +183,14 @@ namespace DocFileFormat
//skip the CompObjHeader
reader
.
ReadBytes
(
28
,
false
);
this
->
UserType
=
reader
.
ReadLengthPrefixedAnsiString
();
this
->
ClipboardFormat
=
reader
.
ReadLengthPrefixedAnsiString
();
this
->
Program
=
reader
.
ReadLengthPrefixedAnsiString
();
int
sz_obj
=
reader
.
GetSize
()
-
reader
.
GetPosition
();
if
(
sz_obj
>
4
)
{
UserType
=
reader
.
ReadLengthPrefixedAnsiString
();
ClipboardFormat
=
reader
.
ReadLengthPrefixedAnsiString
();
Program
=
reader
.
ReadLengthPrefixedAnsiString
();
}
delete
pCompStream
;
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/PictureDescriptor.cpp
View file @
4af8d396
...
...
@@ -39,6 +39,8 @@ namespace DocFileFormat
VirtualStreamReader
reader
(
stream
,
fc
);
int
sz_stream
=
reader
.
GetSize
();
int
lcb
=
reader
.
ReadInt32
();
if
(
lcb
>
10000000
)
...
...
ASCOfficeDocFile/DocDocxConverter/VirtualStreamReader.h
View file @
4af8d396
...
...
@@ -27,7 +27,7 @@ public:
{
unsigned
short
rdUShort
=
0
;
if
(
(
stream
!=
NULL
)
&&
(
position
+
2
<
stream
->
size
())
)
if
(
stream
!=
NULL
)
{
stream
->
seek
(
position
);
stream
->
read
((
unsigned
char
*
)(
&
rdUShort
),
sizeof
(
rdUShort
));
...
...
@@ -42,7 +42,7 @@ public:
{
short
rdShort
=
0
;
if
(
(
stream
!=
NULL
)
&&
(
position
+
2
<
stream
->
size
())
)
if
(
stream
!=
NULL
)
{
stream
->
seek
(
position
);
stream
->
read
((
unsigned
char
*
)(
&
rdShort
),
sizeof
(
rdShort
));
...
...
@@ -57,7 +57,7 @@ public:
{
int
rdInt
=
0
;
if
(
(
stream
!=
NULL
)
&&
(
position
+
4
<
stream
->
size
())
)
if
(
stream
!=
NULL
)
{
stream
->
seek
(
position
);
stream
->
read
(
(
unsigned
char
*
)
&
rdInt
,
sizeof
(
rdInt
)
);
...
...
@@ -72,7 +72,7 @@ public:
{
int
rdUInt
=
0
;
if
(
(
stream
!=
NULL
)
&&
(
position
+
4
<
stream
->
size
())
)
if
(
stream
!=
NULL
)
{
stream
->
seek
(
position
);
stream
->
read
((
unsigned
char
*
)
&
rdUInt
,
sizeof
(
rdUInt
)
);
...
...
@@ -87,7 +87,7 @@ public:
{
unsigned
char
rdByte
=
0
;
if
(
(
stream
!=
NULL
)
&&
(
position
+
1
<
stream
->
size
())
)
if
(
this
->
stream
!=
NULL
)
{
stream
->
seek
(
position
);
stream
->
read
(
(
unsigned
char
*
)
&
rdByte
,
sizeof
(
rdByte
)
);
...
...
@@ -102,7 +102,7 @@ public:
{
unsigned
char
*
rdBytes
=
NULL
;
if
(
(
stream
!=
NULL
)
&&
(
count
>
0
)
&&
(
position
+
count
<
stream
->
size
())
)
if
(
(
stream
!=
NULL
)
&&
(
count
>
0
)
&&
isResultNeeded
)
{
rdBytes
=
new
unsigned
char
[
count
];
...
...
@@ -114,6 +114,10 @@ public:
position
+=
sizeof
(
unsigned
char
)
*
count
;
}
}
else
{
position
+=
sizeof
(
unsigned
char
)
*
count
;
}
return
rdBytes
;
}
...
...
@@ -221,6 +225,7 @@ public:
private:
POLE
::
uint64
position
;
POLE
::
uint64
position
;
//std::streampos position;
POLE
::
Stream
*
stream
;
};
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