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
fb8c4231
Commit
fb8c4231
authored
May 21, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PptFormat - actions
parent
9774d1de
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
376 additions
and
1335 deletions
+376
-1335
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
+191
-0
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
+1
-0
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
+7
-1
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
+4
-1
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
+2
-0
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
...icePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
+1
-21
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
+2
-1
ASCOfficePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
...ePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
+16
-18
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
...ficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
+44
-12
ASCOfficePPTFile/PPTFormatLib/Records/ExControlAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/ExControlAtom.h
+2
-1
ASCOfficePPTFile/PPTFormatLib/Records/ExObjListAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/ExObjListAtom.h
+8
-2
ASCOfficePPTFile/PPTFormatLib/Records/InteractiveInfoAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/InteractiveInfoAtom.h
+28
-1
ASCOfficePPTFile/PPTFormatLib/Records/NormalViewSetInfoAtom.h
...fficePPTFile/PPTFormatLib/Records/NormalViewSetInfoAtom.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/OutlineTextRefAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/OutlineTextRefAtom.h
+0
-1
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripOriginalMainMasterId12Atom.h
...PTFormatLib/Records/RoundTripOriginalMainMasterId12Atom.h
+0
-2
ASCOfficePPTFile/PPTFormatLib/Records/SlideColorSchemeAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/SlideColorSchemeAtom.h
+1
-2
ASCOfficePPTFile/PPTFormatLib/Records/SoundCollAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/SoundCollAtom.h
+4
-3
ASCOfficePPTFile/PPTFormatLib/Records/TextInteractiveInfoAtom.h
...icePPTFile/PPTFormatLib/Records/TextInteractiveInfoAtom.h
+0
-2
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
+0
-12
ASCOfficePPTXFile/Editor/Drawing/Animations.h
ASCOfficePPTXFile/Editor/Drawing/Animations.h
+0
-10
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
+3
-13
ASCOfficePPTXFile/Editor/Drawing/Document.h
ASCOfficePPTXFile/Editor/Drawing/Document.h
+0
-325
ASCOfficePPTXFile/Editor/Drawing/Element.h
ASCOfficePPTXFile/Editor/Drawing/Element.h
+7
-26
ASCOfficePPTXFile/Editor/Drawing/ElementProperties.h
ASCOfficePPTXFile/Editor/Drawing/ElementProperties.h
+0
-672
ASCOfficePPTXFile/Editor/Drawing/Elements.h
ASCOfficePPTXFile/Editor/Drawing/Elements.h
+0
-184
ASCOfficePPTXFile/Editor/Drawing/Interactive.h
ASCOfficePPTXFile/Editor/Drawing/Interactive.h
+48
-6
ASCOfficePPTXFile/Editor/Drawing/Slide.h
ASCOfficePPTXFile/Editor/Drawing/Slide.h
+2
-9
ASCOfficePPTXFile/Editor/Drawing/SlideShow.h
ASCOfficePPTXFile/Editor/Drawing/SlideShow.h
+4
-8
ASCOfficePPTXFile/Editor/Drawing/Structures.h
ASCOfficePPTXFile/Editor/Drawing/Structures.h
+0
-1
No files found.
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
View file @
fb8c4231
...
...
@@ -918,7 +918,11 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:spTree></p:cSld>"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>"
));
WriteTransition
(
oWriter
,
pSlide
->
m_oSlideShow
.
m_oTransition
);
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:timing><p:tnLst><p:par><p:cTn id=
\"
1
\"
dur=
\"
indefinite
\"
restart=
\"
never
\"
nodeType=
\"
tmRoot
\"
/></p:par></p:tnLst></p:timing>"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:sld>"
));
oRels
.
CloseRels
();
...
...
@@ -935,6 +939,193 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
strFile
=
L"slide"
+
std
::
to_wstring
(
nIndexSlide
+
1
)
+
L".xml.rels"
;
oRels
.
SaveRels
(
strFileSlidePath
+
_T
(
"_rels"
)
+
FILE_SEPARATOR_STR
+
strFile
);
}
void
NSPresentationEditor
::
CPPTXWriter
::
WriteTransition
(
CStringWriter
&
oWriter
,
CTransition
&
transition
)
{
if
(
!
transition
.
m_nEffectType
==
0xFF
)
return
;
std
::
wstring
type
;
std
::
wstring
param_name
,
param_value
;
std
::
wstring
param_name2
,
param_value2
;
switch
(
transition
.
m_nEffectType
)
{
case
0
:
{
type
=
L"p:cut"
;
param_name
=
L"thruBlk"
;
param_value
=
transition
.
m_nEffectDirection
?
L"true"
:
L"false"
;
}
break
;
case
1
:
{
type
=
L"p:random"
;
}
break
;
case
2
:
{
type
=
L"p:blinds"
;
param_name
=
L"dir"
;
param_value
=
transition
.
m_nEffectDirection
?
L"vert"
:
L"horz"
;
}
break
;
case
3
:
{
type
=
L"p:checker"
;
param_name
=
L"dir"
;
param_value
=
transition
.
m_nEffectDirection
?
L"vert"
:
L"horz"
;
}
break
;
case
5
:
{
type
=
L"p:dissolve"
;
param_name
=
L"thruBlk"
;
param_value
=
transition
.
m_nEffectDirection
?
L"true"
:
L"false"
;
}
break
;
case
6
:
{
type
=
L"p:fade"
;
param_name
=
L"thruBlk"
;
param_value
=
transition
.
m_nEffectDirection
?
L"true"
:
L"false"
;
}
break
;
case
4
:
case
7
:
{
if
(
transition
.
m_nEffectType
==
4
)
type
=
L"p:cover"
;
if
(
transition
.
m_nEffectType
==
7
)
type
=
L"p:pull"
;
param_name
=
L"dir"
;
switch
(
transition
.
m_nEffectDirection
)
{
case
0
:
param_value
=
L"r"
;
break
;
case
1
:
param_value
=
L"b"
;
break
;
case
2
:
param_value
=
L"l"
;
break
;
case
3
:
param_value
=
L"t"
;
break
;
case
4
:
param_value
=
L"br"
;
break
;
case
5
:
param_value
=
L"bl"
;
break
;
case
6
:
param_value
=
L"tr"
;
break
;
case
7
:
param_value
=
L"tl"
;
break
;
}
}
break
;
case
8
:
{
type
=
L"p:randomBars"
;
param_name
=
L"dir"
;
param_value
=
transition
.
m_nEffectDirection
?
L"vert"
:
L"horz"
;
}
break
;
case
9
:
{
type
=
L"p:strips"
;
param_name
=
L"dir"
;
switch
(
transition
.
m_nEffectDirection
)
{
case
0
:
param_value
=
L"ru"
;
break
;
case
1
:
param_value
=
L"lu"
;
break
;
case
2
:
param_value
=
L"rd"
;
break
;
case
3
:
param_value
=
L"ld"
;
break
;
}
}
break
;
case
10
:
case
20
:
{
if
(
transition
.
m_nEffectType
==
10
)
type
=
L"p:wipe"
;
if
(
transition
.
m_nEffectType
==
20
)
type
=
L"p:push"
;
param_name
=
L"dir"
;
switch
(
transition
.
m_nEffectDirection
)
{
case
0
:
param_value
=
L"l"
;
break
;
case
1
:
param_value
=
L"u"
;
break
;
case
2
:
param_value
=
L"r"
;
break
;
case
3
:
param_value
=
L"d"
;
break
;
}
}
break
;
case
11
:
{
type
=
L"p:zoom"
;
param_name
=
L"dir"
;
param_value
=
transition
.
m_nEffectDirection
?
L"in"
:
L"out"
;
}
break
;
case
13
:
{
type
=
L"p:split"
;
param_name
=
L"dir"
;
param_name2
=
L"orient"
;
switch
(
transition
.
m_nEffectDirection
)
{
case
0
:
param_value
=
L"horz"
;
param_value2
=
L"out"
;
break
;
case
1
:
param_value
=
L"horz"
;
param_value2
=
L"in"
;
break
;
case
2
:
param_value
=
L"vert"
;
param_value2
=
L"out"
;
break
;
case
3
:
param_value
=
L"vert"
;
param_value2
=
L"in"
;
break
;
}
}
break
;
case
17
:
{
type
=
L"p:diamond"
;
}
break
;
case
18
:
{
type
=
L"p:plus"
;
}
break
;
case
19
:
{
type
=
L"p:wedge"
;
}
break
;
case
21
:
{
type
=
L"p:comb"
;
param_name
=
L"dir"
;
param_value
=
transition
.
m_nEffectDirection
?
L"vert"
:
L"horz"
;
}
break
;
case
22
:
{
type
=
L"p:newsflash"
;
}
break
;
case
23
:
{
type
=
L"p:alphaFade"
;
}
break
;
case
26
:
{
type
=
L"p:wheel"
;
param_name
=
L"spokes"
;
param_value
=
std
::
to_wstring
(
transition
.
m_nEffectDirection
);
}
break
;
case
27
:
{
type
=
L"p:circle"
;
}
break
;
default:
break
;
}
if
(
type
.
empty
())
return
;
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:transition"
));
switch
(
transition
.
m_nSpeed
)
{
case
0x00
:
oWriter
.
WriteString
(
L" spd=
\"
fast
\"
"
);
break
;
case
0x01
:
oWriter
.
WriteString
(
L" spd=
\"
med
\"
"
);
break
;
case
0x02
:
default:
oWriter
.
WriteString
(
L" spd=
\"
slow
\"
"
);
break
;
}
oWriter
.
WriteString
(
L">"
);
oWriter
.
WriteString
(
L"<"
+
type
);
if
(
!
param_name
.
empty
()
&&
!
param_value
.
empty
())
{
oWriter
.
WriteString
(
L" "
+
param_name
+
L"=
\"
"
+
param_value
+
L"
\"
"
);
}
if
(
!
param_name2
.
empty
()
&&
!
param_value2
.
empty
())
{
oWriter
.
WriteString
(
L" "
+
param_name2
+
L"=
\"
"
+
param_value2
+
L"
\"
"
);
}
oWriter
.
WriteString
(
L"/>"
);
if
(
transition
.
m_bAudioPresent
)
{
std
::
wstring
rId
=
m_pShapeWriter
->
m_pRels
->
WriteAudio
(
transition
.
m_oAudio
.
m_strAudioFileName
);
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:sndAc><p:stSnd>"
));
oWriter
.
WriteString
(
L"<p:snd r:embed=
\"
"
+
rId
+
L"
\"
name=
\"
"
+
transition
.
m_oAudio
.
m_sImageName
+
L"
\"
/>"
);
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:stSnd></p:sndAc>"
));
}
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:transition>"
));
}
void
NSPresentationEditor
::
CPPTXWriter
::
WriteNotes
(
int
nIndexNotes
)
{
CStringWriter
oWriter
;
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
View file @
fb8c4231
...
...
@@ -79,6 +79,7 @@ namespace NSPresentationEditor
void
WriteSlide
(
int
nIndexSlide
);
void
WriteNotes
(
int
nIndexNotes
);
void
WriteTransition
(
CStringWriter
&
oWriter
,
CTransition
&
transition
);
void
WriteColorScheme
(
CStringWriter
&
oWriter
,
const
std
::
wstring
&
name
,
const
std
::
vector
<
CColor
>
&
colors
,
bool
extra
=
false
);
void
WriteBackground
(
CStringWriter
&
oWriter
,
CRelsGenerator
&
oRels
,
CBrush
&
oBackground
);
void
WriteElement
(
CStringWriter
&
oWriter
,
CRelsGenerator
&
oRels
,
IElement
*
pElement
,
CLayout
*
pLayout
=
NULL
);
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
View file @
fb8c4231
...
...
@@ -112,7 +112,13 @@ namespace NSPresentationEditor
if
(
-
1
!=
nIndexExt
)
strExts
=
strInput
.
substr
(
nIndexExt
);
if
(
strExts
==
_T
(
".tmp"
))
strExts
=
strDefaultExt
;
if
(
strExts
==
_T
(
".video"
)
||
strExts
==
_T
(
".audio"
))
{
std
::
wstring
strInput1
=
strInput
.
substr
(
0
,
nIndexExt
);
nIndexExt
=
strInput1
.
rfind
(
wchar_t
(
'.'
));
strExts
=
nIndexExt
<
0
?
L""
:
strInput1
.
substr
(
nIndexExt
);
}
if
(
strExts
==
_T
(
".tmp"
))
strExts
=
strDefaultExt
;
std
::
wstring
strMediaName
=
Template
+
std
::
to_wstring
(
++
Indexer
);
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
View file @
fb8c4231
...
...
@@ -636,7 +636,10 @@ void NSPresentationEditor::CShapeWriter::WriteImageInfo()
m_oWriter
.
WriteString
(
std
::
wstring
(
L"<p:nvPicPr>"
));
std
::
wstring
strShapeID
=
std
::
to_wstring
(
m_lNextShapeID
);
if
(
m_pImageElement
->
m_lID
<
0
)
m_pImageElement
->
m_lID
=
m_lNextShapeID
;
std
::
wstring
strShapeID
=
std
::
to_wstring
(
m_pImageElement
->
m_lID
);
m_oWriter
.
WriteString
(
std
::
wstring
(
L"<p:cNvPr id=
\"
"
)
+
strShapeID
+
L"
\"
"
);
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.h
View file @
fb8c4231
...
...
@@ -163,6 +163,8 @@ namespace NSPresentationEditor
RELEASEOBJECT
(
m_pSimpleGraphicsConverter
);
}
friend
class
CPPTXWriter
;
AVSINLINE
void
InitNextId
()
{
m_lNextShapeID
=
1000
;
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
View file @
fb8c4231
...
...
@@ -686,29 +686,9 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
pTransition
->
m_bStopSound
=
pAtom
->
m_bStopSound
;
pTransition
->
m_nEffectDirection
=
pAtom
->
m_nEffectDirection
;
pTransition
->
m_nEffectType
=
pAtom
->
m_nEffectType
;
// тут нужно сконвертить тип
pTransition
->
m_nSpeed
=
pAtom
->
m_nSpeed
;
pSlide
->
m_oSlideShow
.
m_dSlideDuration
=
pAtom
->
m_nSlideTime
;
switch
(
pAtom
->
m_nSpeed
)
{
case
0x00
:
pTransition
->
m_dSpeed
=
750.0
;
break
;
case
0x01
:
pTransition
->
m_dSpeed
=
500.0
;
break
;
case
0x02
:
pTransition
->
m_dSpeed
=
250.0
;
break
;
default:
pTransition
->
m_dSpeed
=
500.0
;
break
;
};
}
else
{
pTransition
->
m_dSpeed
=
0.0
;
}
CSlideShowSlideInfoAtom
*
pAtom
=
&
pRecordSlide
->
m_oSlideShowSlideInfoAtom
;
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
View file @
fb8c4231
...
...
@@ -93,7 +93,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
//CREATE_BY_TYPE(RECORD_TYPE_VBAINFO_ATOM , CRecordVBAInfoAtom)
//CREATE_BY_TYPE(RECORD_TYPE_SSDOCINFO_ATOM , CRecordSSDocInfoAtom)
//CREATE_BY_TYPE(RECORD_TYPE_DOC_ROUTING_SLIP , CRecordDocRoutingSlipAtom)
//
CREATE_BY_TYPE(RECORD_TYPE_EXOBJLIST_ATOM , CRecordExObjListAtom)
CREATE_BY_TYPE
(
RECORD_TYPE_EXOBJLIST_ATOM
,
CRecordExObjListAtom
)
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN , CRecordGridSpacing10Atom)
CREATE_BY_TYPE
(
RT_RoundTripTheme12Atom
,
CRecordRoundTripThemeAtom
)
CREATE_BY_TYPE
(
RT_RoundTripColorMapping12Atom
,
CRecordRoundTripColorMappingAtom
)
...
...
@@ -148,6 +148,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
//CREATE_BY_TYPE(RECORD_TYPE_FONT_EMBEDDEDDATA , CRecordFontEmbedDataBlob)
//CREATE_BY_TYPE(RECORD_TYPE_METAFILE , CRecordMetafileBlob)
CREATE_BY_TYPE
(
RECORD_TYPE_CSTRING
,
CRecordCString
)
CREATE_BY_TYPE
(
RECORD_TYPE_SOUNDCOLL_ATOM
,
CRecordSoundCollAtom
)
CREATE_BY_TYPE
(
RECORD_TYPE_EXOLEOBJ_ATOM
,
CRecordExOleObjAtom
)
CREATE_BY_TYPE
(
RECORD_TYPE_EXEMBEDATOM
,
CRecordExOleEmbedAtom
)
//CREATE_BY_TYPE(RECORD_TYPE_BOOKMARK_ENTITY_ATOM , CRecordBookmarkEntityAtom)
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
View file @
fb8c4231
...
...
@@ -37,7 +37,7 @@
#include "../../Reader/Records.h"
#include "../../../../ASCOfficePPTXFile/Editor/Drawing/Document.h"
#define
__USE_ANIMATION__
#define
MIN_SLIDE_TIME 5000.0
inline
int
sort
(
const
long
*
a
,
const
long
*
b
)
{
return
*
a
>
*
b
?
1
:
-
1
;
}
...
...
@@ -369,7 +369,13 @@ namespace Animations
delayTime
=
StreamUtils
::
ReadDWORD
(
pStream
);
}
virtual
bool
IsCorrect
()
{
return
m_oHeader
.
RecVersion
==
0x1
&&
m_oHeader
.
RecInstance
==
0x0
&&
m_oHeader
.
RecType
==
RT_ParaBuildAtom
&&
m_oHeader
.
RecLen
==
0x00000010
;
}
virtual
bool
IsCorrect
()
{
return
m_oHeader
.
RecVersion
==
0x1
&&
m_oHeader
.
RecInstance
==
0x0
&&
m_oHeader
.
RecType
==
RT_ParaBuildAtom
&&
m_oHeader
.
RecLen
==
0x00000010
;
}
public:
...
...
@@ -3097,9 +3103,6 @@ namespace Animations
{
Clear
();
#if defined(_DEBUG_LOG) && (defined(_WIN32) || defined(_WIN64))
ATLTRACE
(
_T
(
"======================================== Slide ========================================
\n
"
));
#endif
m_bSaveEffect
=
false
;
m_HaveAfterEffect
=
false
;
...
...
@@ -3115,15 +3118,13 @@ namespace Animations
return
false
;
}
inline
EffectsMap
&
GetAnimation
()
inline
EffectsMap
&
GetAnimation
()
{
return
m_oAnimation
;
}
inline
double
GetTime
()
inline
double
GetTime
()
{
#define MIN_SLIDE_TIME 5000.0
double
dTime
=
m_oNodeTiming
.
GetTimeLine
();
if
(
dTime
<
MIN_SLIDE_TIME
)
return
MIN_SLIDE_TIME
;
...
...
@@ -3137,12 +3138,12 @@ namespace Animations
private:
inline
void
ExploreTree
(
ExtTimeNodeContainer
*
pContainer
)
{
unsigned
long
nNodeType
=
pContainer
->
GetEffectNodeType
();
unsigned
long
nNodeType
=
pContainer
->
GetEffectNodeType
();
if
(
nNodeType
)
{
if
(
CNodeTiming
::
MainSequenceNode
!=
nNodeType
&&
CNodeTiming
::
TimingRootNode
!=
nNodeType
)
{
m_oTopEffect
=
CreateEffectFromNode
(
pContainer
->
timePropertyList
);
m_oTopEffect
=
CreateEffectFromNode
(
pContainer
->
timePropertyList
);
m_ComposeEffectMothionPath
=
_T
(
""
);
...
...
@@ -3200,7 +3201,7 @@ namespace Animations
}
}
int
nID
=
GetShapeID
(
pContainer
);
int
nID
=
GetShapeID
(
pContainer
);
if
(
-
1
!=
nID
)
{
// TODO :
...
...
@@ -3448,7 +3449,7 @@ namespace Animations
{
if
(
pChild
->
timeNodeAtom
.
m_bDurationProperty
)
{
m_dEffectDuration
=
pChild
->
timeNodeAtom
.
m_nDuration
;
m_dEffectDuration
=
pChild
->
timeNodeAtom
.
m_nDuration
;
}
}
}
...
...
@@ -3649,9 +3650,9 @@ namespace Animations
//
inline
void
ProcessMediaCall
(
ExtTimeNodeContainer
*
pContainer
)
{
if
(
MediaCallEffect
==
m_oTopEffect
.
m_nEffectType
)
// если анимация применена к VIDEO или AUDIO элементу
if
(
MediaCallEffect
==
m_oTopEffect
.
m_nEffectType
)
// если анимация применена к VIDEO или AUDIO элементу
{
m_nMediaPush
=
GetAttachedShapeToVideo
(
pContainer
);
// если к видео добавлена картинка, надо учитывать смещение при поиск ID
m_nMediaPush
=
GetAttachedShapeToVideo
(
pContainer
);
// если к видео добавлена картинка, надо учитывать смещение при поиск ID
if
(
GetMediaID
(
pContainer
))
{
...
...
@@ -3844,8 +3845,6 @@ public:
if
(
RECORD_PROG_BINARY_TAG
==
m_oHeaderChild
.
RecType
)
{
#ifdef __USE_ANIMATION__
SRecordHeader
rgSubRec
;
rgSubRec
.
ReadFromStream
(
pStream
)
;
...
...
@@ -3874,7 +3873,6 @@ public:
}
}
#endif
}
StreamUtils
::
StreamSeek
(
lPos
+
m_oHeader
.
RecLen
,
pStream
);
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
View file @
fb8c4231
...
...
@@ -861,8 +861,6 @@ public:
CShape
*
pParentShape
=
&
pElement
->
m_oShape
;
CPPTShape
*
pShape
=
dynamic_cast
<
CPPTShape
*>
(
pParentShape
->
m_pShape
);
CElementProperties
*
pElemProps
=
&
pElement
->
m_oProperties
;
if
(
NULL
==
pShape
)
return
;
...
...
@@ -1196,7 +1194,9 @@ public:
}
break
;
default:
break
;
{
int
unknown_value
=
pProperty
->
m_lValue
;
}
break
;
}
}
};
...
...
@@ -1665,11 +1665,43 @@ public:
pShapeElem
->
m_oShape
.
m_oText
.
m_oRuler
=
oArrayTextRuler
[
0
]
->
m_oTextRuler
;
}
std
::
vector
<
CRecordInteractiveInfoAtom
*>
oArrayInteractive
;
GetRecordsByType
(
&
oArrayInteractive
,
true
,
true
);
if
(
!
oArrayInteractive
.
empty
())
{
pShapeElem
->
m_oActions
.
m_bPresent
=
true
;
if
(
pMapIDs
)
{
CExFilesInfo
*
pInfo1
=
pMapIDs
->
LockAudioFromCollection
(
oArrayInteractive
[
0
]
->
m_nSoundIdRef
);
if
(
NULL
!=
pInfo1
)
{
pShapeElem
->
m_oActions
.
m_strAudioFileName
=
pInfo1
->
m_strFilePath
;
}
CExFilesInfo
*
pInfo2
=
pMapIDs
->
LockHyperlink
(
oArrayInteractive
[
0
]
->
m_nExHyperlinkIdRef
);
if
(
NULL
!=
pInfo2
)
{
pShapeElem
->
m_oActions
.
m_strHyperlink
=
pInfo2
->
m_strFilePath
;
}
}
pShapeElem
->
m_oActions
.
m_lType
=
oArrayInteractive
[
0
]
->
m_nAction
;
pShapeElem
->
m_oActions
.
m_lOleVerb
=
oArrayInteractive
[
0
]
->
m_nOleVerb
;
pShapeElem
->
m_oActions
.
m_lJump
=
oArrayInteractive
[
0
]
->
m_nJump
;
pShapeElem
->
m_oActions
.
m_lHyperlinkType
=
oArrayInteractive
[
0
]
->
m_nHyperlinkType
;
pShapeElem
->
m_oActions
.
m_bAnimated
=
oArrayInteractive
[
0
]
->
m_bAnimated
;
pShapeElem
->
m_oActions
.
m_bStopSound
=
oArrayInteractive
[
0
]
->
m_bStopSound
;
pShapeElem
->
m_oActions
.
m_bCustomShowReturn
=
oArrayInteractive
[
0
]
->
m_bCustomShowReturn
;
pShapeElem
->
m_oActions
.
m_bVisited
=
oArrayInteractive
[
0
]
->
m_bVisited
;
}
std
::
vector
<
CRecordTextInteractiveInfoAtom
*>
oArrayTextInteractive
;
this
->
GetRecordsByType
(
&
oArrayTextInteractive
,
true
);
if
(
0
!=
oArrayTextInteractive
.
size
())
if
(
!
oArrayTextInteractive
.
empty
())
{
pShapeElem
->
m_oActions
.
m_bPresent
=
true
;
pShapeElem
->
m_o
Text
Actions
.
m_bPresent
=
true
;
int
nSize
=
oArrayTextInteractive
.
size
();
for
(
int
i
=
0
;
i
<
nSize
;
++
i
)
...
...
@@ -1679,7 +1711,7 @@ public:
oRange
.
m_lStart
=
oArrayTextInteractive
[
i
]
->
m_lStart
;
oRange
.
m_lEnd
=
oArrayTextInteractive
[
i
]
->
m_lEnd
;
pShapeElem
->
m_oActions
.
m_arRanges
.
push_back
(
oRange
);
pShapeElem
->
m_o
Text
Actions
.
m_arRanges
.
push_back
(
oRange
);
}
}
double
dAngle
=
pShapeElem
->
m_dRotate
;
...
...
@@ -1924,11 +1956,11 @@ protected:
eTypePersist
=
(
NSOfficePPT
::
TextType
)
pSettings
->
m_nTextType
;
strText
=
pSettings
->
ApplyProperties
(
pTextSettings
);
if
((
0
!=
pSettings
->
m_arRanges
.
size
())
&&
(
0
==
pShape
->
m_oActions
.
m_arRanges
.
size
()))
if
((
0
!=
pSettings
->
m_arRanges
.
size
())
&&
(
0
==
pShape
->
m_o
Text
Actions
.
m_arRanges
.
size
()))
{
pShape
->
m_oActions
.
m_bPresent
=
true
;
pShape
->
m_o
Text
Actions
.
m_bPresent
=
true
;
pShape
->
m_oActions
.
m_arRanges
=
pSettings
->
m_arRanges
;
pShape
->
m_o
Text
Actions
.
m_arRanges
=
pSettings
->
m_arRanges
;
}
bIsPersistPresentSettings
=
((
NULL
!=
pSettings
->
m_pTextStyleProp
)
&&
(
0
<
pSettings
->
m_pTextStyleProp
->
m_lCount
));
...
...
@@ -2202,7 +2234,7 @@ protected:
ApplyThemeStyle
(
pElem
,
pTheme
,
master_levels
);
if
(
pShape
->
m_oActions
.
m_bPresent
)
if
(
pShape
->
m_o
Text
Actions
.
m_bPresent
)
{
//todooo разобраться нужно ли менять цвет на гиперлинк - 1-(34).ppt
NSPresentationEditor
::
CColor
oColor
;
...
...
@@ -2277,8 +2309,8 @@ protected:
void
ApplyHyperlink
(
CShapeElement
*
pShape
,
CColor
&
oColor
)
{
std
::
vector
<
CTextRange
>*
pRanges
=
&
pShape
->
m_o
Actions
.
m_arRanges
;
CTextAttributesEx
*
pTextAttributes
=
&
pShape
->
m_oShape
.
m_oText
;
std
::
vector
<
CTextRange
>*
pRanges
=
&
pShape
->
m_oText
Actions
.
m_arRanges
;
CTextAttributesEx
*
pTextAttributes
=
&
pShape
->
m_oShape
.
m_oText
;
int
lCountHyper
=
pRanges
->
size
();
...
...
ASCOfficePPTFile/PPTFormatLib/Records/ExControlAtom.h
View file @
fb8c4231
...
...
@@ -48,6 +48,7 @@ public:
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
return
CUnknownRecord
::
ReadFromStream
(
oHeader
,
pStream
);
m_oHeader
=
oHeader
;
m_nSlideID
=
StreamUtils
::
ReadDWORD
(
pStream
);
}
};
\ No newline at end of file
ASCOfficePPTFile/PPTFormatLib/Records/ExObjListAtom.h
View file @
fb8c4231
...
...
@@ -34,10 +34,9 @@
class
CRecordExObjListAtom
:
public
CUnknownRecord
{
public:
INT
m_nObjectIdSeed
;
public:
CRecordExObjListAtom
()
{
}
...
...
@@ -46,4 +45,11 @@ public:
{
}
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
m_oHeader
=
oHeader
;
m_nObjectIdSeed
=
StreamUtils
::
ReadDWORD
(
pStream
);
}
};
\ No newline at end of file
ASCOfficePPTFile/PPTFormatLib/Records/InteractiveInfoAtom.h
View file @
fb8c4231
...
...
@@ -35,6 +35,17 @@
class
CRecordInteractiveInfoAtom
:
public
CUnknownRecord
{
public:
UINT
m_nSoundIdRef
;
UINT
m_nExHyperlinkIdRef
;
BYTE
m_nAction
;
BYTE
m_nOleVerb
;
BYTE
m_nJump
;
BYTE
m_nHyperlinkType
;
bool
m_bAnimated
;
bool
m_bStopSound
;
bool
m_bCustomShowReturn
;
bool
m_bVisited
;
CRecordInteractiveInfoAtom
()
{
...
...
@@ -46,6 +57,22 @@ public:
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
CUnknownRecord
::
ReadFromStream
(
oHeader
,
pStream
);
m_oHeader
=
oHeader
;
m_nSoundIdRef
=
StreamUtils
::
ReadDWORD
(
pStream
);
m_nExHyperlinkIdRef
=
StreamUtils
::
ReadDWORD
(
pStream
);
m_nAction
=
StreamUtils
::
ReadBYTE
(
pStream
);
m_nOleVerb
=
StreamUtils
::
ReadBYTE
(
pStream
);
m_nJump
=
StreamUtils
::
ReadBYTE
(
pStream
);
BYTE
nFlag
=
StreamUtils
::
ReadBYTE
(
pStream
);
m_bAnimated
=
((
nFlag
&
0x01
)
==
0x01
);
m_bStopSound
=
((
nFlag
&
0x02
)
==
0x02
);
m_bCustomShowReturn
=
((
nFlag
&
0x04
)
==
0x04
);
m_bVisited
=
((
nFlag
&
0x08
)
==
0x08
);
m_nHyperlinkType
=
StreamUtils
::
ReadBYTE
(
pStream
);
StreamUtils
::
StreamSkip
(
3
,
pStream
);
}
};
\ No newline at end of file
ASCOfficePPTFile/PPTFormatLib/Records/NormalViewSetInfoAtom.h
View file @
fb8c4231
...
...
@@ -34,6 +34,7 @@
class
CRecordNormalViewSetInfoAtom
:
public
CUnknownRecord
{
public:
SRatioAtom
m_oLeftPortion
;
SRatioAtom
m_oTopPortion
;
...
...
@@ -43,7 +44,6 @@ class CRecordNormalViewSetInfoAtom : public CUnknownRecord
BOOL1
m_fPreferSingleSet
;
BYTE
m_nFlags
;
public:
CRecordNormalViewSetInfoAtom
()
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/OutlineTextRefAtom.h
View file @
fb8c4231
...
...
@@ -37,7 +37,6 @@ class CRecordOutlineTextRefAtom : public CUnknownRecord
public:
DWORD
m_nIndex
;
public:
CRecordOutlineTextRefAtom
()
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripOriginalMainMasterId12Atom.h
View file @
fb8c4231
...
...
@@ -36,8 +36,6 @@ class CRecordTripOriginalMasterId12Atom : public CUnknownRecord
{
public:
DWORD
m_dwID
;
public:
CRecordTripOriginalMasterId12Atom
()
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/SlideColorSchemeAtom.h
View file @
fb8c4231
...
...
@@ -34,9 +34,8 @@
class
CRecordSlideColorSchemeAtom
:
public
CUnknownRecord
{
SColorAtom
m_arColors
[
8
];
public:
SColorAtom
m_arColors
[
8
];
CRecordSlideColorSchemeAtom
()
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/SoundCollAtom.h
View file @
fb8c4231
...
...
@@ -34,9 +34,8 @@
class
CRecordSoundCollAtom
:
public
CUnknownRecord
{
INT
m_nObjectIdSeed
;
public:
INT
m_nObjectIdSeed
;
CRecordSoundCollAtom
()
{
...
...
@@ -48,6 +47,8 @@ public:
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
return
CUnknownRecord
::
ReadFromStream
(
oHeader
,
pStream
);
m_oHeader
=
oHeader
;
m_nObjectIdSeed
=
StreamUtils
::
ReadDWORD
(
pStream
);
}
};
\ No newline at end of file
ASCOfficePPTFile/PPTFormatLib/Records/TextInteractiveInfoAtom.h
View file @
fb8c4231
...
...
@@ -38,8 +38,6 @@ public:
LONG
m_lStart
;
LONG
m_lEnd
;
public:
CRecordTextInteractiveInfoAtom
()
{
m_lStart
=
0
;
...
...
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
View file @
fb8c4231
...
...
@@ -750,10 +750,6 @@
RelativePath=
"..\Records\SlideListWithText.h"
>
</File>
<File
RelativePath=
"..\Records\SlideNumberMCAtom.h"
>
</File>
<File
RelativePath=
"..\Records\SlidePersistAtom.h"
>
...
...
@@ -966,10 +962,6 @@
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Element.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\ElementProperties.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Elements.cpp"
>
...
...
@@ -978,10 +970,6 @@
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Elements.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Enums.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Interactive.h"
>
...
...
ASCOfficePPTXFile/Editor/Drawing/Animations.h
View file @
fb8c4231
...
...
@@ -303,7 +303,6 @@ namespace NSPresentationEditor
std
::
vector
<
std
::
wstring
>
m_oQuery
;
public:
CAnimationInfo
()
:
m_arAnimations
()
{
}
...
...
@@ -323,7 +322,6 @@ namespace NSPresentationEditor
{
}
public:
// std::wstring ToXml(const double& dStartTime, const double& dEndTime, bool bIgnore = false)
// {
...
...
@@ -453,13 +451,5 @@ namespace NSPresentationEditor
// return baseXML;
// }
inline
std
::
wstring
FormatXml
()
{
std
::
wstring
Xml
;
for
(
long
i
=
0
;
i
<
(
long
)
m_oQuery
.
size
();
++
i
)
Xml
+=
m_oQuery
[
i
];
return
Xml
;
}
};
}
ASCOfficePPTXFile/Editor/Drawing/Attributes.h
View file @
fb8c4231
...
...
@@ -905,8 +905,6 @@ namespace NSPresentationEditor
std
::
wstring
Panose
;
bool
Monospace
;
public:
bool
IsEqual
(
CFont
*
pFont
)
{
if
(
NULL
==
pFont
)
...
...
@@ -974,8 +972,7 @@ namespace NSPresentationEditor
Monospace
=
false
;
}
public:
CFont
()
CFont
()
{
SetDefaultParams
();
}
...
...
@@ -1034,8 +1031,6 @@ namespace NSPresentationEditor
int
PerspectiveX
;
int
PerspectiveY
;
public:
void
SetDefaultParams
()
{
Visible
=
false
;
...
...
@@ -1060,8 +1055,6 @@ namespace NSPresentationEditor
Color
.
SetRGB
(
0x80
,
0x80
,
0x80
);
}
public:
CShadow
()
{
SetDefaultParams
();
...
...
@@ -1123,8 +1116,6 @@ namespace NSPresentationEditor
CColor
Color
;
long
Alpha
;
public:
void
SetDefaultParams
()
{
Visible
=
0
;
...
...
@@ -1133,8 +1124,6 @@ namespace NSPresentationEditor
Alpha
=
255
;
}
public:
CEdgeText
()
{
SetDefaultParams
();
...
...
@@ -1172,7 +1161,6 @@ namespace NSPresentationEditor
int
m_nTextAlignVertical
;
double
m_dTextRotate
;
public:
CTextAttributes
()
:
m_oFont
(),
m_oTextBrush
(),
m_oTextShadow
(),
m_oTextEdge
()
{
m_oFont
.
Size
=
36
;
...
...
@@ -1196,4 +1184,6 @@ namespace NSPresentationEditor
return
(
*
this
);
}
};
}
ASCOfficePPTXFile/Editor/Drawing/Document.h
View file @
fb8c4231
...
...
@@ -89,315 +89,6 @@ namespace NSPresentationEditor
}
m_arNotes
.
clear
();
}
#if defined (_DEBUG)
std
::
wstring
GetXmlSlideTransition
(
CSlide
&
oSlide
/*, CAudioOverlay& oAudioOverlay*/
)
{
std
::
wstring
Source
=
std
::
wstring
(
_T
(
""
)
);
int
EffectID
=
1
;
int
lEffectDirection
=
oSlide
.
m_oSlideShow
.
m_oTransition
.
m_nEffectDirection
;
switch
(
oSlide
.
m_oSlideShow
.
m_oTransition
.
m_nEffectType
)
{
case
0
:
// Cut
{
// Отрабатывается выше ( выкидывать слайд, или вставлять на несколько ms )
}
break
;
case
1
:
// Random //
{
// рандом вставить
EffectID
=
1
;
// Fade Solid Smal
}
break
;
case
2
:
// Blinds
{
if
(
0x00
==
lEffectDirection
)
// Vertical // Slide Side Top To Bottom
EffectID
=
1003
;
if
(
0x01
==
lEffectDirection
)
// Horizontal // Slide Side Left To Righ
EffectID
=
1001
;
}
break
;
case
3
:
// Checker
{
if
(
0x00
==
lEffectDirection
)
// Horizontal // WipeCheckerRightToLef
EffectID
=
2901
;
if
(
0x01
==
lEffectDirection
)
// Vertical // WipeCheckerTopToBottom
EffectID
=
2903
;
}
break
;
case
4
:
// Cover
{
//0x00 Left
#pragma message ("TODO : Cover - добавить такой эффект в ImageStudio")
//0x01 Up
//0x02 Right
//0x03 Down
//0x04 Left Up
//0x05 Right Up
//0x06 Left Down
//0x07 Right Down
}
break
;
case
5
:
// Dissolve
{
#pragma message ("TODO : Dissolve - добавить такой эффект в ImageStudio")
EffectID
=
1
;
// Fade Solid Smal
}
break
;
case
6
:
// Fade
{
EffectID
=
4904
;
// Flash Dark
}
break
;
case
7
:
// Uncover
{
#pragma message ("TODO : Uncover - добавить такой эффект в ImageStudio")
//0x00 Left
//0x01 Up
//0x02 Right
//0x03 Down
//0x04 Left Up
//0x05 Right Up
//0x06 Left Down
//0x07 Right Down
}
break
;
case
8
:
// Random Bars
{
if
(
0x00
==
lEffectDirection
)
// Horizontal
EffectID
=
5331
;
if
(
0x01
==
lEffectDirection
)
// Vertical
EffectID
=
5332
;
}
break
;
case
9
:
// Strips
{
if
(
0x04
==
lEffectDirection
)
// Left Up // Mosaic Right Bottom
EffectID
=
110
;
if
(
0x05
==
lEffectDirection
)
// Right Up // Mosaic Left Bottom
EffectID
=
111
;
if
(
0x06
==
lEffectDirection
)
// Left Down // Mosaic Right Top
EffectID
=
109
;
if
(
0x07
==
lEffectDirection
)
// Right Down // Mosaic Left Top
EffectID
=
108
;
}
break
;
case
10
:
// Wipe
{
if
(
0x00
==
lEffectDirection
)
// Left // Reveal, Left
EffectID
=
5322
;
if
(
0x01
==
lEffectDirection
)
// Up // Reveal, Up
EffectID
=
5323
;
if
(
0x02
==
lEffectDirection
)
// Right // Reveal, Right
EffectID
=
5321
;
if
(
0x03
==
lEffectDirection
)
// Down // Reveal, Down
EffectID
=
5320
;
}
break
;
case
11
:
// Box In/Out
{
if
(
0x00
==
lEffectDirection
)
// Wipe Center Box Out
EffectID
=
702
;
if
(
0x01
==
lEffectDirection
)
// Wipe Center Box In
EffectID
=
701
;
}
break
;
case
13
:
// Split
{
if
(
0x00
==
lEffectDirection
)
// Horizontally out // Split, Horizontal
EffectID
=
5324
;
#pragma message ("TODO : Split Horizontal In - добавить такой эффект в ImageStudio")
if
(
0x01
==
lEffectDirection
)
// Horizontally in //
EffectID
=
5324
;
if
(
0x02
==
lEffectDirection
)
// Vertically out // Split, Vertical
EffectID
=
5325
;
#pragma message ("TODO : Split Vertical In - добавить такой эффект в ImageStudio")
if
(
0x03
==
lEffectDirection
)
// Vertically in //
EffectID
=
5325
;
}
break
;
case
17
:
// Diamond
{
EffectID
=
704
;
// Wipe Center Diamond Out
}
break
;
case
18
:
// Plus
{
EffectID
=
708
;
// Wipe Center Cross Out
}
break
;
case
19
:
// Wedge
{
EffectID
=
3006
;
// Clock Top Opposite
}
break
;
case
20
:
// Push
{
if
(
0x00
==
lEffectDirection
)
// Left // Push Side Right To Left
EffectID
=
1402
;
if
(
0x01
==
lEffectDirection
)
// Up // Push Side Bottom To Top
EffectID
=
1404
;
if
(
0x02
==
lEffectDirection
)
// Right // Push Side Left To Right
EffectID
=
1401
;
if
(
0x03
==
lEffectDirection
)
// Down // Push Side Top To Bottom
EffectID
=
1403
;
}
break
;
case
21
:
// Comb
{
if
(
0x00
==
lEffectDirection
)
// Horizontal // MosaicStrips
EffectID
=
103
;
#pragma message ("TODO : MosaicStrips Vertical - добавить такой эффект в ImageStudio")
if
(
0x01
==
lEffectDirection
)
// Vertical // MosaicStrips
EffectID
=
103
;
}
break
;
case
22
:
// Newsflash
{
EffectID
=
313
;
// Rotate Twice Out Clockwise
}
break
;
case
23
:
// AlphaFade
{
EffectID
=
1
;
// Fade Solid Smal
}
break
;
case
26
:
// Wheel
{
if
(
0x01
==
lEffectDirection
)
// ClockBottomReverse
EffectID
=
3004
;
if
(
0x02
==
lEffectDirection
)
// Clock2AnglesClockwise
EffectID
=
3013
;
if
(
0x03
==
lEffectDirection
)
// Clock4AnglesClockwise
EffectID
=
3017
;
if
(
0x04
==
lEffectDirection
)
// Clock6AnglesClockwise
EffectID
=
3019
;
if
(
0x08
==
lEffectDirection
)
// Clock8AnglesClockwise
EffectID
=
3021
;
}
break
;
case
27
:
// Circle
{
EffectID
=
706
;
// Wipe Center Circle Out
}
break
;
default
:
{
return
Source
;
}
break
;
}
Source
=
L"<VideoCompose Time=
\"
"
+
std
::
to_wstring
(
oSlide
.
m_oSlideShow
.
m_oTransition
.
m_dSpeed
)
+
L"
\"
effectid=
\"
"
+
std
::
to_wstring
(
EffectID
)
+
L"
\"
/>"
;
/*
if (oSlide.m_oSlideShow.m_oTransition.m_bAudioPresent)
{
CAudioElement oAudioElem;
oAudioElem.m_dStartTime = oSlide.m_dStartTime - oSlide.m_oSlideShow.m_oTransition.m_dSpeed;
oAudioElem.m_dEndTime = oAudioOverlay.m_dAllDuration;
oAudioElem.m_strFileName = oSlide.m_oSlideShow.m_oTransition.m_oAudio.m_strFileName;
CAudioPart oPart(&oAudioElem);
oPart.m_bStop = oSlide.m_oSlideShow.m_oTransition.m_bStopSound;
oPart.m_bLoop = oSlide.m_oSlideShow.m_oTransition.m_bLoopSound;
oPart.m_bIsTransition = true;
oAudioOverlay.m_arParts.Add(oPart);
}
*/
return
Source
;
}
#endif
double
CalculateTimes
(
CAudioOverlay
&
oAudioOverlay
)
{
CaclulateSlideTimes
();
int
lCount
=
(
LONG
)
m_arSlides
.
size
();
double
dAllDuration
=
0
;
if
(
lCount
>
0
)
{
dAllDuration
=
m_arSlides
[
lCount
-
1
]
->
m_dEndTime
;
}
oAudioOverlay
.
m_dAllDuration
=
dAllDuration
;
for
(
LONG
i
=
0
;
i
<
lCount
;
++
i
)
{
CalculateSlideElements
(
i
,
oAudioOverlay
);
}
return
dAllDuration
;
}
void
CaclulateSlideTimes
()
{
double
Transition1
=
0
;
double
Duration
=
0
;
double
Transition2
=
0
;
int
nCount
=
(
int
)
m_arSlides
.
size
();
for
(
int
i
=
0
;
i
<
nCount
;
++
i
)
{
CSlide
*
pSlide
=
m_arSlides
[
i
];
double
dSlideDuration
=
0
;
if
(
pSlide
->
m_oSlideShow
.
m_dSlideDuration
>
0
)
{
dSlideDuration
=
m_arSlides
[
i
]
->
m_oSlideShow
.
m_dSlideDuration
;
}
if
(
0
==
dSlideDuration
)
{
// решено сделать так: если время слайда не выставлено - то берем максимальную
// длительность видео, лежащего на нем. Если таких нет - то дефолтовая длительность,
// впрочем она уже выставлена
size_t
nSize
=
pSlide
->
m_arElements
.
size
();
for
(
size_t
j
=
0
;
j
<
nSize
;
++
j
)
{
if
(
etVideo
==
pSlide
->
m_arElements
[
j
]
->
m_etType
)
{
dSlideDuration
=
(
std
::
max
)(
dSlideDuration
,
((
CVideoElement
*
)
pSlide
->
m_arElements
[
j
])
->
m_dVideoDuration
);
}
}
if
(
0
==
dSlideDuration
)
{
dSlideDuration
=
pSlide
->
m_dDuration
;
}
}
pSlide
->
m_dDuration
=
dSlideDuration
;
Transition1
=
pSlide
->
m_oSlideShow
.
m_oTransition
.
m_dSpeed
;
if
(
i
<
(
nCount
-
1
))
Transition2
=
m_arSlides
[
i
+
1
]
->
m_oSlideShow
.
m_oTransition
.
m_dSpeed
;
Duration
=
pSlide
->
m_dDuration
;
if
(
i
==
0
)
{
pSlide
->
m_dStartTime
=
Transition1
;
}
else
{
pSlide
->
m_dStartTime
=
m_arSlides
[
i
-
1
]
->
m_dStartTime
+
m_arSlides
[
i
-
1
]
->
m_dDuration
;
}
pSlide
->
m_dDuration
=
Transition1
+
Duration
+
Transition2
;
pSlide
->
m_dEndTime
=
pSlide
->
m_dStartTime
+
pSlide
->
m_dDuration
;
}
}
void
CalculateSlideElements
(
int
nIndex
,
CAudioOverlay
&
oAudioOverlay
)
{
double
dStartTime
=
m_arSlides
[
nIndex
]
->
m_dStartTime
;
...
...
@@ -413,16 +104,6 @@ namespace NSPresentationEditor
switch
(
pElement
->
m_etType
)
{
//case etPicture:
//case etShape:
//case etVideo:
//case etText:
// {
// //pElement->m_dStartTime = 0;
// //pElement->m_dEndTime = dDuration;
//
// break;
// }
case
etAudio
:
{
CAudioElement
*
pAudioElem
=
dynamic_cast
<
CAudioElement
*>
(
pElement
);
...
...
@@ -520,8 +201,6 @@ namespace NSPresentationEditor
pElement
->
m_oMetric
=
m_oInfo
;
pElement
->
NormalizeCoords
(
dScaleX
,
dScaleY
);
pElement
->
SetupProperties
(
NULL
,
pTheme
,
NULL
);
}
size_t
nCountLayouts
=
pTheme
->
m_arLayouts
.
size
();
...
...
@@ -591,8 +270,6 @@ namespace NSPresentationEditor
}
}
}
pElement
->
SetupProperties
(
NULL
,
pTheme
,
pLayout
);
}
}
}
...
...
@@ -631,8 +308,6 @@ namespace NSPresentationEditor
pElement
->
m_pLayout
=
pLayout
;
pElement
->
m_oMetric
=
m_oInfo
;
pElement
->
SetupProperties
(
pSlide
,
pTheme
,
pLayout
);
}
if
(
NULL
!=
pLayout
&&
bIsPlaceholderSetUp
)
...
...
ASCOfficePPTXFile/Editor/Drawing/Element.h
View file @
fb8c4231
...
...
@@ -33,7 +33,6 @@
#include "TextAttributesEx.h"
#include "Interactive.h"
#include "Animations.h"
#include "ElementProperties.h"
namespace
NSPresentationEditor
{
...
...
@@ -127,6 +126,9 @@ namespace NSPresentationEditor
class
IElement
{
protected:
ULONG
m_lCountRef
;
public:
ElementType
m_etType
;
CDoubleRect
m_rcBounds
;
...
...
@@ -136,7 +138,9 @@ namespace NSPresentationEditor
double
m_dStartTime
;
double
m_dEndTime
;
CTextInteractiveInfo
m_oTextActions
;
CInteractiveInfo
m_oActions
;
CAnimationInfo
m_oAnimations
;
CEffects
m_oEffects
;
...
...
@@ -169,8 +173,6 @@ namespace NSPresentationEditor
bool
m_bIsChangeable
;
// можно ли редактировать элемент
CElementProperties
m_oProperties
;
CTheme
*
m_pTheme
;
CLayout
*
m_pLayout
;
...
...
@@ -179,11 +181,6 @@ namespace NSPresentationEditor
std
::
wstring
m_sHyperlink
;
protected:
ULONG
m_lCountRef
;
public:
virtual
ULONG
AddRef
()
{
++
m_lCountRef
;
...
...
@@ -266,6 +263,7 @@ namespace NSPresentationEditor
m_rcBoundsOriginal
.
top
=
dScaleY
*
m_rcBounds
.
top
;
m_rcBoundsOriginal
.
bottom
=
dScaleY
*
m_rcBounds
.
bottom
;
}
virtual
IElement
*
CreateDublicate
()
=
0
;
protected:
virtual
void
SetProperiesToDublicate
(
IElement
*
pDublicate
)
...
...
@@ -293,6 +291,7 @@ namespace NSPresentationEditor
pDublicate
->
m_lLayoutID
=
m_lLayoutID
;
pDublicate
->
m_oActions
=
m_oActions
;
pDublicate
->
m_oTextActions
=
m_oTextActions
;
pDublicate
->
m_oAnimations
=
m_oAnimations
;
pDublicate
->
m_oEffects
=
m_oEffects
;
...
...
@@ -305,7 +304,6 @@ namespace NSPresentationEditor
pDublicate
->
m_nFormatDate
=
m_nFormatDate
;
pDublicate
->
m_oMetric
=
m_oMetric
;
pDublicate
->
m_oProperties
=
m_oProperties
;
pDublicate
->
m_dRotate
=
m_dRotate
;
pDublicate
->
m_bFlipH
=
m_bFlipH
;
...
...
@@ -319,22 +317,5 @@ namespace NSPresentationEditor
pDublicate
->
m_oBrush
=
m_oBrush
;
pDublicate
->
m_oShadow
=
m_oShadow
;
}
public:
virtual
void
SetupProperties
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
)
{
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>*
pMap
=
&
m_oProperties
.
m_arProperties
;
for
(
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>::
iterator
pPair
=
pMap
->
begin
();
pPair
!=
pMap
->
end
();
++
pPair
)
{
CElementProperty
oProperty
=
pPair
->
second
;
SetupProperty
(
pSlide
,
pTheme
,
pLayout
,
&
oProperty
);
}
}
virtual
void
SetupProperty
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
,
CElementProperty
*
pProperty
)
=
0
;
virtual
IElement
*
CreateDublicate
()
=
0
;
};
}
ASCOfficePPTXFile/Editor/Drawing/ElementProperties.h
deleted
100644 → 0
View file @
9774d1de
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <map>
namespace
NSPresentationEditor
{
class
CElementProperty
{
public:
enum
Type
{
epNil
=
0
,
//----------Transform----------------
epTop
=
1
,
epLeft
=
2
,
epRight
=
3
,
epBottom
=
4
,
epRotate
=
5
,
epFlipV
=
6
,
epFlipH
=
7
,
//----------Geometry-----------------
epAdjustments
=
10
,
epGuides
=
11
,
epPath
=
12
,
//----------Pen properties-----------
epPenIndex
=
20
,
epPenColor
=
21
,
epPenAlpha
=
22
,
epPenWidth
=
23
,
epPenJoin
=
24
,
epLineDash
=
25
,
epLineEndCap
=
26
,
epLineStartCap
=
27
,
epStroked
=
28
,
//----------Brush properties----------
epBrushTypeIndex
=
40
,
epBrushType
=
41
,
epBrushColor1
=
42
,
epBrushColor2
=
43
,
epBrushAlpha1
=
44
,
epBrushAlpha2
=
45
,
epBrushTxMode
=
46
,
epBrushLinearAngle
=
47
,
epBrushColors
=
48
,
epBrushTxPath
=
49
,
epFilled
=
50
,
//----------Text----------------------
epText
=
60
,
epTextMarginLeft
=
61
,
epTextMarginTop
=
62
,
epTextMarginRight
=
63
,
epTextMarginBottom
=
64
,
epTextWrap
=
65
,
//----------Font----------------------
epFontName
=
80
,
epFontSize
=
81
,
epFontVertAlign
=
82
,
epFontHorAlign
=
83
,
epFontItalic
=
84
,
epFontBold
=
85
,
epFontStrikeout
=
86
,
epFontUnderline
=
87
,
//----------Effects-------------------
epEffectIndex
=
100
,
//----------3D------------------------
//----------Shadow--------------------
//----------Edge----------------------
};
public:
CElementProperty
(
const
Type
&
type
=
epNil
)
{
m_ID
=
type
;
m_dwValue
=
0
;
}
CElementProperty
(
const
CElementProperty
&
oSrc
)
{
*
this
=
oSrc
;
}
CElementProperty
&
operator
=
(
const
CElementProperty
&
oSrc
)
{
m_ID
=
oSrc
.
m_ID
;
m_dwValue
=
oSrc
.
m_dwValue
;
m_strAdvanced
=
oSrc
.
m_strAdvanced
;
return
*
this
;
}
public:
Type
m_ID
;
DWORD
m_dwValue
;
std
::
wstring
m_strAdvanced
;
};
class
CElementProperties
{
public:
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>
m_arProperties
;
public:
CElementProperties
()
:
m_arProperties
()
{
}
public:
CElementProperties
&
operator
=
(
const
CElementProperties
&
oSrc
)
{
m_arProperties
.
clear
();
for
(
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>::
const_iterator
pPair
=
oSrc
.
m_arProperties
.
begin
();
pPair
!=
oSrc
.
m_arProperties
.
end
();
++
pPair
)
{
CElementProperty
oProperty
=
pPair
->
second
;
m_arProperties
[
oProperty
.
m_ID
]
=
oProperty
;
}
return
*
this
;
}
CElementProperties
(
const
CElementProperties
&
oSrc
)
{
*
this
=
oSrc
;
}
virtual
~
CElementProperties
()
{
m_arProperties
.
clear
();
}
inline
void
SetAt
(
const
CElementProperty
::
Type
&
eType
,
const
DWORD
&
dwValue
)
{
CElementProperty
oProp
(
eType
);
oProp
.
m_dwValue
=
dwValue
;
m_arProperties
[
eType
]
=
oProp
;
}
inline
void
SetAt
(
const
CElementProperty
::
Type
&
eType
,
const
BYTE
&
nValue
)
{
CElementProperty
oProp
(
eType
);
oProp
.
m_dwValue
=
(
DWORD
)
nValue
;
m_arProperties
[
eType
]
=
oProp
;
}
inline
void
SetAt
(
const
CElementProperty
::
Type
&
eType
,
const
long
&
lValue
)
{
CElementProperty
oProp
(
eType
);
oProp
.
m_dwValue
=
(
DWORD
)
lValue
;
m_arProperties
[
eType
]
=
oProp
;
}
inline
void
SetAt
(
const
CElementProperty
::
Type
&
eType
,
const
bool
&
bValue
)
{
CElementProperty
oProp
(
eType
);
oProp
.
m_dwValue
=
(
true
==
bValue
)
?
1
:
0
;
m_arProperties
[
eType
]
=
oProp
;
}
inline
void
SetAt
(
const
CElementProperty
::
Type
&
eType
,
std
::
wstring
strValue
)
{
CElementProperty
oProp
(
eType
);
oProp
.
m_dwValue
=
(
DWORD
)
strValue
.
length
()
+
1
;
oProp
.
m_strAdvanced
=
strValue
;
m_arProperties
[
eType
]
=
oProp
;
}
};
}
/*
enum PropertyId
{
//Transform
left=0,
top=1,
right=2,
bottom=3,
rotation=4,
gvPage=5,
fChangePage=61,
fFlipV=62,
fFlipH=63,
//Protection
fLockAgainstUngrouping=118,
fLockRotation=119,
fLockAspectRatio=120,
fLockPosition=121,
fLockAgainstSelect=122,
fLockCropping=123,
fLockVertices=124,
fLockText=125,
fLockAdjustHandles=126,
fLockAgainstGrouping=127,
//Text
lTxid=128,
dxTextLeft=129,
dyTextTop=130,
dxTextRight=131,
dyTextBottom=132,
WrapText=133,
scaleText=134,
anchorText=135,
txflTextFlow=136,
cdirFont=137,
hspNext=138,
txdir=139,
ccol=140,
dzColMargin=141,
fSelectText=187,
fAutoTextMargin=188,
fRotateText=189,
fFitShapeToText=190,
fFitTextToShape=191,
//GeoText
gtextUNICODE=192,
gtextRTF=193,
gtextAlign=194,
gtextSize=195,
gtextSpacing=196,
gtextFont=197,
gtextCSSFont=198,
gtextFReverseRows=240,
fGtext=241,
gtextFVertical=242,
gtextFKern=243,
gtextFTight=244,
gtextFStretch=245,
gtextFShrinkFit=246,
gtextFBestFit=247,
gtextFNormalize=248,
gtextFDxMeasure=249,
gtextFBold=250,
gtextFItalic=251,
gtextFUnderline=252,
gtextFShadow=253,
gtextFSmallcaps=254,
gtextFStrikethrough=255,
//BLIP
cropFromTop=256,
cropFromBottom=257,
cropFromLeft=258,
cropFromRight=259,
Pib=260,
pibName=261,
pibFlags=262,
pictureTransparent=263,
pictureContrast=264,
pictureBrightness=265,
pictureGamma=266,
pictureId=267,
pictureDblCrMod=268,
pictureFillCrMod=269,
pictureLineCrMod=270,
pibPrint=271,
pibPrintName=272,
pibPrintFlags=273,
movie=274,
pictureRecolor=282,
picturePreserveGrays=313,
fRewind=314,
fLooping=315,
pictureGray=317,
pictureBiLevel=318,
pictureActive=319,
//Geometry
geoLeft=320,
geoTop=321,
geoRight=322,
geoBottom=323,
shapePath=324,
pVertices=325,
pSegmentInfo=326,
adjustValue=327,
adjust2Value=328,
adjust3Value=329,
adjust4Value=330,
adjust5Value=331,
adjust6Value=332,
adjust7Value=333,
adjust8Value=334,
adjust9Value=335,
adjust10Value=336,
pConnectionSites=337,
pConnectionSitesDir=338,
xLimo=339,
yLimo=340,
pAdjustHandles=341,
pGuides=342,
pInscribe=343,
cxk=344,
pFragments=345,
fColumnLineOK=377,
fShadowOK=378,
f3DOK=379,
fLineOK=380,
fGtextOK=381,
fFillShadeShapeOK=382,
fFillOK=383,
//Fill Style
fillType=384,
fillColor=385,
fillOpacity=386,
fillBackColor=387,
fillBackOpacity=388,
fillCrMod=389,
fillBlip=390,
fillBlipName=391,
fillBlipFlags=392,
fillWidth=393,
fillHeight=394,
fillAngle=395,
fillFocus=396,
fillToLeft=397,
fillToTop=398,
fillToRight=399,
fillToBottom=400,
fillRectLeft=401,
fillRectTop=402,
fillRectRight=403,
fillRectBottom=404,
fillDztype=405,
fillShadePreset=406,
fillShadeColors=407,
fillOriginX=408,
fillOriginY=409,
fillShapeOriginX=410,
fillShapeOriginY=411,
fillShadeType=412,
fRecolorFillAsPicture=441,
fUseShapeAnchor=442,
fFilled=443,
fHitTestFill=444,
fillShape=445,
fillUseRect=446,
fNoFillHitTest=447,
//Line Style
lineColor=448,
lineOpacity=449,
lineBackColor=450,
lineCrMod=451,
lineType=452,
lineFillBlip=453,
lineFillBlipName=454,
lineFillBlipFlags=455,
lineFillWidth=456,
lineFillHeight=457,
lineFillDztype=458,
lineWidth=459,
lineMiterLimit=460,
lineStyle=461,
lineDashing=462,
lineDashStyle=463,
lineStartArrowhead=464,
lineEndArrowhead=465,
lineStartArrowWidth=466,
lineStartArrowLength=467,
lineEndArrowWidth=468,
lineEndArrowLength=469,
lineJoinStyle=470,
lineEndCapStyle=471,
fInsetPen=505,
fInsetPenOK=506,
fArrowheadsOK=507,
fLine=508,
fHitTestLine=509,
lineFillShape=510,
fNoLineDrawDash=511,
//Shadow Style
shadowType=512,
shadowColor=513,
shadowHighlight=514,
shadowCrMod=515,
shadowOpacity=516,
shadowOffsetX=517,
shadowOffsetY=518,
shadowSecondOffsetX=519,
shadowSecondOffsetY=520,
shadowScaleXToX=521,
shadowScaleYToX=522,
shadowScaleXToY=523,
shadowScaleYToY=524,
shadowPerspectiveX=525,
shadowPerspectiveY=526,
shadowWeight=527,
shadowOriginX=528,
shadowOriginY=529,
fShadow=574,
fshadowObscured=575,
//Perspective Style
perspectiveType=576,
perspectiveOffsetX=577,
perspectiveOffsetY=578,
perspectiveScaleXToX=579,
perspectiveScaleYToX=580,
perspectiveScaleXToY=581,
perspectiveScaleYToY=582,
perspectivePerspectiveX=583,
perspectivePerspectiveY=584,
perspectiveWeight=585,
perspectiveOriginX=586,
perspectiveOriginY=587,
fPerspective=639,
//3D Object
c3DSpecularAmt=640,
c3DDiffuseAmt=641,
c3DShininess=642,
c3DEdgeThickness=643,
C3DExtrudeForward=644,
c3DExtrudeBackward=645,
c3DExtrudePlane=646,
c3DExtrusionColor=647,
c3DCrMod=648,
f3D=700,
fc3DMetallic=701,
fc3DUseExtrusionColor=702,
fc3DLightFace=703,
//3D Style
c3DYRotationAngle=704,
c3DXRotationAngle=705,
c3DRotationAxisX=706,
c3DRotationAxisY=707,
c3DRotationAxisZ=708,
c3DRotationAngle=709,
c3DRotationCenterX=710,
c3DRotationCenterY=711,
c3DRotationCenterZ=712,
c3DRenderMode=713,
c3DTolerance=714,
c3DXViewpoint=715,
c3DYViewpoint=716,
c3DZViewpoint=717,
c3DOriginX=718,
c3DOriginY=719,
c3DSkewAngle=720,
c3DSkewAmount=721,
c3DAmbientIntensity=722,
c3DKeyX=723,
c3DKeyY=724,
c3DKeyZ=725,
c3DKeyIntensity=726,
c3DFillX=727,
c3DFillY=728,
c3DFillZ=729,
c3DFillIntensity=730,
fc3DConstrainRotation=763,
fc3DRotationCenterAuto=764,
fc3DParallel=765,
fc3DKeyHarsh=766,
fc3DFillHarsh=767,
//Shape
hspMaster=769,
cxstyle=771,
bWMode=772,
bWModePureBW=773,
bWModeBW=774,
idDiscussAnchor=775,
dgmLayout=777,
dgmNodeKind=778,
dgmLayoutMRU=779,
wzEquationXML=780,
fPolicyLabel=822,
fPolicyBarcode=823,
fFlipHQFE5152=824,
fFlipVQFE5152=825,
fPreferRelativeResize=827,
fLockShapeType=828,
fInitiator=829,
fDeleteAttachedObject=830,
fBackground=831,
//Callout
spcot=832,
dxyCalloutGap=833,
spcoa=834,
spcod=835,
dxyCalloutDropSpecified=836,
dxyCalloutLengthSpecified=837,
fCallout=889,
fCalloutAccentBar=890,
fCalloutTextBorder=891,
fCalloutMinusX=892,
fCalloutMinusY=893,
fCalloutDropAuto=894,
fCalloutLengthSpecified=895,
//Groupe Shape
wzName=896,
wzDescription=897,
pihlShape=898,
pWrapPolygonVertices=899,
dxWrapDistLeft=900,
dyWrapDistTop=901,
dxWrapDistRight=902,
dyWrapDistBottom=903,
lidRegroup=904,
groupLeft=905,
groupTop=906,
groupRight=907,
groupBottom=908,
wzTooltip=909,
wzScript=910,
posh=911,
posrelh=912,
posv=913,
posrelv=914,
pctHR=915,
alignHR=916,
dxHeightHR=917,
dxWidthHR=918,
wzScriptExtAttr=919,
scriptLang=920,
wzScriptIdAttr=921,
wzScriptLangAttr=922,
borderTopColor=923,
borderLeftColor=924,
borderBottomColor=925,
borderRightColor=926,
tableProperties=927,
tableRowProperties=928,
scriptHtmlLocation=929,
wzApplet=930,
wzFrameTrgtUnused=932,
wzWebBot=933,
wzAppletArg=934,
wzAccessBlob=936,
metroBlob=937,
dhgt=938,
fLayoutInCell=944,
fIsBullet=945,
fStandardHR=946,
fNoshadeHR=947,
fHorizRule=948,
fUserDrawn=949,
fAllowOverlap=950,
fReallyHidden=951,
fScriptAnchor=952,
//Unknown HTML
wzLineId=1026,
wzFillId=1027,
wzPictureId=1028,
wzPathId=1029,
wzShadowId=1030,
wzPerspectiveId=1031,
wzGtextId=1032,
wzFormulaeId=1033,
wzHandlesId=1034,
wzCalloutId=1035,
wzLockId=1036,
wzTextId=1037,
wzThreeDId=1038,
FakeShapeType=1039,
fFakeMaster=1086,
//Diagramm
dgmt=1280,
dgmStyle=1281,
pRelationTbl=1284,
dgmScaleX=1285,
dgmScaleY=1286,
dgmDefaultFontSize=1287,
dgmConstrainBounds=1288,
dgmBaseTextScale=1289,
fBorderlessCanvas=1338,
fNonStickyInkCanvas=1339,
fDoFormat=1340,
fReverse=1341,
fDoLayout=1342,
fPseudoInline=1343,
// dashing
lineLeftDashStyle=1359,
lineTopDashStyle=1423,
lineRightDashStyle=1487,
lineBottomDashStyle=1551,
//Web Component
webComponentWzHtml=1664,
webComponentWzName=1665,
webComponentWzUrl=1666,
webComponentWzProperties=1667,
fIsWebComponent=1727,
//Clip
pVerticesClip=1728,
pSegmentInfoClip=1729,
shapePathClip=1730,
fClipToWrap=1790,
fClippedOK=1791,
//Ink
pInkData=1792,
fInkAnnotation=1852,
fHitTestInk=1853,
fRenderShape=1854,
fRenderInk=1855,
//Signature
wzSigSetupId=1921,
wzSigSetupProvId=192,
wzSigSetupSuggSigner=1923,
wzSigSetupSuggSigner2=1924,
wzSigSetupSuggSignerEmail=1925,
wzSigSetupSignInst=1926,
wzSigSetupAddlXml=1927,
wzSigSetupProvUrl=1928,
fSigSetupShowSignDate=1980,
fSigSetupAllowComments=1981,
fSigSetupSignInstSet=1982,
fIsSignatureLine=1983,
//Groupe Shape 2
pctHoriz=1984,
pctVert=1985,
pctHorizPos=1986,
pctVertPos=1987,
sizerelh=1988,
sizerelv=1989,
colStart=1990,
colSpan=1991
};
*/
\ No newline at end of file
ASCOfficePPTXFile/Editor/Drawing/Elements.h
View file @
fb8c4231
...
...
@@ -310,7 +310,6 @@ namespace NSPresentationEditor
std
::
wstring
m_sImageName
;
public:
CImageElement
()
:
IElement
()
{
m_etType
=
etPicture
;
...
...
@@ -356,10 +355,6 @@ namespace NSPresentationEditor
return
(
IElement
*
)
pImageElement
;
}
virtual
void
SetupProperty
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
,
CElementProperty
*
pProperty
)
{
}
#ifdef ENABLE_PPT_TO_PPTX_CONVERT
...
...
@@ -471,14 +466,6 @@ namespace NSPresentationEditor
virtual
void
SetupProperties
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
)
{
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>*
pMap
=
&
m_oProperties
.
m_arProperties
;
for
(
std
::
map
<
CElementProperty
::
Type
,
CElementProperty
>::
iterator
pPair
=
pMap
->
begin
();
pPair
!=
pMap
->
end
();
++
pPair
)
{
CElementProperty
oProperty
=
pPair
->
second
;
SetupProperty
(
pSlide
,
pTheme
,
pLayout
,
&
oProperty
);
}
m_oShape
.
m_oText
.
m_lPlaceholderType
=
m_lPlaceholderType
;
m_oShape
.
m_oText
.
m_lPlaceholderID
=
m_lPlaceholderID
;
...
...
@@ -495,169 +482,6 @@ namespace NSPresentationEditor
void
CalculateColor
(
CColor
&
oColor
,
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
);
virtual
void
SetupProperty
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
,
CElementProperty
*
pProperty
)
{
const
LONG
_EMU_MM
=
36000
;
switch
(
pProperty
->
m_ID
)
{
case
CElementProperty
:
:
epTextMarginLeft
:
{
m_oShape
.
m_dTextMarginX
=
(
double
)
pProperty
->
m_dwValue
/
_EMU_MM
;
break
;
}
case
CElementProperty
:
:
epTextMarginTop
:
{
m_oShape
.
m_dTextMarginY
=
(
double
)
pProperty
->
m_dwValue
/
_EMU_MM
;
break
;
}
case
CElementProperty
:
:
epTextMarginRight
:
{
m_oShape
.
m_dTextMarginRight
=
(
double
)
pProperty
->
m_dwValue
/
_EMU_MM
;
break
;
}
case
CElementProperty
:
:
epTextMarginBottom
:
{
m_oShape
.
m_dTextMarginBottom
=
(
double
)
pProperty
->
m_dwValue
/
_EMU_MM
;
break
;
}
case
CElementProperty
:
:
epText
:
{
//m_oShape.m_oText.m_sText = pProperty->m_strAdvanced;
}
case
CElementProperty
:
:
epTextWrap
:
{
m_oShape
.
m_oText
.
m_lWrapMode
=
(
LONG
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epBrushType
:
{
m_oBrush
.
Type
=
(
LONG
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epBrushColor1
:
{
m_oBrush
.
Color1
.
SetSBGR
(
pProperty
->
m_dwValue
);
CalculateColor
(
m_oBrush
.
Color1
,
pSlide
,
pTheme
,
pLayout
);
break
;
}
case
CElementProperty
:
:
epBrushColor2
:
{
m_oBrush
.
Color2
.
SetSBGR
(
pProperty
->
m_dwValue
);
CalculateColor
(
m_oBrush
.
Color2
,
pSlide
,
pTheme
,
pLayout
);
break
;
}
case
CElementProperty
:
:
epBrushAlpha1
:
{
m_oBrush
.
Alpha1
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epBrushAlpha2
:
{
m_oBrush
.
Alpha2
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epBrushTxPath
:
{
m_oBrush
.
TexturePath
=
pProperty
->
m_strAdvanced
;
break
;
}
case
CElementProperty
:
:
epBrushTxMode
:
{
m_oBrush
.
TextureMode
=
(
LONG
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epFilled
:
{
if
(
0
==
pProperty
->
m_dwValue
)
{
m_oBrush
.
Alpha1
=
0
;
}
break
;
}
case
CElementProperty
:
:
epPenColor
:
{
m_oPen
.
Color
.
SetSBGR
(
pProperty
->
m_dwValue
);
CalculateColor
(
m_oPen
.
Color
,
pSlide
,
pTheme
,
pLayout
);
break
;
}
case
CElementProperty
:
:
epPenAlpha
:
{
m_oPen
.
Alpha
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epPenWidth
:
{
m_oPen
.
Size
=
(
double
)
pProperty
->
m_dwValue
/
0xFFFF
;
break
;
}
case
CElementProperty
:
:
epPenJoin
:
{
m_oPen
.
LineJoin
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epLineDash
:
{
m_oPen
.
DashStyle
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epLineStartCap
:
{
m_oPen
.
LineStartCap
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epLineEndCap
:
{
m_oPen
.
LineEndCap
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epStroked
:
{
if
(
0
==
pProperty
->
m_dwValue
)
m_oPen
.
Alpha
=
0
;
break
;
}
case
CElementProperty
:
:
epFontName
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_oFont
.
Name
=
pProperty
->
m_strAdvanced
;
break
;
}
case
CElementProperty
:
:
epFontHorAlign
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_nTextAlignHorizontal
=
(
int
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epFontVertAlign
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_nTextAlignVertical
=
(
int
)
pProperty
->
m_dwValue
;
break
;
}
case
CElementProperty
:
:
epFontSize
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_oFont
.
Size
=
(
double
)
pProperty
->
m_dwValue
/
0xFFFF
;
break
;
}
case
CElementProperty
:
:
epFontBold
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_oFont
.
Bold
=
(
pProperty
->
m_dwValue
!=
0
);
break
;
}
case
CElementProperty
:
:
epFontItalic
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_oFont
.
Italic
=
(
pProperty
->
m_dwValue
!=
0
);
break
;
}
case
CElementProperty
:
:
epFontStrikeout
:
{
m_oShape
.
m_oText
.
m_oAttributes
.
m_oFont
.
Strikeout
=
(
BYTE
)
pProperty
->
m_dwValue
;
break
;
}
default:
break
;
}
}
#ifdef ENABLE_PPT_TO_PPTX_CONVERT
AVSINLINE
std
::
wstring
ConvertPPTShapeToPPTX
(
bool
bIsNamespace
=
false
)
...
...
@@ -910,10 +734,6 @@ namespace NSPresentationEditor
return
(
IElement
*
)
pAudioElement
;
}
virtual
void
SetupProperty
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
,
CElementProperty
*
pProperty
)
{
}
};
class
CVideoElement
:
public
CImageElement
{
...
...
@@ -960,10 +780,6 @@ namespace NSPresentationEditor
return
(
IElement
*
)
pVideoElement
;
}
virtual
void
SetupProperty
(
CSlide
*
pSlide
,
CTheme
*
pTheme
,
CLayout
*
pLayout
,
CElementProperty
*
pProperty
)
{
}
};
}
...
...
ASCOfficePPTXFile/Editor/Drawing/Interactive.h
View file @
fb8c4231
...
...
@@ -60,9 +60,52 @@ namespace NSPresentationEditor
*
this
=
oSrc
;
}
};
class
CInteractiveInfo
{
public:
CInteractiveInfo
()
{
m_bPresent
=
false
;
}
CInteractiveInfo
&
operator
=
(
const
CInteractiveInfo
&
oSrc
)
{
m_bPresent
=
oSrc
.
m_bPresent
;
m_lType
=
oSrc
.
m_lType
;
m_lOleVerb
=
oSrc
.
m_lOleVerb
;
m_lJump
=
oSrc
.
m_lJump
;
m_lHyperlinkType
=
oSrc
.
m_lHyperlinkType
;
m_bAnimated
=
oSrc
.
m_bAnimated
;
m_bStopSound
=
oSrc
.
m_bStopSound
;
m_bCustomShowReturn
=
oSrc
.
m_bCustomShowReturn
;
m_bVisited
=
oSrc
.
m_bVisited
;
m_strAudioFileName
=
oSrc
.
m_strAudioFileName
;
m_strHyperlink
=
oSrc
.
m_strHyperlink
;
return
*
this
;
}
CInteractiveInfo
(
const
CInteractiveInfo
&
oSrc
)
{
*
this
=
oSrc
;
}
bool
m_bPresent
;
int
m_lType
;
int
m_lOleVerb
;
int
m_lJump
;
int
m_lHyperlinkType
;
bool
m_bAnimated
;
bool
m_bStopSound
;
bool
m_bCustomShowReturn
;
bool
m_bVisited
;
std
::
wstring
m_strAudioFileName
;
std
::
wstring
m_strHyperlink
;
};
class
CTextInteractiveInfo
{
private:
long
m_lType
;
ASC_VARIANT
m_varParameter
;
...
...
@@ -72,16 +115,15 @@ namespace NSPresentationEditor
std
::
vector
<
CTextRange
>
m_arRanges
;
public:
CInteractiveInfo
()
CTextInteractiveInfo
()
{
m_bPresent
=
false
;
}
~
CInteractiveInfo
()
~
C
Text
InteractiveInfo
()
{
}
C
InteractiveInfo
&
operator
=
(
const
C
InteractiveInfo
&
oSrc
)
C
TextInteractiveInfo
&
operator
=
(
const
CText
InteractiveInfo
&
oSrc
)
{
m_lType
=
oSrc
.
m_lType
;
m_varParameter
=
oSrc
.
m_varParameter
;
...
...
@@ -92,7 +134,7 @@ namespace NSPresentationEditor
return
*
this
;
}
C
InteractiveInfo
(
const
C
InteractiveInfo
&
oSrc
)
C
TextInteractiveInfo
(
const
CText
InteractiveInfo
&
oSrc
)
{
*
this
=
oSrc
;
}
...
...
ASCOfficePPTXFile/Editor/Drawing/Slide.h
View file @
fb8c4231
...
...
@@ -72,7 +72,7 @@ namespace NSPresentationEditor
vector_string
m_PlaceholdersReplaceString
[
3
];
std
::
wstring
m_strComment
;
std
::
wstring
m_sName
;
public:
CSlide
()
:
m_arElements
(),
m_oSlideShow
()
{
Clear
();
...
...
@@ -154,7 +154,7 @@ namespace NSPresentationEditor
m_sName
=
oSrc
.
m_sName
;
}
public:
void
SetMetricInfo
(
const
CMetricInfo
&
oInfo
)
{
m_oInfo
=
oInfo
;
...
...
@@ -164,13 +164,6 @@ namespace NSPresentationEditor
m_lOriginalHeight
=
m_oInfo
.
m_lUnitsVer
;
}
virtual
void
ReadFromXml
(
XmlUtils
::
CXmlNode
&
oNode
)
{
}
virtual
void
WriteToXml
(
XmlUtils
::
CXmlWriter
&
oWriter
)
{
}
void
SetUpPlaceholderStyles
(
NSPresentationEditor
::
CLayout
*
pLayout
)
{
size_t
nCountElements
=
m_arElements
.
size
();
...
...
ASCOfficePPTXFile/Editor/Drawing/SlideShow.h
View file @
fb8c4231
...
...
@@ -46,21 +46,19 @@ namespace NSPresentationEditor
bool
m_bLoopSound
;
// зациклить аудио
bool
m_bStopSound
;
// перед транзишном перестать играть все аудио до этого
double
m_dSpeed
;
// длительность в миллисекундах
public:
int
m_nSpeed
;
CTransition
()
:
m_oAudio
()
{
m_bAudioPresent
=
false
;
m_nEffectType
=
0
;
m_nEffectType
=
0
xff
;
m_nEffectDirection
=
0
;
m_bLoopSound
=
false
;
m_bStopSound
=
false
;
m_
dSpeed
=
500.0
;
m_
nSpeed
=
2
;
}
~
CTransition
()
{
...
...
@@ -76,7 +74,7 @@ namespace NSPresentationEditor
m_bLoopSound
=
oSrc
.
m_bLoopSound
;
m_bStopSound
=
oSrc
.
m_bStopSound
;
m_
dSpeed
=
oSrc
.
m_d
Speed
;
m_
nSpeed
=
oSrc
.
m_n
Speed
;
return
*
this
;
}
...
...
@@ -97,8 +95,6 @@ namespace NSPresentationEditor
bool
m_bOnlyClick
;
// переход на следующий по щелчку
public:
CSlideShowInfo
()
:
m_oTransition
()
{
m_dSlideDuration
=
30000.0
;
...
...
ASCOfficePPTXFile/Editor/Drawing/Structures.h
View file @
fb8c4231
...
...
@@ -329,7 +329,6 @@ namespace NSPresentationEditor
LONG
m_lID
;
public:
CElemInfo
()
{
m_bIsBackground
=
false
;
...
...
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