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
Expand all
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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