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
b7e9e3e4
Commit
b7e9e3e4
authored
Jul 25, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocFormatReader - fix bug
parent
ce6c064a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
ASCOfficeDocFile/DocDocxConverter/OfficeDrawing/Record.cpp
ASCOfficeDocFile/DocDocxConverter/OfficeDrawing/Record.cpp
+17
-10
No files found.
ASCOfficeDocFile/DocDocxConverter/OfficeDrawing/Record.cpp
View file @
b7e9e3e4
...
...
@@ -35,8 +35,8 @@ namespace DocFileFormat
{
Record
::~
Record
()
{
RELEASEARRAYOBJECTS
(
this
->
RawData
);
RELEASEOBJECT
(
this
->
Reader
);
RELEASEARRAYOBJECTS
(
RawData
);
RELEASEOBJECT
(
Reader
);
}
/*========================================================================================================*/
...
...
@@ -53,20 +53,27 @@ namespace DocFileFormat
HeaderSize
(
0
),
BodySize
(
0
),
RawData
(
NULL
),
SiblingIdx
(
0
),
TypeCode
(
0
),
Version
(
0
),
Instance
(
0
),
Reader
(
NULL
),
_ParentRecord
(
NULL
)
{
this
->
BodySize
=
bodySize
;
this
->
TypeCode
=
typeCode
;
this
->
Version
=
version
;
this
->
Instance
=
instance
;
this
->
HeaderSize
=
Record
::
HEADER_SIZE_IN_BYTES
;
BodySize
=
bodySize
;
TypeCode
=
typeCode
;
Version
=
version
;
Instance
=
instance
;
HeaderSize
=
Record
::
HEADER_SIZE_IN_BYTES
;
this
->
RawData
=
_reader
->
ReadBytes
(
(
int
)
this
->
BodySize
,
true
);
this
->
Reader
=
new
MemoryStream
(
this
->
RawData
,
this
->
BodySize
,
false
);
int
real_size
=
_reader
->
GetSize
()
-
_reader
->
GetPosition
();
if
(
real_size
<
BodySize
)
{
BodySize
=
real_size
;
}
RawData
=
_reader
->
ReadBytes
(
BodySize
,
true
);
Reader
=
new
MemoryStream
(
RawData
,
BodySize
,
false
);
}
/*========================================================================================================*/
unsigned
int
Record
::
GetTotalSize
()
const
{
return
(
this
->
HeaderSize
+
this
->
BodySize
);
return
(
HeaderSize
+
BodySize
);
}
}
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