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
2352ae5d
Commit
2352ae5d
authored
May 11, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PptFormatReader - fix line shape ends
parent
2cba43e6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
233 additions
and
237 deletions
+233
-237
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
+1
-1
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
+62
-4
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
+1
-0
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
+36
-37
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
...ficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
+107
-185
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
+4
-0
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
+22
-10
No files found.
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
View file @
2352ae5d
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8
.
00"
Version=
"8
,
00"
Name=
"OdfFileReaderTest"
ProjectGUID=
"{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
RootNamespace=
"ASCOfficeOdfFileTest"
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
View file @
2352ae5d
...
...
@@ -293,21 +293,79 @@ NSPresentationEditor::CShapeWriter::CShapeWriter()
m_pImageElement
=
NULL
;
m_pShapeElement
=
NULL
;
}
std
::
wstring
NSPresentationEditor
::
CShapeWriter
::
ConvertLine
(
CPen
&
pen
)
std
::
wstring
NSPresentationEditor
::
CShapeWriter
::
ConvertLine
(
CPen
&
pen
)
{
NSPresentationEditor
::
CStringWriter
line_writer
;
std
::
wstring
str
=
std
::
to_wstring
(
(
int
)(
pen
.
Size
*
36000
));
line_writer
.
WriteString
(
L"<a:ln w=
\"
"
+
str
+
L"
\"
>"
);
std
::
wstring
strL
;
switch
(
pen
.
LineStyle
)
{
case
1
:
strL
=
L" cmpd=
\"
dbl
\"
"
;
break
;
case
2
:
strL
=
L" cmpd=
\"
thickThin
\"
"
;
break
;
case
3
:
strL
=
L" cmpd=
\"
thinThick
\"
"
;
break
;
case
4
:
strL
=
L" cmpd=
\"
tri
\"
"
;
break
;
}
line_writer
.
WriteString
(
L"<a:ln w=
\"
"
+
std
::
to_wstring
((
int
)(
pen
.
Size
*
36000
))
+
L"
\"
"
+
strL
+
L">"
);
line_writer
.
WriteString
(
L"<a:solidFill>"
);
line_writer
.
WriteString
(
ConvertColor
(
pen
.
Color
,
pen
.
Alpha
));
line_writer
.
WriteString
(
L"</a:solidFill>"
);
line_writer
.
WriteString
(
L"<a:round/><a:headEnd/><a:tailEnd/></a:ln>"
);
switch
(
pen
.
DashStyle
)
{
case
1
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
sysDash
\"
/>"
);
break
;
case
2
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
sysDot
\"
/>"
);
break
;
case
3
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
sysDashDot
\"
/>"
);
break
;
case
4
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
sysDashDotDot
\"
/>"
);
break
;
case
5
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
dot
\"
/>"
);
break
;
case
6
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
dash
\"
/>"
);
break
;
case
7
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
lgDash
\"
/>"
);
break
;
case
8
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
dashDot
\"
/>"
);
break
;
case
9
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
lgDashDot
\"
/>"
);
break
;
case
10
:
line_writer
.
WriteString
(
L"<a:prstDash val=
\"
lgDashDotDot
\"
/>"
);
break
;
}
switch
(
pen
.
LineJoin
)
{
case
0
:
line_writer
.
WriteString
(
L"<a:bevel/>"
);
break
;
case
1
:
line_writer
.
WriteString
(
L"<a:miter/>"
);
break
;
case
2
:
line_writer
.
WriteString
(
L"<a:round/>"
);
break
;
}
line_writer
.
WriteString
(
L"<a:headEnd"
+
ConvertLineEnd
(
pen
.
LineStartCap
,
pen
.
LineStartLength
,
pen
.
LineStartWidth
)
+
L"/>"
);
line_writer
.
WriteString
(
L"<a:tailEnd"
+
ConvertLineEnd
(
pen
.
LineEndCap
,
pen
.
LineEndLength
,
pen
.
LineEndWidth
)
+
L"/>"
);
line_writer
.
WriteString
(
L"</a:ln>"
);
return
line_writer
.
GetData
();
}
std
::
wstring
NSPresentationEditor
::
CShapeWriter
::
ConvertLineEnd
(
unsigned
char
cap
,
unsigned
char
length
,
unsigned
char
width
)
{
if
(
cap
<
1
)
return
L""
;
std
::
wstring
sResult
;
switch
(
cap
)
{
case
1
:
sResult
+=
L" type=
\"
triangle
\"
"
;
break
;
case
2
:
sResult
+=
L" type=
\"
stealth
\"
"
;
break
;
case
3
:
sResult
+=
L" type=
\"
diamond
\"
"
;
break
;
case
4
:
sResult
+=
L" type=
\"
oval
\"
"
;
break
;
case
5
:
sResult
+=
L" type=
\"
arrow
\"
"
;
break
;
}
switch
(
length
)
{
case
0
:
sResult
+=
L" len=
\"
sm
\"
"
;
break
;
case
1
:
sResult
+=
L" len=
\"
med
\"
"
;
break
;
case
2
:
sResult
+=
L" len=
\"
lg
\"
"
;
break
;
}
switch
(
width
)
{
case
0
:
sResult
+=
L" w=
\"
sm
\"
"
;
break
;
case
1
:
sResult
+=
L" w=
\"
med
\"
"
;
break
;
case
2
:
sResult
+=
L" w=
\"
lg
\"
"
;
break
;
}
return
sResult
;
}
std
::
wstring
NSPresentationEditor
::
CShapeWriter
::
ConvertBrush
(
CBrush
&
brush
)
{
NSPresentationEditor
::
CStringWriter
brush_writer
;
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
View file @
2352ae5d
...
...
@@ -213,6 +213,7 @@ namespace NSPresentationEditor
std
::
wstring
ConvertShadow
(
CShadow
&
shadow
);
std
::
wstring
ConvertBrush
(
CBrush
&
brush
);
static
std
::
wstring
ConvertColor
(
CColor
&
color
,
long
alpha
);
std
::
wstring
ConvertLineEnd
(
unsigned
char
cap
,
unsigned
char
length
,
unsigned
char
width
);
// тип рендерера-----------------------------------------------------------------------------
virtual
HRESULT
get_Type
(
LONG
*
lType
)
;
//-------- Функции для работы со страницей --------------------------------------------------
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
View file @
2352ae5d
...
...
@@ -401,48 +401,47 @@ static std::string GetRecordName(DWORD dwType)
case
RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12
:
{
strName
=
(
"RoundTripNotesMasterTextStyles12"
);
break
;
}
case
RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12
:
{
strName
=
(
"RoundTripCustomTableStyles12"
);
break
;
}
//records greater then 0xF000 belong to with Microsoft Office Drawing format also known as Escher
case
RECORD_TYPE_ESCHER_DGG_CONTAINER
:
{
strName
=
(
"Escher_DrawingGroupContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_DGG
:
{
strName
=
(
"Escher_DrawingGroupRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLSID
:
{
strName
=
(
"Escher_CLSID_Record"
);
break
;
}
case
RECORD_TYPE_ESCHER_OPT
:
{
strName
=
(
"Escher_OPT"
);
break
;
}
case
RECORD_TYPE_ESCHER_BSTORE_CONTAINER
:
{
strName
=
(
"Escher_BlipStoreContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_BSE
:
{
strName
=
(
"Escher_BlipStoreEntry"
);
break
;
}
case
RECORD_TYPE_ESCHER_BLIP_START
:
{
strName
=
(
"Escher_BlipStart"
);
break
;
}
case
RECORD_TYPE_ESCHER_BLIP_END
:
{
strName
=
(
"Escher_BlipEnd"
);
break
;
}
case
RECORD_TYPE_ESCHER_DG_CONTAINER
:
{
strName
=
(
"Escher_DrawingContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_DG
:
{
strName
=
(
"Escher_DrawingRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_REGROUPITEMS
:
{
strName
=
(
"Escher_RegGroupItems"
);
break
;
}
case
RECORD_TYPE_ESCHER_COLORSCHEME
:
{
strName
=
(
"Escher_ColorSheme"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPGR_CONTAINER
:
{
strName
=
(
"Escher_GroupShapeContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_SP_CONTAINER
:
{
strName
=
(
"Escher_ShapeContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPGR
:
{
strName
=
(
"Escher_GroupShapeRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_SP
:
{
strName
=
(
"Escher_ShapeRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_TEXTBOX
:
{
strName
=
(
"Escher_TextBox"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTTEXTBOX
:
{
strName
=
(
"Escher_ClientTextBox"
);
break
;
}
case
RECORD_TYPE_ESCHER_ANCHOR
:
{
strName
=
(
"Escher_Anchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CHILDANCHOR
:
{
strName
=
(
"Escher_ChildAnchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTANCHOR
:
{
strName
=
(
"Escher_ClientAnchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTDATA
:
{
strName
=
(
"Escher_ClientData"
);
break
;
}
case
RECORD_TYPE_ESCHER_SOLVERCONTAINER
:
{
strName
=
(
"Escher_SolverContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_CONNECTORRULE
:
{
strName
=
(
"Escher_ConnectorRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_ALIGNRULE
:
{
strName
=
(
"Escher_AlignRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_ARCRULE
:
{
strName
=
(
"Escher_ArcRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTRULE
:
{
strName
=
(
"Escher_ClientRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_CALLOUTRULE
:
{
strName
=
(
"Escher_CallOutRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_SELECTION
:
{
strName
=
(
"Escher_Selection"
);
break
;
}
case
RECORD_TYPE_ESCHER_COLORMRU
:
{
strName
=
(
"Escher_ColorMRU"
);
break
;
}
case
RECORD_TYPE_ESCHER_DELETEDPSPL
:
{
strName
=
(
"Escher_DeletedPSPL"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPLITMENUCOLORS
:
{
strName
=
(
"Escher_SplitMenuColors"
);
break
;
}
case
RECORD_TYPE_ESCHER_OLEOBJECT
:
{
strName
=
(
"Escher_OleObject"
);
break
;
}
case
RECORD_TYPE_ESCHER_SECONDARY_OPT
:
{
strName
=
(
"Escher_SecondaryOPT"
);
break
;
}
case
RECORD_TYPE_ESCHER_TETRIARY_OPT
:
{
strName
=
(
"Escher_TetriaryOPT"
);
break
;
}
case
RECORD_TYPE_ESCHER_DGG_CONTAINER
:
{
strName
=
(
"DrawingGroupContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_DGG
:
{
strName
=
(
"DrawingGroupRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLSID
:
{
strName
=
(
"CLSID_Record"
);
break
;
}
case
RECORD_TYPE_ESCHER_OPT
:
{
strName
=
(
"OPT"
);
break
;
}
case
RECORD_TYPE_ESCHER_BSTORE_CONTAINER
:
{
strName
=
(
"BlipStoreContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_BSE
:
{
strName
=
(
"BlipStoreEntry"
);
break
;
}
case
RECORD_TYPE_ESCHER_BLIP_START
:
{
strName
=
(
"BlipStart"
);
break
;
}
case
RECORD_TYPE_ESCHER_BLIP_END
:
{
strName
=
(
"BlipEnd"
);
break
;
}
case
RECORD_TYPE_ESCHER_DG_CONTAINER
:
{
strName
=
(
"DrawingContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_DG
:
{
strName
=
(
"DrawingRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_REGROUPITEMS
:
{
strName
=
(
"RegGroupItems"
);
break
;
}
case
RECORD_TYPE_ESCHER_COLORSCHEME
:
{
strName
=
(
"ColorSheme"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPGR_CONTAINER
:
{
strName
=
(
"GroupShapeContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_SP_CONTAINER
:
{
strName
=
(
"ShapeContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPGR
:
{
strName
=
(
"GroupShapeRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_SP
:
{
strName
=
(
"ShapeRecord"
);
break
;
}
case
RECORD_TYPE_ESCHER_TEXTBOX
:
{
strName
=
(
"TextBox"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTTEXTBOX
:
{
strName
=
(
"ClientTextBox"
);
break
;
}
case
RECORD_TYPE_ESCHER_ANCHOR
:
{
strName
=
(
"Anchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CHILDANCHOR
:
{
strName
=
(
"ChildAnchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTANCHOR
:
{
strName
=
(
"ClientAnchor"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTDATA
:
{
strName
=
(
"ClientData"
);
break
;
}
case
RECORD_TYPE_ESCHER_SOLVERCONTAINER
:
{
strName
=
(
"SolverContainer"
);
break
;
}
case
RECORD_TYPE_ESCHER_CONNECTORRULE
:
{
strName
=
(
"ConnectorRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_ALIGNRULE
:
{
strName
=
(
"AlignRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_ARCRULE
:
{
strName
=
(
"ArcRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_CLIENTRULE
:
{
strName
=
(
"ClientRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_CALLOUTRULE
:
{
strName
=
(
"CallOutRule"
);
break
;
}
case
RECORD_TYPE_ESCHER_SELECTION
:
{
strName
=
(
"Selection"
);
break
;
}
case
RECORD_TYPE_ESCHER_COLORMRU
:
{
strName
=
(
"ColorMRU"
);
break
;
}
case
RECORD_TYPE_ESCHER_DELETEDPSPL
:
{
strName
=
(
"DeletedPSPL"
);
break
;
}
case
RECORD_TYPE_ESCHER_SPLITMENUCOLORS
:
{
strName
=
(
"SplitMenuColors"
);
break
;
}
case
RECORD_TYPE_ESCHER_OLEOBJECT
:
{
strName
=
(
"OleObject"
);
break
;
}
case
RECORD_TYPE_ESCHER_SECONDARY_OPT
:
{
strName
=
(
"SecondaryOPT"
);
break
;
}
case
RECORD_TYPE_ESCHER_TETRIARY_OPT
:
{
strName
=
(
"TetriaryOPT"
);
break
;
}
default:
break
;
};
if
((
dwType
>
RECORD_TYPE_ESCHER_BLIP_START
)
&&
(
dwType
<
RECORD_TYPE_ESCHER_BLIP_END
))
{
strName
=
(
"
Escher_
Blip"
);
strName
=
(
"Blip"
);
}
return
strName
;
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
View file @
2352ae5d
...
...
@@ -575,212 +575,134 @@ public:
}
// line --------------------------------------------------------
case
lineBoolean
:
//Line Style Boolean Properties
{
bool
bNoLineDrawDash
=
GETBIT
(
pProperty
->
m_lValue
,
0
);
bool
bLineFillShape
=
GETBIT
(
pProperty
->
m_lValue
,
1
);
bool
bHitTestLine
=
GETBIT
(
pProperty
->
m_lValue
,
2
);
bool
bLine
=
GETBIT
(
pProperty
->
m_lValue
,
3
);
bool
bArrowheadsOK
=
GETBIT
(
pProperty
->
m_lValue
,
4
);
bool
bInsetPenOK
=
GETBIT
(
pProperty
->
m_lValue
,
5
);
bool
bInsetPen
=
GETBIT
(
pProperty
->
m_lValue
,
6
);
bool
bLineOpaqueBackColor
=
GETBIT
(
pProperty
->
m_lValue
,
9
);
bool
bUsefNoLineDrawDash
=
GETBIT
(
pProperty
->
m_lValue
,
16
);
bool
bUsefLineFillShape
=
GETBIT
(
pProperty
->
m_lValue
,
17
);
bool
bUsefHitTestLine
=
GETBIT
(
pProperty
->
m_lValue
,
18
);
bool
bUsefLine
=
GETBIT
(
pProperty
->
m_lValue
,
19
);
bool
bUsefArrowheadsOK
=
GETBIT
(
pProperty
->
m_lValue
,
20
);
bool
bUsefInsetPenOK
=
GETBIT
(
pProperty
->
m_lValue
,
21
);
bool
bUsefInsetPen
=
GETBIT
(
pProperty
->
m_lValue
,
22
);
bool
bUsefLineOpaqueBackColor
=
GETBIT
(
pProperty
->
m_lValue
,
25
);
if
(
bUsefLine
)
pElement
->
m_bLine
=
bLine
;
}
break
;
case
lineStyle
:
{
bool
bNoLineDrawDash
=
GETBIT
(
pProperty
->
m_lValue
,
0
);
bool
bLineFillShape
=
GETBIT
(
pProperty
->
m_lValue
,
1
);
bool
bHitTestLine
=
GETBIT
(
pProperty
->
m_lValue
,
2
);
bool
bLine
=
GETBIT
(
pProperty
->
m_lValue
,
3
);
bool
bArrowheadsOK
=
GETBIT
(
pProperty
->
m_lValue
,
4
);
bool
bInsetPenOK
=
GETBIT
(
pProperty
->
m_lValue
,
5
);
bool
bInsetPen
=
GETBIT
(
pProperty
->
m_lValue
,
6
);
bool
bLineOpaqueBackColor
=
GETBIT
(
pProperty
->
m_lValue
,
9
);
bool
bUsefNoLineDrawDash
=
GETBIT
(
pProperty
->
m_lValue
,
16
);
bool
bUsefLineFillShape
=
GETBIT
(
pProperty
->
m_lValue
,
17
);
bool
bUsefHitTestLine
=
GETBIT
(
pProperty
->
m_lValue
,
18
);
bool
bUsefLine
=
GETBIT
(
pProperty
->
m_lValue
,
19
);
bool
bUsefArrowheadsOK
=
GETBIT
(
pProperty
->
m_lValue
,
20
);
bool
bUsefInsetPenOK
=
GETBIT
(
pProperty
->
m_lValue
,
21
);
bool
bUsefInsetPen
=
GETBIT
(
pProperty
->
m_lValue
,
22
);
bool
bUsefLineOpaqueBackColor
=
GETBIT
(
pProperty
->
m_lValue
,
25
);
if
(
bUsefLine
)
pElement
->
m_bLine
=
bLine
;
}
break
;
case
lineDashStyle
:
//from Complex
{
pElement
->
m_bLine
=
true
;
}
break
;
{
pElement
->
m_bLine
=
true
;
}
break
;
case
lineColor
:
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oPen
.
Color
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oPen
.
Color
);
break
;
}
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oPen
.
Color
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oPen
.
Color
);
}
break
;
case
lineOpacity
:
{
pElement
->
m_oPen
.
Alpha
=
(
BYTE
)(
std
::
min
)(
255
,
(
int
)
CDirectory
::
NormFixedPoint
(
pProperty
->
m_lValue
,
255
));
break
;
}
{
pElement
->
m_oPen
.
Alpha
=
(
BYTE
)(
std
::
min
)(
255
,
(
int
)
CDirectory
::
NormFixedPoint
(
pProperty
->
m_lValue
,
255
));
}
break
;
case
lineBackColor
:
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oPen
.
Color2
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oPen
.
Color2
);
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oPen
.
Color2
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oPen
.
Color2
);
}
break
;
}
break
;
case
lineWidth
:
{
pElement
->
m_oPen
.
Size
=
(
double
)
pProperty
->
m_lValue
/
EMU_MM
;
pElement
->
m_bLine
=
true
;
break
;
}
{
pElement
->
m_oPen
.
Size
=
(
double
)
pProperty
->
m_lValue
/
EMU_MM
;
pElement
->
m_bLine
=
true
;
}
break
;
case
lineStyle
:
{
pElement
->
m_bLine
=
true
;
pElement
->
m_oPen
.
LineStyle
=
pProperty
->
m_lValue
;
}
break
;
case
lineDashing
:
{
BYTE
nDashStyle
=
0
;
switch
(
pProperty
->
m_lValue
)
{
case
0
:
{
nDashStyle
=
0
;
// solid
}
break
;
case
1
:
case
6
:
case
7
:
{
nDashStyle
=
1
;
// dash
}
break
;
case
2
:
case
5
:
{
nDashStyle
=
2
;
// dot
}
break
;
case
3
:
case
8
:
case
9
:
{
nDashStyle
=
3
;
// dashdot
}
break
;
case
4
:
case
10
:
{
nDashStyle
=
4
;
// dashdotdot
}
break
;
default:
break
;
};
pElement
->
m_bLine
=
true
;
pElement
->
m_oPen
.
DashStyle
=
nDashStyle
;
break
;
}
{
pElement
->
m_bLine
=
true
;
pElement
->
m_oPen
.
DashStyle
=
pProperty
->
m_lValue
;
}
break
;
case
lineJoinStyle
:
{
BYTE
nLineJoin
=
2
;
switch
(
pProperty
->
m_lValue
)
{
case
0
:
{
nLineJoin
=
1
;
// bevel
}
break
;
case
1
:
{
nLineJoin
=
1
;
// Miter
}
break
;
case
2
:
{
nLineJoin
=
2
;
// round
}
break
;
default:
break
;
};
pElement
->
m_oPen
.
LineJoin
=
nLineJoin
;
break
;
}
{
pElement
->
m_oPen
.
LineJoin
=
pProperty
->
m_lValue
;
}
break
;
case
lineStartArrowLength
:
{
pElement
->
m_oPen
.
LineStartLength
=
pProperty
->
m_lValue
;
}
break
;
case
lineEndArrowLength
:
{
pElement
->
m_oPen
.
LineEndLength
=
pProperty
->
m_lValue
;
}
break
;
case
lineStartArrowWidth
:
{
pElement
->
m_oPen
.
LineStartWidth
=
pProperty
->
m_lValue
;
}
break
;
case
lineEndArrowWidth
:
{
pElement
->
m_oPen
.
LineEndWidth
=
pProperty
->
m_lValue
;
}
break
;
case
lineStartArrowhead
:
{
BYTE
nStartCap
=
0
;
switch
(
pProperty
->
m_lValue
)
{
case
1
:
case
2
:
case
5
:
{
nStartCap
=
0x14
;
}
break
;
case
3
:
case
4
:
{
nStartCap
=
2
;
}
break
;
default:
break
;
};
pElement
->
m_oPen
.
LineStartCap
=
nStartCap
;
break
;
}
{
pElement
->
m_oPen
.
LineStartCap
=
pProperty
->
m_lValue
;
}
break
;
case
lineEndArrowhead
:
{
BYTE
nEndCap
=
0
;
switch
(
pProperty
->
m_lValue
)
{
case
1
:
case
2
:
case
5
:
{
nEndCap
=
0x14
;
}
break
;
case
3
:
case
4
:
{
nEndCap
=
2
;
}
break
;
default:
break
;
};
pElement
->
m_oPen
.
LineEndCap
=
nEndCap
;
break
;
}
{
pElement
->
m_oPen
.
LineEndCap
=
pProperty
->
m_lValue
;
}
break
;
case
shadowType
:
{
pElement
->
m_oShadow
.
Type
=
pProperty
->
m_lValue
;
}
break
;
{
pElement
->
m_oShadow
.
Type
=
pProperty
->
m_lValue
;
}
break
;
case
shadowOriginX
:
//in emu, relative from center shape
{
pElement
->
m_oShadow
.
OriginX
=
FixedPointToDouble
(
pProperty
->
m_lValue
);
}
break
;
{
pElement
->
m_oShadow
.
OriginX
=
FixedPointToDouble
(
pProperty
->
m_lValue
);
}
break
;
case
shadowOriginY
:
{
pElement
->
m_oShadow
.
OriginY
=
FixedPointToDouble
(
pProperty
->
m_lValue
);
}
break
;
{
pElement
->
m_oShadow
.
OriginY
=
FixedPointToDouble
(
pProperty
->
m_lValue
);
}
break
;
case
shadowColor
:
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
{
SColorAtom
oAtom
;
oAtom
.
FromValue
(
pProperty
->
m_lValue
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oShadow
.
Color
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oShadow
.
Color
);
if
(
oAtom
.
bSysIndex
)
pElement
->
m_oShadow
.
Color
=
CorrectSysColor
(
pProperty
->
m_lValue
,
pElement
,
pTheme
);
else
oAtom
.
ToColor
(
&
pElement
->
m_oShadow
.
Color
);
}
break
;
}
break
;
case
shadowWeight
:
{
}
break
;
case
shadowOpacity
:
{
pElement
->
m_oShadow
.
Alpha
=
(
BYTE
)(
std
::
min
)(
255
,
(
int
)
CDirectory
::
NormFixedPoint
(
pProperty
->
m_lValue
,
255
));
}
break
;
{
pElement
->
m_oShadow
.
Alpha
=
(
BYTE
)(
std
::
min
)(
255
,
(
int
)
CDirectory
::
NormFixedPoint
(
pProperty
->
m_lValue
,
255
));
}
break
;
case
shadowHighlight
:
{
//оттенок двойной тени
}
break
;
{
//оттенок двойной тени
}
break
;
case
shadowOffsetX
:
{
pElement
->
m_oShadow
.
DistanceX
=
((
int
)
pProperty
->
m_lValue
)
/
EMU_MM
;
...
...
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
View file @
2352ae5d
...
...
@@ -994,6 +994,10 @@
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Metric.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\PPTShape.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Slide.h"
>
...
...
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
View file @
2352ae5d
...
...
@@ -478,10 +478,17 @@ namespace NSPresentationEditor
long
Alpha
;
double
Size
;
BYTE
DashStyle
;
BYTE
LineStartCap
;
BYTE
LineEndCap
;
BYTE
LineJoin
;
unsigned
char
DashStyle
;
unsigned
char
LineStyle
;
unsigned
char
LineJoin
;
unsigned
char
LineEndCap
;
unsigned
char
LineEndLength
;
unsigned
char
LineEndWidth
;
unsigned
char
LineStartCap
;
unsigned
char
LineStartLength
;
unsigned
char
LineStartWidth
;
double
*
DashPattern
;
long
Count
;
...
...
@@ -492,9 +499,8 @@ namespace NSPresentationEditor
double
MiterLimit
;
CColor
Color2
;
//backLine
public:
void
GetDashPattern
(
double
*
arrDashPattern
,
long
&
nCount
)
const
void
GetDashPattern
(
double
*
arrDashPattern
,
long
&
nCount
)
const
{
if
(
nCount
==
Count
)
{
...
...
@@ -579,10 +585,16 @@ namespace NSPresentationEditor
Alpha
=
255
;
Size
=
0.26458
;
DashStyle
=
0
;
LineStartCap
=
0
;
LineEndCap
=
0
;
LineJoin
=
0
;
LineStyle
=
0
;
//single(Simple)
DashStyle
=
0
;
//Solid
LineJoin
=
2
;
//round
LineStartCap
=
0
;
LineEndCap
=
0
;
LineEndLength
=
1
;
//med
LineStartLength
=
1
;
LineEndWidth
=
1
;
LineStartWidth
=
1
;
DashPattern
=
NULL
;
Count
=
0
;
...
...
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