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
8ae0378e
Commit
8ae0378e
authored
May 12, 2016
by
konovalovsergey
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EffectExtent for inline shapes
parent
306b527a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
+14
-2
ASCOfficeDocxFile2/BinWriter/BinWriters.h
ASCOfficeDocxFile2/BinWriter/BinWriters.h
+9
-0
No files found.
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
View file @
8ae0378e
...
...
@@ -1982,9 +1982,21 @@ public:
__int64
emuWidth
=
(
__int64
)(
g_dKoef_mm_to_emu
*
Width
);
__int64
emuHeight
=
(
__int64
)(
g_dKoef_mm_to_emu
*
Height
);
if
(
false
==
bChart
)
sXml
.
AppendFormat
(
_T
(
"<wp:inline xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
distT=
\"
0
\"
distB=
\"
0
\"
distL=
\"
0
\"
distR=
\"
0
\"
><wp:extent cx=
\"
%lld
\"
cy=
\"
%lld
\"
/>
<wp:docPr id=
\"
%d
\"
name=
\"\"
/></wp:inline>"
),
emuWidth
,
emuHeight
,
m_nDocPr
);
sXml
.
AppendFormat
(
_T
(
"<wp:inline xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
distT=
\"
0
\"
distB=
\"
0
\"
distL=
\"
0
\"
distR=
\"
0
\"
><wp:extent cx=
\"
%lld
\"
cy=
\"
%lld
\"
/>
"
),
emuWidth
,
emuHeight
);
else
sXml
.
AppendFormat
(
_T
(
"<w:drawing><wp:inline distT=
\"
0
\"
distB=
\"
0
\"
distL=
\"
0
\"
distR=
\"
0
\"
><wp:extent cx=
\"
%lld
\"
cy=
\"
%lld
\"
/><wp:effectExtent l=
\"
0
\"
t=
\"
0
\"
r=
\"
0
\"
b=
\"
0
\"
/><wp:docPr id=
\"
%d
\"
name=
\"
Chart %d
\"
/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
><a:graphicData uri=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
><c:chart xmlns:c=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
r:id=
\"
%ls
\"
/></a:graphicData></a:graphic></wp:inline></w:drawing>"
),
emuWidth
,
emuHeight
,
m_nDocPr
,
m_nDocPr
,
(
const
TCHAR
*
)
sChartRels
);
sXml
.
AppendFormat
(
_T
(
"<w:drawing><wp:inline distT=
\"
0
\"
distB=
\"
0
\"
distL=
\"
0
\"
distR=
\"
0
\"
><wp:extent cx=
\"
%lld
\"
cy=
\"
%lld
\"
/>"
),
emuWidth
,
emuHeight
);
if
(
bEffectExtentL
&&
bEffectExtentT
&&
bEffectExtentR
&&
bEffectExtentB
)
{
__int64
emuEffectExtentL
=
(
__int64
)(
g_dKoef_mm_to_emu
*
EffectExtentL
);
__int64
emuEffectExtentT
=
(
__int64
)(
g_dKoef_mm_to_emu
*
EffectExtentT
);
__int64
emuEffectExtentR
=
(
__int64
)(
g_dKoef_mm_to_emu
*
EffectExtentR
);
__int64
emuEffectExtentB
=
(
__int64
)(
g_dKoef_mm_to_emu
*
EffectExtentB
);
sXml
.
AppendFormat
(
_T
(
"<wp:effectExtent l=
\"
%lld
\"
t=
\"
%lld
\"
r=
\"
%lld
\"
b=
\"
%lld
\"
/>"
),
emuEffectExtentL
,
emuEffectExtentT
,
emuEffectExtentR
,
emuEffectExtentB
);
}
if
(
false
==
bChart
)
sXml
.
AppendFormat
(
_T
(
"<wp:docPr id=
\"
%d
\"
name=
\"\"
/></wp:inline>"
),
m_nDocPr
);
else
sXml
.
AppendFormat
(
_T
(
"<wp:docPr id=
\"
%d
\"
name=
\"
Chart %d
\"
/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
><a:graphicData uri=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
><c:chart xmlns:c=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
r:id=
\"
%ls
\"
/></a:graphicData></a:graphic></wp:inline></w:drawing>"
),
m_nDocPr
,
m_nDocPr
,
(
const
TCHAR
*
)
sChartRels
);
}
}
else
...
...
ASCOfficeDocxFile2/BinWriter/BinWriters.h
View file @
8ae0378e
...
...
@@ -5203,6 +5203,15 @@ namespace BinDocxRW
nCurPos
=
m_oBcw
.
WriteItemWithLengthStart
();
WriteExtent
(
pInline
.
m_oExtent
.
get
());
m_oBcw
.
WriteItemWithLengthEnd
(
nCurPos
);
//EffectExtent
if
(
pInline
.
m_oEffectExtent
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerImageType2
::
EffectExtent
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Variable
);
nCurPos
=
m_oBcw
.
WriteItemWithLengthStart
();
WriteEffectExtent
(
pInline
.
m_oEffectExtent
.
get
());
m_oBcw
.
WriteItemWithLengthEnd
(
nCurPos
);
}
}
}
else
if
(
img
.
m_oAnchor
.
IsInit
()
)
...
...
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