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
72c43c3e
Commit
72c43c3e
authored
Apr 10, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocxFormat - write embedded docx elements to BinaryFile(doct)
parent
846caf6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
14 deletions
+34
-14
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
+2
-1
ASCOfficeDocxFile2/BinWriter/BinWriters.h
ASCOfficeDocxFile2/BinWriter/BinWriters.h
+32
-13
No files found.
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
View file @
72c43c3e
...
...
@@ -498,7 +498,8 @@ extern int g_nCurFormatVersion;
Chart2
=
25
,
CachedImage
=
26
,
SizeRelH
=
27
,
SizeRelV
=
28
SizeRelV
=
28
,
Embedded
=
29
};}
namespace
c_oSerEffectExtent
{
enum
c_oSerEffectExtent
{
...
...
ASCOfficeDocxFile2/BinWriter/BinWriters.h
View file @
72c43c3e
...
...
@@ -4975,18 +4975,37 @@ namespace BinDocxRW
}
case
OOX
:
:
et_w_object
:
{
int
nCurPos
=
m_oBcw
.
WriteItemStart
(
c_oSerRunType
::
object
);
//write Picture
OOX
::
Logic
::
CObject
*
pObject
=
static_cast
<
OOX
::
Logic
::
CObject
*>
(
item
);
CString
*
pXml
=
pObject
?
pObject
->
m_sXml
.
GetPointer
()
:
NULL
;
CString
sProgID
;
if
((
pObject
)
&&
(
pObject
->
m_oOleObject
.
IsInit
()))
sProgID
=
pObject
->
m_oOleObject
->
m_sProgId
.
get
().
GetString
();
int
nPosObject
=
m_oBcw
.
WriteItemStart
(
c_oSerRunType
::
object
);
CString
*
pXml
=
NULL
;
if
(
_T
(
"Word.Document"
)
==
sProgID
)
{
int
nPosEmbedded
=
m_oBcw
.
WriteItemStart
(
c_oSerImageType2
::
Embedded
);
OOX
::
Logic
::
CObject
*
pObject
=
static_cast
<
OOX
::
Logic
::
CObject
*>
(
item
)
;
pXml
=
pObject
->
m_sXml
.
GetPointer
(
);
OOX
::
Rels
::
CRelationShip
*
oRels
=
NULL
;
smart_ptr
<
OOX
::
File
>
pFile
=
m_oParamsDocumentWriter
.
m_pRels
->
Find
(
OOX
::
RId
(
pObject
->
m_oOleObject
->
m_oId
.
get
().
GetValue
())
);
//write equation
if
(
pObject
->
m_oOleObject
.
IsInit
())
CString
sLink
;
if
(
pFile
.
IsInit
()
&&
OOX
::
FileTypes
::
OleObject
==
pFile
->
type
())
{
OOX
::
HyperLink
*
pHyperlinkFile
=
static_cast
<
OOX
::
HyperLink
*>
(
pFile
.
operator
->
());
sLink
=
pHyperlinkFile
->
Uri
().
GetPath
();
}
OOX
::
CPath
path
(
sLink
);
OOX
::
CDocument
poDocumentEmbedded
(
path
,
path
);
WriteDocumentContent
(
poDocumentEmbedded
.
m_arrItems
);
m_oBcw
.
WriteItemEnd
(
nPosEmbedded
);
}
else
{
CString
sProgID
=
pObject
->
m_oOleObject
->
m_sProgId
.
get
().
GetString
();
//write equation
if
(
_T
(
"Equation.3"
)
==
sProgID
)
{
OOX
::
Rels
::
CRelationShip
*
oRels
=
NULL
;
...
...
@@ -5005,12 +5024,12 @@ namespace BinDocxRW
oReader
.
Parse
();
}
}
int
n
CurPos1
=
m_oBcw
.
WriteItemStart
(
c_oSerRunType
::
pptxDrawing
);
//write Picture
int
n
PosImageCache
=
m_oBcw
.
WriteItemStart
(
c_oSerRunType
::
pptxDrawing
);
WriteDrawing
(
pXml
,
NULL
,
NULL
);
m_oBcw
.
WriteItemEnd
(
n
CurPos1
);
m_oBcw
.
WriteItemEnd
(
n
CurPos
);
m_oBcw
.
WriteItemEnd
(
n
PosImageCache
);
m_oBcw
.
WriteItemEnd
(
n
PosObject
);
break
;
}
}
...
...
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