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
e78fc0be
Commit
e78fc0be
authored
Dec 14, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x2t - fix users files
parent
d9986d09
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10572 additions
and
871 deletions
+10572
-871
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
+891
-868
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
+2
-2
ASCOfficePPTXFile/Editor/Drawing/Elements.h
ASCOfficePPTXFile/Editor/Drawing/Elements.h
+1
-1
Common/3dParty/cryptopp/cryptlib.vcproj
Common/3dParty/cryptopp/cryptlib.vcproj
+9678
-0
No files found.
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
View file @
e78fc0be
...
...
@@ -1681,7 +1681,10 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
if
(
!
elem
)
return
;
std
::
wstring
strNameNode
=
oNodeShape
.
GetName
();
bool
bIsNeedCoordSizes
=
true
;
bool
bTextBox
=
false
;
bool
bPicture
=
false
;
std
::
wstring
strStyleAdvenced
=
L""
;
...
...
@@ -1911,9 +1914,38 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
oShapeElem
.
m_pShape
->
getBaseShape
()
->
m_oPath
.
SetCoordsize
(
21600
,
21600
);
}
if
(
pPPTShape
->
m_eType
==
PPTShapes
::
sptCTextBox
)
{
bTextBox
=
true
;
}
else
if
(
pPPTShape
->
m_eType
==
PPTShapes
::
sptCFrame
)
{
bPicture
=
true
;
}
std
::
wstring
strXmlPPTX
;
PPTX
::
Logic
::
Shape
*
pShape
=
new
PPTX
::
Logic
::
Shape
();
PPTX
::
Logic
::
Shape
*
pShape
=
NULL
;
//todoooo + CxnSp
PPTX
::
Logic
::
Pic
*
pPicture
=
NULL
;
PPTX
::
Logic
::
SpPr
*
pSpPr
=
NULL
;
PPTX
::
Logic
::
CNvPr
*
pCNvPr
=
NULL
;
if
(
bPicture
)
{
pPicture
=
new
PPTX
::
Logic
::
Pic
();
elem
->
InitElem
(
pPicture
);
pSpPr
=
&
pPicture
->
spPr
;
pCNvPr
=
&
pPicture
->
nvPicPr
.
cNvPr
;
strXmlPPTX
=
oShapeElem
.
ConvertPPTShapeToPPTX
(
true
);
}
else
{
pShape
=
new
PPTX
::
Logic
::
Shape
();
elem
->
InitElem
(
pShape
);
pSpPr
=
&
pShape
->
spPr
;
pCNvPr
=
&
pShape
->
nvSpPr
.
cNvPr
;
if
(
!
pShape
->
oTextBoxBodyPr
.
IsInit
())
pShape
->
oTextBoxBodyPr
=
new
PPTX
::
Logic
::
BodyPr
();
...
...
@@ -2508,10 +2540,6 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
strXmlPPTX
=
oShapeElem
.
ConvertPPTShapeToPPTX
(
true
);
}
XmlUtils
::
CXmlNode
oNodeG
;
oNodeG
.
FromXmlString
(
strXmlPPTX
);
pShape
->
spPr
.
Geometry
=
oNodeG
;
XmlUtils
::
CXmlNode
oNodeTextBox
;
std
::
wstring
sTextboxStyle
;
...
...
@@ -2646,10 +2674,18 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
}
}
}
if
(
bTextBox
)
{
pShape
->
nvSpPr
.
cNvSpPr
.
txBox
=
true
;
}
}
//-------------------------------------------------------------------------------------------------------------------
XmlUtils
::
CXmlNode
oNodeG
;
oNodeG
.
FromXmlString
(
strXmlPPTX
);
pSpPr
->
Geometry
=
oNodeG
;
std
::
wstring
strStyle
=
oNodeShape
.
GetAttribute
(
L"style"
);
if
(
L""
!=
strStyleAdvenced
)
strStyle
+=
strStyleAdvenced
;
std
::
wstring
strStyle
=
oNodeShape
.
GetAttribute
(
L"style"
)
+
strStyleAdvenced
;
PPTX
::
CCSS
oCSSParser
;
oCSSParser
.
LoadFromString2
(
strStyle
);
...
...
@@ -2657,9 +2693,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
CSpTreeElemProps
oProps
;
oProps
.
IsTop
=
bIsTop
;
std
::
wstring
strMainPos
=
GetDrawingMainProps
(
oNodeShape
,
oCSSParser
,
oProps
);
/////////////////////////////////////////text options
if
(
oCSSParser
.
m_mapSettings
.
size
()
>
0
)
//-------------------------------------------------------------------------------------------------------------------
if
(
pShape
&&
oCSSParser
.
m_mapSettings
.
size
()
>
0
)
{
std
::
map
<
std
::
wstring
,
std
::
wstring
>::
iterator
pPair
=
oCSSParser
.
m_mapSettings
.
find
(
L"v-text-anchor"
);
...
...
@@ -2694,16 +2729,16 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
if
(
m_oxfrm_override
.
IsInit
())
{
pS
hape
->
spPr
.
xfrm
=
m_oxfrm_override
;
pS
pPr
->
xfrm
=
m_oxfrm_override
;
}
else
{
//oProps.X выставлять не надо, они учтены в pMainProps
pS
hape
->
spPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pS
hape
->
spPr
.
xfrm
->
offX
=
0
;
pS
hape
->
spPr
.
xfrm
->
offY
=
0
;
pS
hape
->
spPr
.
xfrm
->
extX
=
oProps
.
Width
;
pS
hape
->
spPr
.
xfrm
->
extY
=
oProps
.
Height
;
pS
pPr
->
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pS
pPr
->
xfrm
->
offX
=
0
;
pS
pPr
->
xfrm
->
offY
=
0
;
pS
pPr
->
xfrm
->
extX
=
oProps
.
Width
;
pS
pPr
->
xfrm
->
extY
=
oProps
.
Height
;
}
std
::
map
<
std
::
wstring
,
std
::
wstring
>::
iterator
pPair
;
...
...
@@ -2712,20 +2747,20 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
if
(
oCSSParser
.
m_mapSettings
.
end
()
!=
pPair
)
{
if
(
pPair
->
second
==
L"x"
)
pS
hape
->
spPr
.
xfrm
->
flipH
=
true
;
pS
pPr
->
xfrm
->
flipH
=
true
;
else
if
(
pPair
->
second
==
L"y"
)
pS
hape
->
spPr
.
xfrm
->
flipV
=
true
;
pS
pPr
->
xfrm
->
flipV
=
true
;
else
if
((
pPair
->
second
==
L"xy"
)
||
(
pPair
->
second
==
L"yx"
)
||
(
pPair
->
second
==
L"x y"
)
||
(
pPair
->
second
==
L"y x"
))
{
pS
hape
->
spPr
.
xfrm
->
flipH
=
true
;
pS
hape
->
spPr
.
xfrm
->
flipV
=
true
;
pS
pPr
->
xfrm
->
flipH
=
true
;
pS
pPr
->
xfrm
->
flipV
=
true
;
}
}
pPair
=
oCSSParser
.
m_mapSettings
.
find
(
L"rotation"
);
if
(
oCSSParser
.
m_mapSettings
.
end
()
!=
pPair
)
{
pS
hape
->
spPr
.
xfrm
->
rot
=
NS_DWC_Common
::
getRotateAngle
(
pPair
->
second
,
pShape
->
spPr
.
xfrm
->
flipH
,
pShape
->
spPr
.
xfrm
->
flipV
);
pS
pPr
->
xfrm
->
rot
=
NS_DWC_Common
::
getRotateAngle
(
pPair
->
second
,
pSpPr
->
xfrm
->
flipH
,
pSpPr
->
xfrm
->
flipV
);
}
}
else
...
...
@@ -2736,11 +2771,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
m_pBinaryWriter
->
m_lCxCurShape
=
0
;
m_pBinaryWriter
->
m_lCyCurShape
=
0
;
pS
hape
->
spPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pS
hape
->
spPr
.
xfrm
->
offX
=
oProps
.
X
;
pS
hape
->
spPr
.
xfrm
->
offY
=
oProps
.
Y
;
pS
hape
->
spPr
.
xfrm
->
extX
=
oProps
.
Width
;
pS
hape
->
spPr
.
xfrm
->
extY
=
oProps
.
Height
;
pS
pPr
->
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pS
pPr
->
xfrm
->
offX
=
oProps
.
X
;
pS
pPr
->
xfrm
->
offY
=
oProps
.
Y
;
pS
pPr
->
xfrm
->
extX
=
oProps
.
Width
;
pS
pPr
->
xfrm
->
extY
=
oProps
.
Height
;
std
::
map
<
std
::
wstring
,
std
::
wstring
>::
iterator
pPair
;
...
...
@@ -2748,40 +2783,42 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
if
(
oCSSParser
.
m_mapSettings
.
end
()
!=
pPair
)
{
if
(
pPair
->
second
==
L"x"
)
pS
hape
->
spPr
.
xfrm
->
flipH
=
true
;
pS
pPr
->
xfrm
->
flipH
=
true
;
else
if
(
pPair
->
second
==
L"y"
)
pS
hape
->
spPr
.
xfrm
->
flipV
=
true
;
pS
pPr
->
xfrm
->
flipV
=
true
;
else
if
((
pPair
->
second
==
L"xy"
)
||
(
pPair
->
second
==
L"yx"
)
||
(
pPair
->
second
==
L"x y"
)
||
(
pPair
->
second
==
L"y x"
))
{
pS
hape
->
spPr
.
xfrm
->
flipH
=
true
;
pS
hape
->
spPr
.
xfrm
->
flipV
=
true
;
pS
pPr
->
xfrm
->
flipH
=
true
;
pS
pPr
->
xfrm
->
flipV
=
true
;
}
}
pPair
=
oCSSParser
.
m_mapSettings
.
find
(
L"rotation"
);
if
(
oCSSParser
.
m_mapSettings
.
end
()
!=
pPair
)
{
pS
hape
->
spPr
.
xfrm
->
rot
=
NS_DWC_Common
::
getRotateAngle
(
pPair
->
second
,
pShape
->
spPr
.
xfrm
->
flipH
,
pShape
->
spPr
.
xfrm
->
flipV
);
pS
pPr
->
xfrm
->
rot
=
NS_DWC_Common
::
getRotateAngle
(
pPair
->
second
,
pSpPr
->
xfrm
->
flipH
,
pSpPr
->
xfrm
->
flipV
);
}
}
if
(
!
bIsTop
)
{
p
Shape
->
nvSpPr
.
cNvPr
.
id
=
m_lNextId
;
p
CNvPr
->
id
=
m_lNextId
;
m_lNextId
++
;
}
else
{
p
Shape
->
nvSpPr
.
cNvPr
.
id
=
-
1
;
p
CNvPr
->
id
=
-
1
;
}
pShape
->
signatureLine
=
pPPTShape
->
m_oSignatureLine
;
elem
->
InitElem
(
pShape
);
if
(
pShape
)
{
pShape
->
signatureLine
=
pPPTShape
->
m_oSignatureLine
;
}
if
(
!
pPPTShape
->
IsWordArt
())
CheckPenShape
(
elem
,
oNodeShape
,
pPPTShape
->
m_eType
,
pPPTShape
);
CheckPenShape
(
elem
,
oNodeShape
,
pPPTShape
);
CheckBrushShape
(
elem
,
oNodeShape
,
pPPTShape
->
m_eType
,
pPPTShape
);
CheckBrushShape
(
elem
,
oNodeShape
,
pPPTShape
);
}
}
...
...
@@ -2904,7 +2941,8 @@ void CDrawingConverter::doc_LoadGroup(PPTX::Logic::SpTreeElem *result, XmlUtils:
pTree
->
grpSpPr
.
xfrm
->
chOffX
=
lCoordOriginX
;
pTree
->
grpSpPr
.
xfrm
->
chOffY
=
lCoordOriginY
;
pTree
->
grpSpPr
.
xfrm
->
chExtX
=
lCoordSizeW
;
pTree
->
grpSpPr
.
xfrm
->
chExtY
=
lCoordSizeH
;
}
pTree
->
grpSpPr
.
xfrm
->
chExtY
=
lCoordSizeH
;
}
else
{
pTree
->
grpSpPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
...
...
@@ -3484,8 +3522,16 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
{
oWriter
.
WriteString
(
L"<wp:wrapNone/>"
);
}
bool
bHidden
=
false
;
pPair
=
oCssStyles
.
m_mapSettings
.
find
(
L"visibility"
);
if
(
oCssStyles
.
m_mapSettings
.
end
()
!=
pPair
)
{
if
(
L"hidden"
==
pPair
->
second
)
bHidden
=
true
;
}
std
::
wstring
strId
=
L"<wp:docPr id=
\"
"
+
std
::
to_wstring
(
m_lNextId
)
+
L"
\"
name=
\"\"
/>"
;
std
::
wstring
strId
=
L"<wp:docPr id=
\"
"
+
std
::
to_wstring
(
m_lNextId
)
+
L"
\"
name=
\"\"
"
+
(
bHidden
?
L" hidden=
\"
true
\"
"
:
L""
)
+
L"/>"
;
m_lNextId
++
;
oWriter
.
WriteString
(
strId
);
...
...
@@ -3728,11 +3774,19 @@ void CDrawingConverter::SendMainProps(const std::wstring& strMainProps, std::wst
**
pMainProps
=
strMainProps
;
}
void
CDrawingConverter
::
CheckBrushShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
PPTShapes
::
ShapeType
eType
,
CPPTShape
*
pPPTShape
)
void
CDrawingConverter
::
CheckBrushShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
CPPTShape
*
pPPTShape
)
{
if
(
!
oElem
)
return
;
if
(
!
oElem
)
return
;
PPTX
::
Logic
::
Shape
*
pShape
=
dynamic_cast
<
PPTX
::
Logic
::
Shape
*>
(
oElem
->
GetElem
().
operator
->
());
PPTX
::
Logic
::
Pic
*
pPicture
=
dynamic_cast
<
PPTX
::
Logic
::
Pic
*>
(
oElem
->
GetElem
().
operator
->
());
PPTX
::
Logic
::
SpPr
*
pSpPr
=
NULL
;
PPTX
::
Logic
::
Shape
*
pShape
=
(
PPTX
::
Logic
::
Shape
*
)
dynamic_cast
<
PPTX
::
Logic
::
Shape
*>
(
oElem
->
GetElem
().
operator
->
());
if
(
pShape
)
pSpPr
=
&
pShape
->
spPr
;
if
(
pPicture
)
pSpPr
=
&
pPicture
->
spPr
;
if
(
!
pSpPr
)
return
;
int
R
=
255
;
int
G
=
255
;
...
...
@@ -3749,8 +3803,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
color
.
R
,
color
.
G
,
color
.
B
);
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pSolid
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
Fill
.
Fill
=
pSolid
;
}
else
if
(
!
pPPTShape
->
IsWordArt
())
{
...
...
@@ -3760,8 +3814,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
R
,
G
,
B
);
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pSolid
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
Fill
.
Fill
=
pSolid
;
}
nullable_string
sFilled
;
...
...
@@ -3773,8 +3827,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
PPTX
::
Logic
::
NoFill
*
pNoFill
=
new
PPTX
::
Logic
::
NoFill
();
pNoFill
->
m_namespace
=
L"a"
;
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pNoFill
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
pPr
->
Fill
.
Fill
=
pNoFill
;
}
}
else
if
(
!
pPPTShape
->
m_bIsFilled
)
...
...
@@ -3782,8 +3836,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
PPTX
::
Logic
::
NoFill
*
pNoFill
=
new
PPTX
::
Logic
::
NoFill
();
pNoFill
->
m_namespace
=
L"a"
;
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pNoFill
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
pPr
->
Fill
.
Fill
=
pNoFill
;
}
nullable_string
sOpacity
;
...
...
@@ -3792,13 +3846,13 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
{
BYTE
lAlpha
=
NS_DWC_Common
::
getOpacityFromString
(
*
sOpacity
);
if
(
pS
hape
->
spPr
.
Fill
.
is
<
PPTX
::
Logic
::
SolidFill
>
())
if
(
pS
pPr
->
Fill
.
is
<
PPTX
::
Logic
::
SolidFill
>
())
{
PPTX
::
Logic
::
ColorModifier
oMod
;
oMod
.
name
=
L"alpha"
;
int
nA
=
(
int
)(
lAlpha
*
100000.0
/
255.0
);
oMod
.
val
=
nA
;
pS
hape
->
spPr
.
Fill
.
as
<
PPTX
::
Logic
::
SolidFill
>
().
Color
.
Color
->
Modifiers
.
push_back
(
oMod
);
pS
pPr
->
Fill
.
as
<
PPTX
::
Logic
::
SolidFill
>
().
Color
.
Color
->
Modifiers
.
push_back
(
oMod
);
}
}
...
...
@@ -3822,8 +3876,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
color
.
R
,
color
.
G
,
color
.
B
);
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pSolid
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
Fill
.
Fill
=
pSolid
;
if
(
!
sFillColor
.
is_init
())
sFillColor
=
sColor
;
...
...
@@ -3844,8 +3898,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
pBlipFill
->
tile
=
new
PPTX
::
Logic
::
Tile
();
}
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
blipFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pBlipFill
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
blipFill
;
pS
pPr
->
Fill
.
Fill
=
pBlipFill
;
}
nullable_string
sRotate
;
oNodeFill
.
ReadAttributeBase
(
L"rotate"
,
sRotate
);
...
...
@@ -3926,23 +3980,23 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
if
(
*
sRotate
==
L"r"
)
pGradFill
->
lin
->
ang
=
180
*
60000
;
}
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
gradFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pGradFill
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
gradFill
;
pS
pPr
->
Fill
.
Fill
=
pGradFill
;
}
if
(
sOpacity
.
is_init
())
{
BYTE
lAlpha
=
NS_DWC_Common
::
getOpacityFromString
(
*
sOpacity
);
if
(
pS
hape
->
spPr
.
Fill
.
is
<
PPTX
::
Logic
::
SolidFill
>
())
if
(
pS
pPr
->
Fill
.
is
<
PPTX
::
Logic
::
SolidFill
>
())
{
PPTX
::
Logic
::
ColorModifier
oMod
;
oMod
.
name
=
L"alpha"
;
int
nA
=
(
int
)(
lAlpha
*
100000.0
/
255.0
);
oMod
.
val
=
nA
;
pS
hape
->
spPr
.
Fill
.
as
<
PPTX
::
Logic
::
SolidFill
>
().
Color
.
Color
->
Modifiers
.
push_back
(
oMod
);
pS
pPr
->
Fill
.
as
<
PPTX
::
Logic
::
SolidFill
>
().
Color
.
Color
->
Modifiers
.
push_back
(
oMod
);
}
else
if
(
pS
hape
->
spPr
.
Fill
.
is
<
PPTX
::
Logic
::
BlipFill
>
())
else
if
(
pS
pPr
->
Fill
.
is
<
PPTX
::
Logic
::
BlipFill
>
())
{
PPTX
::
Logic
::
AlphaModFix
*
pAlphaMod
=
new
PPTX
::
Logic
::
AlphaModFix
();
int
nA
=
(
int
)(
lAlpha
*
100000.0
/
255.0
);
...
...
@@ -3951,7 +4005,7 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
PPTX
::
Logic
::
UniEffect
oEff
;
oEff
.
InitPointer
(
pAlphaMod
);
pS
hape
->
spPr
.
Fill
.
as
<
PPTX
::
Logic
::
BlipFill
>
().
blip
->
Effects
.
push_back
(
oEff
);
pS
pPr
->
Fill
.
as
<
PPTX
::
Logic
::
BlipFill
>
().
blip
->
Effects
.
push_back
(
oEff
);
}
}
}
...
...
@@ -3989,9 +4043,6 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
}
pShape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
blipFill
;
pShape
->
spPr
.
Fill
.
Fill
=
pBlipFill
;
std
::
wstring
strCropT
=
oNodeFillID
.
GetAttribute
(
L"croptop"
);
std
::
wstring
strCropL
=
oNodeFillID
.
GetAttribute
(
L"cropleft"
);
std
::
wstring
strCropR
=
oNodeFillID
.
GetAttribute
(
L"cropright"
);
...
...
@@ -4027,20 +4078,32 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
else
pBlipFill
->
srcRect
->
b
=
str0
;
}
if
(
pShape
)
{
pSpPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
blipFill
;
pSpPr
->
Fill
.
Fill
=
pBlipFill
;
}
if
(
pPicture
)
{
pSpPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
notInit
;
pPicture
->
blipFill
=
*
pBlipFill
;
}
}
}
}
// default params
if
(
!
pS
hape
->
spPr
.
Fill
.
Fill
.
is_init
())
if
(
!
pS
pPr
->
Fill
.
Fill
.
is_init
())
{
if
(
pPPTShape
->
IsWordArt
())
{
PPTX
::
Logic
::
NoFill
*
pNoFill
=
new
PPTX
::
Logic
::
NoFill
();
pNoFill
->
m_namespace
=
L"a"
;
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pNoFill
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
pPr
->
Fill
.
Fill
=
pNoFill
;
}
else
{
...
...
@@ -4049,8 +4112,8 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
0xFF
,
0xFF
,
0xFF
);
pS
hape
->
spPr
.
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
Fill
.
Fill
=
pSolid
;
pS
pPr
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
Fill
.
Fill
=
pSolid
;
if
(
sOpacity
.
is_init
())
{
...
...
@@ -4064,11 +4127,19 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
}
}
}
void
CDrawingConverter
::
CheckPenShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
PPTShapes
::
ShapeType
eType
,
CPPTShape
*
pPPTShape
)
void
CDrawingConverter
::
CheckPenShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
CPPTShape
*
pPPTShape
)
{
if
(
!
oElem
)
return
;
PPTX
::
Logic
::
Shape
*
pShape
=
(
PPTX
::
Logic
::
Shape
*
)
dynamic_cast
<
PPTX
::
Logic
::
Shape
*>
(
oElem
->
GetElem
().
operator
->
());
PPTX
::
Logic
::
Shape
*
pShape
=
dynamic_cast
<
PPTX
::
Logic
::
Shape
*>
(
oElem
->
GetElem
().
operator
->
());
PPTX
::
Logic
::
Pic
*
pPicture
=
dynamic_cast
<
PPTX
::
Logic
::
Pic
*>
(
oElem
->
GetElem
().
operator
->
());
PPTX
::
Logic
::
SpPr
*
pSpPr
=
NULL
;
if
(
pShape
)
pSpPr
=
&
pShape
->
spPr
;
if
(
pPicture
)
pSpPr
=
&
pPicture
->
spPr
;
if
(
!
pSpPr
)
return
;
// attributes
nullable_string
sStrokeColor
;
...
...
@@ -4077,24 +4148,24 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
{
NSPresentationEditor
::
CColor
color
=
NS_DWC_Common
::
getColorFromString
(
*
sStrokeColor
);
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
PPTX
::
Logic
::
SolidFill
*
pSolid
=
new
PPTX
::
Logic
::
SolidFill
();
pSolid
->
m_namespace
=
L"a"
;
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
color
.
R
,
color
.
G
,
color
.
B
);
pS
hape
->
spPr
.
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
=
pSolid
;
pS
pPr
->
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
ln
->
Fill
.
Fill
=
pSolid
;
}
nullable_string
sStrokeWeight
;
oNode
.
ReadAttributeBase
(
L"strokeweight"
,
sStrokeWeight
);
if
(
sStrokeWeight
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
sStrokeWeight
->
length
()
>
0
&&
sStrokeWeight
->
at
(
0
)
==
wchar_t
(
'.'
))
{
...
...
@@ -4104,7 +4175,7 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
SimpleTypes
::
CPoint
oPoint
;
int
size
=
(
int
)(
g_emu_koef
*
oPoint
.
FromString
(
*
sStrokeWeight
));
pS
hape
->
spPr
.
ln
->
w
=
size
;
pS
pPr
->
ln
->
w
=
size
;
pPPTShape
->
m_bIsStroked
=
true
;
}
...
...
@@ -4114,20 +4185,20 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
{
if
(
*
sStroked
==
L"false"
||
*
sStroked
==
L"f"
)
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
pS
hape
->
spPr
.
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
=
new
PPTX
::
Logic
::
NoFill
();
pS
pPr
->
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
pPr
->
ln
->
Fill
.
Fill
=
new
PPTX
::
Logic
::
NoFill
();
}
}
else
if
(
!
pPPTShape
->
m_bIsStroked
)
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
pS
hape
->
spPr
.
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
=
new
PPTX
::
Logic
::
NoFill
();
pS
pPr
->
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
noFill
;
pS
pPr
->
ln
->
Fill
.
Fill
=
new
PPTX
::
Logic
::
NoFill
();
}
XmlUtils
::
CXmlNode
oNodeStroke
=
oNode
.
ReadNode
(
L"v:stroke"
);
...
...
@@ -4139,229 +4210,181 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
{
NSPresentationEditor
::
CColor
color
=
NS_DWC_Common
::
getColorFromString
(
*
sStrokeColor
);
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
PPTX
::
Logic
::
SolidFill
*
pSolid
=
new
PPTX
::
Logic
::
SolidFill
();
pSolid
->
m_namespace
=
L"a"
;
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
color
.
R
,
color
.
G
,
color
.
B
);
pS
hape
->
spPr
.
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
=
pSolid
;
pS
pPr
->
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
ln
->
Fill
.
Fill
=
pSolid
;
}
nullable_string
sStrokeDashStyle
;
oNodeStroke
.
ReadAttributeBase
(
L"dashstyle"
,
sStrokeDashStyle
);
if
(
sStrokeDashStyle
.
is_init
())
{
if
(
!
pShape
->
spPr
.
ln
.
is_init
())
pShape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
pShape
->
spPr
.
ln
->
prstDash
=
new
PPTX
::
Logic
::
PrstDash
();
if
(
*
sStrokeDashStyle
==
L"solid"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"solid"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdash"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"sysDash"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"sysDot"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdashdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"sysDashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdashdotdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"sysDashDotDot"
;
else
if
(
*
sStrokeDashStyle
==
L"dot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"dot"
;
else
if
(
*
sStrokeDashStyle
==
L"dash"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"dash"
;
else
if
(
*
sStrokeDashStyle
==
L"longdash"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"lgDash"
;
else
if
(
*
sStrokeDashStyle
==
L"dashdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"dashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"longdashdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"lgDashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"longdashdotdot"
)
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"lgDashDotDot"
;
else
pShape
->
spPr
.
ln
->
prstDash
->
val
=
L"solid"
;
if
(
!
pSpPr
->
ln
.
is_init
())
pSpPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
pSpPr
->
ln
->
prstDash
=
new
PPTX
::
Logic
::
PrstDash
();
if
(
*
sStrokeDashStyle
==
L"solid"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"solid"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdash"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"sysDash"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"sysDot"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdashdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"sysDashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"shortdashdotdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"sysDashDotDot"
;
else
if
(
*
sStrokeDashStyle
==
L"dot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"dot"
;
else
if
(
*
sStrokeDashStyle
==
L"dash"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"dash"
;
else
if
(
*
sStrokeDashStyle
==
L"longdash"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"lgDash"
;
else
if
(
*
sStrokeDashStyle
==
L"dashdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"dashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"longdashdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"lgDashDot"
;
else
if
(
*
sStrokeDashStyle
==
L"longdashdotdot"
)
pSpPr
->
ln
->
prstDash
->
val
=
L"lgDashDotDot"
;
else
pSpPr
->
ln
->
prstDash
->
val
=
L"solid"
;
}
nullable_string
sEndArraw
;
oNodeStroke
.
ReadAttributeBase
(
L"endarrow"
,
sEndArraw
);
if
(
sEndArraw
.
is_init
())
{
if
(
!
pShape
->
spPr
.
ln
.
is_init
())
pShape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
pShape
->
spPr
.
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sEndArraw
==
L"none"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"none"
;
else
if
(
*
sEndArraw
==
L"block"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"triangle"
;
else
if
(
*
sEndArraw
==
L"classic"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"stealth"
;
else
if
(
*
sEndArraw
==
L"diamond"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"diamond"
;
else
if
(
*
sEndArraw
==
L"oval"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"oval"
;
else
if
(
*
sEndArraw
==
L"open"
)
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"arrow"
;
else
pShape
->
spPr
.
ln
->
tailEnd
->
type
=
L"none"
;
if
(
!
pSpPr
->
ln
.
is_init
())
pSpPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
pSpPr
->
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sEndArraw
==
L"none"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"none"
;
else
if
(
*
sEndArraw
==
L"block"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"triangle"
;
else
if
(
*
sEndArraw
==
L"classic"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"stealth"
;
else
if
(
*
sEndArraw
==
L"diamond"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"diamond"
;
else
if
(
*
sEndArraw
==
L"oval"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"oval"
;
else
if
(
*
sEndArraw
==
L"open"
)
pSpPr
->
ln
->
tailEnd
->
type
=
L"arrow"
;
else
pSpPr
->
ln
->
tailEnd
->
type
=
L"none"
;
}
nullable_string
sEndArrawLen
;
oNodeStroke
.
ReadAttributeBase
(
L"endarrowlength"
,
sEndArrawLen
);
if
(
sEndArrawLen
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
hape
->
spPr
.
ln
->
tailEnd
.
is_init
())
pS
hape
->
spPr
.
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
!
pS
pPr
->
ln
->
tailEnd
.
is_init
())
pS
pPr
->
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sEndArrawLen
==
L"short"
)
pShape
->
spPr
.
ln
->
tailEnd
->
len
=
L"sm"
;
else
if
(
*
sEndArrawLen
==
L"medium"
)
pShape
->
spPr
.
ln
->
tailEnd
->
len
=
L"med"
;
else
if
(
*
sEndArrawLen
==
L"long"
)
pShape
->
spPr
.
ln
->
tailEnd
->
len
=
L"lg"
;
else
pShape
->
spPr
.
ln
->
tailEnd
->
len
=
L"med"
;
if
(
*
sEndArrawLen
==
L"short"
)
pSpPr
->
ln
->
tailEnd
->
len
=
L"sm"
;
else
if
(
*
sEndArrawLen
==
L"medium"
)
pSpPr
->
ln
->
tailEnd
->
len
=
L"med"
;
else
if
(
*
sEndArrawLen
==
L"long"
)
pSpPr
->
ln
->
tailEnd
->
len
=
L"lg"
;
else
pSpPr
->
ln
->
tailEnd
->
len
=
L"med"
;
}
nullable_string
sEndArrawWidth
;
oNodeStroke
.
ReadAttributeBase
(
L"endarrowwidth"
,
sEndArrawWidth
);
if
(
sEndArrawWidth
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
hape
->
spPr
.
ln
->
tailEnd
.
is_init
())
pS
hape
->
spPr
.
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
!
pS
pPr
->
ln
->
tailEnd
.
is_init
())
pS
pPr
->
ln
->
tailEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sEndArrawWidth
==
L"narrow"
)
pShape
->
spPr
.
ln
->
tailEnd
->
w
=
L"sm"
;
else
if
(
*
sEndArrawWidth
==
L"medium"
)
pShape
->
spPr
.
ln
->
tailEnd
->
w
=
L"med"
;
else
if
(
*
sEndArrawWidth
==
L"wide"
)
pShape
->
spPr
.
ln
->
tailEnd
->
w
=
L"lg"
;
else
pShape
->
spPr
.
ln
->
tailEnd
->
w
=
L"med"
;
if
(
*
sEndArrawWidth
==
L"narrow"
)
pSpPr
->
ln
->
tailEnd
->
w
=
L"sm"
;
else
if
(
*
sEndArrawWidth
==
L"medium"
)
pSpPr
->
ln
->
tailEnd
->
w
=
L"med"
;
else
if
(
*
sEndArrawWidth
==
L"wide"
)
pSpPr
->
ln
->
tailEnd
->
w
=
L"lg"
;
else
pSpPr
->
ln
->
tailEnd
->
w
=
L"med"
;
}
nullable_string
sStartArraw
;
oNodeStroke
.
ReadAttributeBase
(
L"startarrow"
,
sStartArraw
);
if
(
sStartArraw
.
is_init
())
{
if
(
!
pShape
->
spPr
.
ln
.
is_init
())
pShape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
pShape
->
spPr
.
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sStartArraw
==
L"none"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"none"
;
else
if
(
*
sStartArraw
==
L"block"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"triangle"
;
else
if
(
*
sStartArraw
==
L"classic"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"stealth"
;
else
if
(
*
sStartArraw
==
L"diamond"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"diamond"
;
else
if
(
*
sStartArraw
==
L"oval"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"oval"
;
else
if
(
*
sStartArraw
==
L"open"
)
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"arrow"
;
else
pShape
->
spPr
.
ln
->
headEnd
->
type
=
L"none"
;
if
(
!
pSpPr
->
ln
.
is_init
())
pSpPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
pSpPr
->
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sStartArraw
==
L"none"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"none"
;
else
if
(
*
sStartArraw
==
L"block"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"triangle"
;
else
if
(
*
sStartArraw
==
L"classic"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"stealth"
;
else
if
(
*
sStartArraw
==
L"diamond"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"diamond"
;
else
if
(
*
sStartArraw
==
L"oval"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"oval"
;
else
if
(
*
sStartArraw
==
L"open"
)
pSpPr
->
ln
->
headEnd
->
type
=
L"arrow"
;
else
pSpPr
->
ln
->
headEnd
->
type
=
L"none"
;
}
nullable_string
sStartArrawLen
;
oNodeStroke
.
ReadAttributeBase
(
L"startarrowlength"
,
sStartArrawLen
);
if
(
sStartArrawLen
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
hape
->
spPr
.
ln
->
headEnd
.
is_init
())
pS
hape
->
spPr
.
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
!
pS
pPr
->
ln
->
headEnd
.
is_init
())
pS
pPr
->
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sStartArrawLen
==
L"short"
)
pShape
->
spPr
.
ln
->
headEnd
->
len
=
L"sm"
;
else
if
(
*
sStartArrawLen
==
L"medium"
)
pShape
->
spPr
.
ln
->
headEnd
->
len
=
L"med"
;
else
if
(
*
sStartArrawLen
==
L"long"
)
pShape
->
spPr
.
ln
->
headEnd
->
len
=
L"lg"
;
else
pShape
->
spPr
.
ln
->
headEnd
->
len
=
L"med"
;
if
(
*
sStartArrawLen
==
L"short"
)
pSpPr
->
ln
->
headEnd
->
len
=
L"sm"
;
else
if
(
*
sStartArrawLen
==
L"medium"
)
pSpPr
->
ln
->
headEnd
->
len
=
L"med"
;
else
if
(
*
sStartArrawLen
==
L"long"
)
pSpPr
->
ln
->
headEnd
->
len
=
L"lg"
;
else
pSpPr
->
ln
->
headEnd
->
len
=
L"med"
;
}
nullable_string
sStartArrawWidth
;
oNodeStroke
.
ReadAttributeBase
(
L"startarrowwidth"
,
sStartArrawWidth
);
if
(
sStartArrawWidth
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
hape
->
spPr
.
ln
->
headEnd
.
is_init
())
pS
hape
->
spPr
.
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
!
pS
pPr
->
ln
->
headEnd
.
is_init
())
pS
pPr
->
ln
->
headEnd
=
new
PPTX
::
Logic
::
LineEnd
();
if
(
*
sStartArrawWidth
==
L"narrow"
)
pShape
->
spPr
.
ln
->
headEnd
->
w
=
L"sm"
;
else
if
(
*
sStartArrawWidth
==
L"medium"
)
pShape
->
spPr
.
ln
->
headEnd
->
w
=
L"med"
;
else
if
(
*
sStartArrawWidth
==
L"wide"
)
pShape
->
spPr
.
ln
->
headEnd
->
w
=
L"lg"
;
else
pShape
->
spPr
.
ln
->
headEnd
->
w
=
L"med"
;
if
(
*
sStartArrawWidth
==
L"narrow"
)
pSpPr
->
ln
->
headEnd
->
w
=
L"sm"
;
else
if
(
*
sStartArrawWidth
==
L"medium"
)
pSpPr
->
ln
->
headEnd
->
w
=
L"med"
;
else
if
(
*
sStartArrawWidth
==
L"wide"
)
pSpPr
->
ln
->
headEnd
->
w
=
L"lg"
;
else
pSpPr
->
ln
->
headEnd
->
w
=
L"med"
;
}
nullable_string
sEndCap
;
oNodeStroke
.
ReadAttributeBase
(
L"endcap"
,
sEndCap
);
if
(
sEndCap
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
*
sEndCap
==
L"flat"
)
pShape
->
spPr
.
ln
->
cap
=
L"flat"
;
else
if
(
*
sEndCap
==
L"round"
)
pShape
->
spPr
.
ln
->
cap
=
L"rnd"
;
else
if
(
*
sEndCap
==
L"square"
)
pShape
->
spPr
.
ln
->
cap
=
L"sq"
;
if
(
*
sEndCap
==
L"flat"
)
pSpPr
->
ln
->
cap
=
L"flat"
;
else
if
(
*
sEndCap
==
L"round"
)
pSpPr
->
ln
->
cap
=
L"rnd"
;
else
if
(
*
sEndCap
==
L"square"
)
pSpPr
->
ln
->
cap
=
L"sq"
;
}
nullable_string
sLineJoin
;
oNodeStroke
.
ReadAttributeBase
(
L"joinstyle"
,
sLineJoin
);
if
(
sLineJoin
.
is_init
())
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
*
sLineJoin
==
L"bevel"
)
pShape
->
spPr
.
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinBevel
;
else
if
(
*
sLineJoin
==
L"miter"
)
pShape
->
spPr
.
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinMiter
;
else
if
(
*
sLineJoin
==
L"round"
)
pShape
->
spPr
.
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinRound
;
if
(
*
sLineJoin
==
L"bevel"
)
pSpPr
->
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinBevel
;
else
if
(
*
sLineJoin
==
L"miter"
)
pSpPr
->
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinMiter
;
else
if
(
*
sLineJoin
==
L"round"
)
pSpPr
->
ln
->
Join
.
type
=
PPTX
::
Logic
::
JoinRound
;
}
}
// default params
if
(
eType
!=
PPTShapes
::
sptCFrame
)
if
(
pShape
)
// not Picture
{
if
(
!
pS
hape
->
spPr
.
ln
.
is_init
())
pS
hape
->
spPr
.
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
pPr
->
ln
.
is_init
())
pS
pPr
->
ln
=
new
PPTX
::
Logic
::
Ln
();
if
(
!
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
.
is_init
())
if
(
!
pS
pPr
->
ln
->
Fill
.
Fill
.
is_init
())
{
PPTX
::
Logic
::
SolidFill
*
pSolid
=
new
PPTX
::
Logic
::
SolidFill
();
pSolid
->
m_namespace
=
L"a"
;
pSolid
->
Color
.
Color
=
new
PPTX
::
Logic
::
SrgbClr
();
pSolid
->
Color
.
Color
->
SetRGB
(
0
,
0
,
0
);
pS
hape
->
spPr
.
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
hape
->
spPr
.
ln
->
Fill
.
Fill
=
pSolid
;
pS
pPr
->
ln
->
Fill
.
m_type
=
PPTX
::
Logic
::
UniFill
::
solidFill
;
pS
pPr
->
ln
->
Fill
.
Fill
=
pSolid
;
}
}
}
...
...
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
View file @
e78fc0be
...
...
@@ -276,8 +276,8 @@ namespace NSBinPptxRW
std
::
wstring
GetVMLShapeXml
(
CPPTShape
*
pPPTShape
);
std
::
wstring
GetVMLShapeXml
(
PPTX
::
Logic
::
SpTreeElem
&
oElem
);
void
CheckBrushShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
PPTShapes
::
ShapeType
eType
,
CPPTShape
*
pPPTShape
);
void
CheckPenShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
PPTShapes
::
ShapeType
eType
,
CPPTShape
*
pPPTShape
);
void
CheckBrushShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
CPPTShape
*
pPPTShape
);
void
CheckPenShape
(
PPTX
::
Logic
::
SpTreeElem
*
oElem
,
XmlUtils
::
CXmlNode
&
oNode
,
CPPTShape
*
pPPTShape
);
void
LoadCoordSize
(
XmlUtils
::
CXmlNode
&
oNode
,
::
CShapePtr
pShape
);
void
LoadCoordPos
(
XmlUtils
::
CXmlNode
&
oNode
,
::
CShapePtr
pShape
);
...
...
ASCOfficePPTXFile/Editor/Drawing/Elements.h
View file @
e78fc0be
...
...
@@ -591,7 +591,7 @@ namespace NSPresentationEditor
#else
std
::
wstring
ConvertPPTtoPPTX
(
CPPTShape
*
pPPTShape
,
const
NSGuidesVML
::
CFormParam
&
pCoef
,
bool
bIsNamespace
=
false
)
{
if
(
pPPTShape
->
m_eType
==
PPTShapes
::
sptCRect
||
pPPTShape
->
m_eType
==
PPTShapes
::
sptCFrame
)
if
(
pPPTShape
->
m_eType
==
PPTShapes
::
sptCRect
||
pPPTShape
->
m_eType
==
PPTShapes
::
sptCFrame
||
pPPTShape
->
m_eType
==
PPTShapes
::
sptCTextBox
)
{
if
(
bIsNamespace
)
{
...
...
Common/3dParty/cryptopp/cryptlib.vcproj
0 → 100644
View file @
e78fc0be
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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