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
7d188b22
Commit
7d188b22
authored
May 10, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PptFormatReader - presentation slide notes
parent
79ead484
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
390 additions
and
175 deletions
+390
-175
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
+73
-17
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
+2
-2
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
+19
-44
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
...icePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
+211
-29
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.h
...fficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.h
+4
-4
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
+16
-13
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
+4
-4
ASCOfficePPTFile/PPTFormatLib/Reader/Records.h
ASCOfficePPTFile/PPTFormatLib/Reader/Records.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
...ePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
+2
-2
ASCOfficePPTFile/PPTFormatLib/Records/DocumentRecords.h
ASCOfficePPTFile/PPTFormatLib/Records/DocumentRecords.h
+12
-19
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/BlipStoreContainer.h
...PPTFile/PPTFormatLib/Records/Drawing/BlipStoreContainer.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/GroupShapeContainer.h
...PTFile/PPTFormatLib/Records/Drawing/GroupShapeContainer.h
+2
-2
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
...ficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/HeadersFootersAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/HeadersFootersAtom.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/NotesAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/NotesAtom.h
+5
-6
ASCOfficePPTFile/PPTFormatLib/Records/RecordsIncluder.h
ASCOfficePPTFile/PPTFormatLib/Records/RecordsIncluder.h
+1
-0
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripColorMappingAtom.h
...ePPTFile/PPTFormatLib/Records/RoundTripColorMappingAtom.h
+3
-3
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripThemeAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripThemeAtom.h
+3
-3
ASCOfficePPTFile/PPTFormatLib/Records/SlideContainer.h
ASCOfficePPTFile/PPTFormatLib/Records/SlideContainer.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/TextBytesAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/TextBytesAtom.h
+1
-1
ASCOfficePPTFile/PPTFormatLib/Records/TextSpecInfoAtom.h
ASCOfficePPTFile/PPTFormatLib/Records/TextSpecInfoAtom.h
+3
-2
ASCOfficePPTXFile/Editor/Drawing/Document.h
ASCOfficePPTXFile/Editor/Drawing/Document.h
+17
-18
ASCOfficePPTXFile/Editor/Drawing/Slide.h
ASCOfficePPTXFile/Editor/Drawing/Slide.h
+7
-0
ASCOfficePPTXFile/Editor/Drawing/Theme.h
ASCOfficePPTXFile/Editor/Drawing/Theme.h
+0
-1
No files found.
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.cpp
View file @
7d188b22
...
...
@@ -208,9 +208,9 @@ void NSPresentationEditor::CPPTXWriter::WriteContentTypes()
<Override PartName=
\"
/docProps/core.xml
\"
ContentType=
\"
application/vnd.openxmlformats-package.core-properties+xml
\"
/>\
<Override PartName=
\"
/docProps/app.xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.extended-properties+xml
\"
/>"
);
int
nThemes
=
(
int
)
m_pDocument
->
m_arThemes
.
size
();
int
nIndexLayout
=
0
;
for
(
int
nT
=
0
;
nT
<
nThemes
;
++
nT
)
for
(
size_t
nT
=
0
;
nT
<
m_pDocument
->
m_arThemes
.
size
();
++
nT
)
{
strContentTypes
+=
L"<Override PartName=
\"
/ppt/theme/theme"
+
std
::
to_wstring
(
nT
+
1
)
+
L".xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.theme+xml
\"
/>\
...
...
@@ -218,30 +218,30 @@ void NSPresentationEditor::CPPTXWriter::WriteContentTypes()
L".xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml
\"
/>"
;
int
nCountL
=
(
int
)
m_pDocument
->
m_arThemes
[
nT
].
m_arLayouts
.
size
();
for
(
int
nL
=
0
;
nL
<
nCountL
;
++
nL
,
++
nIndexLayout
)
for
(
size_t
nL
=
0
;
nL
<
m_pDocument
->
m_arThemes
[
nT
].
m_arLayouts
.
size
();
++
nL
,
++
nIndexLayout
)
{
strContentTypes
+=
L"<Override PartName=
\"
/ppt/slideLayouts/slideLayout"
+
std
::
to_wstring
(
nIndexLayout
+
1
)
+
L".xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml
\"
/>"
;
}
}
std
::
wstring
strNotesTheme
=
L"<Override PartName=
\"
/ppt/theme/theme"
+
std
::
to_wstring
(
nThemes
+
1
)
+
L".xml
\"
\
std
::
wstring
strNotesTheme
=
L"<Override PartName=
\"
/ppt/theme/theme"
+
std
::
to_wstring
(
m_pDocument
->
m_arThemes
.
size
()
+
1
)
+
L".xml
\"
\
ContentType=
\"
application/vnd.openxmlformats-officedocument.theme+xml
\"
/>"
;
strContentTypes
+=
strNotesTheme
;
strContentTypes
+=
_T
(
"<Override PartName=
\"
/ppt/notesMasters/notesMaster1.xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml
\"
/>"
);
int
nCountS
=
(
int
)
m_pDocument
->
m_arSlides
.
size
();
for
(
int
nS
=
0
;
nS
<
nCountS
;
++
nS
)
for
(
size_t
nS
=
0
;
nS
<
m_pDocument
->
m_arSlides
.
size
();
++
nS
)
{
strContentTypes
+=
L"<Override PartName=
\"
/ppt/slides/slide"
+
std
::
to_wstring
(
nS
+
1
)
+
L".xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.presentationml.slide+xml
\"
/>"
;
}
for
(
size_t
nS
=
0
;
nS
<
m_pDocument
->
m_arNotes
.
size
();
++
nS
)
{
strContentTypes
+=
L"<Override PartName=
\"
/ppt/notesSlides/notesSlide"
+
std
::
to_wstring
(
nS
+
1
)
+
L".xml
\"
ContentType=
\"
application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml
\"
/>"
;
}
strContentTypes
+=
_T
(
"</Types>"
);
CFile
oFile
;
...
...
@@ -264,9 +264,9 @@ void NSPresentationEditor::CPPTXWriter::WriteApp(CFile& oFile)
oFile
.
WriteStringUTF8
(
str1
);
oFile
.
WriteStringUTF8
(
L"<Slides>"
+
std
::
to_wstring
(
m_pDocument
->
m_arSlides
.
size
())
+
L"</Slides>"
);
oFile
.
WriteStringUTF8
(
L"<Notes>"
+
std
::
to_wstring
(
m_pDocument
->
m_arNotes
.
size
())
+
L"</Notes>"
);
oFile
.
WriteStringUTF8
(
L"<Notes>0</Notes>\
<HiddenSlides>0</HiddenSlides>\
oFile
.
WriteStringUTF8
(
L"<HiddenSlides>0</HiddenSlides>\
<MMClips>2</MMClips>\
<ScaleCrop>false</ScaleCrop>\
<HeadingPairs>\
...
...
@@ -301,7 +301,7 @@ void NSPresentationEditor::CPPTXWriter::WriteApp(CFile& oFile)
<LinksUpToDate>false</LinksUpToDate>\
<SharedDoc>false</SharedDoc>\
<HyperlinksChanged>false</HyperlinksChanged>\
<AppVersion>
1.0
000</AppVersion>\
<AppVersion>
4.4
000</AppVersion>\
</Properties>"
);
strMemory
+=
str5
;
...
...
@@ -467,11 +467,12 @@ void NSPresentationEditor::CPPTXWriter::WriteAll()
oFileRels
.
CreateFile
(
strNotesMasterRelsFile
);
oFileRels
.
WriteStringUTF8
(
strVal
);
oFileRels
.
CloseFile
();
// -----------------------------------------------------
// -----------------------------------------------------
WriteThemes
();
WriteSlides
();
WriteNotes
();
}
void
NSPresentationEditor
::
CPPTXWriter
::
WriteThemes
()
...
...
@@ -826,14 +827,14 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
CSlide
*
pSlide
=
m_pDocument
->
m_arSlides
[
nIndexSlide
];
if
(
0
==
pSlide
->
m_lThemeID
)
oRels
.
StartSlide
(
pSlide
->
m_lLayoutID
,
nIndexSlide
);
oRels
.
StartSlide
(
pSlide
->
m_lLayoutID
,
pSlide
->
m_lNotesID
);
else
{
int
nLayout
=
pSlide
->
m_lLayoutID
;
for
(
int
i
=
0
;
i
<
pSlide
->
m_lThemeID
;
++
i
)
nLayout
+=
(
int
)
m_pDocument
->
m_arThemes
[
i
].
m_arLayouts
.
size
();
oRels
.
StartSlide
(
nLayout
,
nIndexSlide
);
oRels
.
StartSlide
(
nLayout
,
pSlide
->
m_lNotesID
);
}
oWriter
.
WriteString
(
std
::
wstring
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
));
...
...
@@ -881,7 +882,54 @@ 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
::
WriteNotes
(
int
nIndexNotes
)
{
CStringWriter
oWriter
;
CRelsGenerator
oRels
(
&
m_oManager
);
CSlide
*
pNotes
=
m_pDocument
->
m_arNotes
[
nIndexNotes
];
oRels
.
StartNotes
(
pNotes
->
m_lSlideID
);
oWriter
.
WriteString
(
std
::
wstring
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:notes xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:p=
\"
http://schemas.openxmlformats.org/presentationml/2006/main
\"
"
));
if
(
!
pNotes
->
m_bShowMasterShapes
)
oWriter
.
WriteString
(
std
::
wstring
(
L" showMasterSp=
\"
0
\"
"
));
oWriter
.
WriteString
(
std
::
wstring
(
L">"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:cSld>"
));
if
(
pNotes
->
m_bIsBackground
)
{
WriteBackground
(
oWriter
,
oRels
,
pNotes
->
m_oBackground
);
}
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:spTree><p:nvGrpSpPr><p:cNvPr id=
\"
1
\"
name=
\"\"
/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>\
<a:xfrm><a:off x=
\"
0
\"
y=
\"
0
\"
/><a:ext cx=
\"
0
\"
cy=
\"
0
\"
/><a:chOff x=
\"
0
\"
y=
\"
0
\"
/><a:chExt cx=
\"
0
\"
cy=
\"
0
\"
/></a:xfrm></p:grpSpPr>"
));
for
(
size_t
nEl
=
0
;
nEl
<
pNotes
->
m_arElements
.
size
();
++
nEl
)
{
WriteElement
(
oWriter
,
oRels
,
pNotes
->
m_arElements
[
nEl
],
NULL
);
}
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:spTree></p:cSld>"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>"
));
oWriter
.
WriteString
(
std
::
wstring
(
L"</p:notes>"
));
oRels
.
CloseRels
();
std
::
wstring
strXml
=
oWriter
.
GetData
();
std
::
wstring
strFile
=
L"notesSlide"
+
std
::
to_wstring
(
nIndexNotes
+
1
)
+
L".xml"
;
std
::
wstring
strFileSlidePath
=
m_strTempDirectory
+
FILE_SEPARATOR_STR
+
_T
(
"ppt"
)
+
FILE_SEPARATOR_STR
+
_T
(
"notesSlides"
)
+
FILE_SEPARATOR_STR
;
CFile
oFile
;
oFile
.
CreateFile
(
strFileSlidePath
+
strFile
);
oFile
.
WriteStringUTF8
(
strXml
);
oFile
.
CloseFile
();
strFile
=
L"notesSlide"
+
std
::
to_wstring
(
nIndexNotes
+
1
)
+
L".xml.rels"
;
oRels
.
SaveRels
(
strFileSlidePath
+
_T
(
"_rels"
)
+
FILE_SEPARATOR_STR
+
strFile
);
}
void
NSPresentationEditor
::
CPPTXWriter
::
WriteSlides
()
{
...
...
@@ -889,7 +937,15 @@ void NSPresentationEditor::CPPTXWriter::WriteSlides()
for
(
size_t
nIndexS
=
0
;
nIndexS
<
nCountSlides
;
++
nIndexS
)
{
CRelsGenerator
::
StartNotes
((
int
)
nIndexS
,
m_strTempDirectory
,
m_pDocument
->
m_arSlides
[
nIndexS
]
->
m_strComment
);
WriteSlide
((
int
)
nIndexS
);
}
}
void
NSPresentationEditor
::
CPPTXWriter
::
WriteNotes
()
{
size_t
nCountSlides
=
m_pDocument
->
m_arSlides
.
size
();
for
(
size_t
nIndexS
=
0
;
nIndexS
<
nCountSlides
;
++
nIndexS
)
{
WriteNotes
((
int
)
nIndexS
);
}
}
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/Converter.h
View file @
7d188b22
...
...
@@ -54,8 +54,6 @@ namespace NSPresentationEditor
CShapeWriter
*
m_pShapeWriter
;
public:
CPPTXWriter
();
~
CPPTXWriter
();
...
...
@@ -75,8 +73,10 @@ namespace NSPresentationEditor
void
WriteAll
();
void
WriteThemes
();
void
WriteSlides
();
void
WriteNotes
();
void
WriteLayout
(
CLayout
&
oLayout
,
int
nIndexLayout
,
int
nStartLayout
,
int
nIndexTheme
);
void
WriteSlide
(
int
nIndexSlide
);
void
WriteNotes
(
int
nIndexNotes
);
void
WriteColorScheme
(
CStringWriter
&
oWriter
,
const
std
::
wstring
&
name
,
const
std
::
vector
<
CColor
>
&
colors
,
bool
extra
=
false
);
void
WriteBackground
(
CStringWriter
&
oWriter
,
CRelsGenerator
&
oRels
,
CBrush
&
oBackground
);
...
...
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ImageManager.h
View file @
7d188b22
...
...
@@ -196,57 +196,32 @@ namespace NSPresentationEditor
m_oWriter
.
WriteString
(
str
);
}
inline
void
StartSlide
(
int
nIndexLayout
,
int
nIndexSlide
)
inline
void
StartNotes
(
int
nIndexSlide
)
{
m_oWriter
.
WriteString
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>\
<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>"
);
m_oWriter
.
WriteString
(
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout
\"
Target=
\"
../slideLayouts/slideLayout"
+
std
::
to_wstring
(
nIndexLayout
+
1
)
+
L".xml
\"
/>"
);
if
(
nIndexSlide
>=
0
)
{
m_oWriter
.
WriteString
(
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide
\"
Target=
\"
../notesSlides/notesS
lide"
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide
\"
Target=
\"
../slides/s
lide"
+
std
::
to_wstring
(
nIndexSlide
+
1
)
+
L".xml
\"
/>"
);
}
static
inline
void
StartNotes
(
int
nIndexSlide
,
std
::
wstring
strDirectory
,
std
::
wstring
strComment
)
}
inline
void
StartSlide
(
int
nIndexLayout
,
int
nIndexNotes
)
{
std
::
wstring
sNum
=
std
::
to_wstring
(
nIndexSlide
+
1
);
std
::
wstring
strNoteSlideRels
=
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>\
<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>\
<Relationship Id=
\"
rId2
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide
\"
Target=
\"
../slides/slide"
)
+
sNum
+
_T
(
".xml
\"
/>\
<Relationship Id=
\"
rId1
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster
\"
Target=
\"
../notesMasters/notesMaster1.xml
\"
/>\
</Relationships>"
);
std
::
wstring
strNoteRels
=
strDirectory
+
FILE_SEPARATOR_STR
+
_T
(
"ppt"
)
+
+
FILE_SEPARATOR_STR
+
_T
(
"notesSlides"
)
+
FILE_SEPARATOR_STR
+
_T
(
"_rels"
)
+
FILE_SEPARATOR_STR
+
_T
(
"notesSlide"
)
+
sNum
+
_T
(
".xml.rels"
);
CFile
oFile
;
oFile
.
CreateFile
(
strNoteRels
);
oFile
.
WriteStringUTF8
(
strNoteSlideRels
);
oFile
.
CloseFile
();
std
::
wstring
strNoteSlide
=
strDirectory
+
FILE_SEPARATOR_STR
+
_T
(
"ppt"
)
+
+
FILE_SEPARATOR_STR
+
_T
(
"notesSlides"
)
+
FILE_SEPARATOR_STR
+
_T
(
"notesSlide"
)
+
sNum
+
_T
(
".xml"
);
oFile
.
CreateFile
(
strNoteSlide
);
std
::
wstring
strW1
=
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>\
<p:notes xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:p=
\"
http://schemas.openxmlformats.org/presentationml/2006/main
\"
>\
<p:cSld><p:spTree><p:nvGrpSpPr><p:cNvPr id=
\"
1
\"
name=
\"\"
/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x=
\"
0
\"
y=
\"
0
\"
/>\
<a:ext cx=
\"
0
\"
cy=
\"
0
\"
/><a:chOff x=
\"
0
\"
y=
\"
0
\"
/><a:chExt cx=
\"
0
\"
cy=
\"
0
\"
/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id=
\"
100000
\"
name=
\"\"
/>\
<p:cNvSpPr><a:spLocks noGrp=
\"
1
\"
noChangeArrowheads=
\"
1
\"
/></p:cNvSpPr><p:nvPr><p:ph type=
\"
body
\"
idx=
\"
1
\"
/></p:nvPr></p:nvSpPr><p:spPr/>\
<p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr smtClean=
\"
0
\"
/><a:t>"
);
std
::
wstring
strW2
=
_T
(
"</a:t></a:r><a:endParaRPr/></a:p></p:txBody></p:sp></p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:notes>"
);
CorrectXmlString
(
strComment
);
m_oWriter
.
WriteString
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>\
<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>"
);
oFile
.
WriteStringUTF8
(
strW1
);
oFile
.
WriteStringUTF8
(
strComment
);
oFile
.
WriteStringUTF8
(
strW2
);
m_oWriter
.
WriteString
(
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout
\"
Target=
\"
../slideLayouts/slideLayout"
+
std
::
to_wstring
(
nIndexLayout
+
1
)
+
L".xml
\"
/>"
);
oFile
.
CloseFile
();
if
(
nIndexNotes
>=
0
)
{
m_oWriter
.
WriteString
(
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide
\"
Target=
\"
../notesSlides/notesSlide"
+
std
::
to_wstring
(
nIndexNotes
+
1
)
+
L".xml
\"
/>"
);
}
}
inline
void
CloseRels
()
{
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.cpp
View file @
7d188b22
...
...
@@ -97,11 +97,10 @@ void CPPTUserInfo::Clear()
m_mapNotes
.
clear
();
m_arrNotesOrder
.
clear
();
m_oExMedia
.
Clear
();
m_arrFonts
.
clear
();
for
(
in
t
nIndex
=
0
;
nIndex
<
m_mapAnimations
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
m_mapAnimations
.
size
();
++
nIndex
)
{
RELEASEOBJECT
(
m_mapAnimations
[
nIndex
]);
}
...
...
@@ -271,7 +270,7 @@ bool CPPTUserInfo::ReadFromStream(CRecordUserEditAtom* pUser, POLE::Stream* pStr
std
::
vector
<
CRecordFontEntityAtom
*>
oArrayFonts
;
m_oDocument
.
GetRecordsByType
(
&
oArrayFonts
,
true
);
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayFonts
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayFonts
.
size
();
++
nIndex
)
{
CFont
oFont
;
oFont
.
Name
=
oArrayFonts
[
nIndex
]
->
m_strFaceName
;
...
...
@@ -371,7 +370,7 @@ void CPPTUserInfo::FromDocument()
double
DurationSlide
=
PPT_DEFAULT_SLIDE_DURATION
;
m_arSlides
.
reserve
(
m_arrSlidesOrder
.
size
());
for
(
int
i
=
0
;
i
<
m_arrSlidesOrder
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
m_arrSlidesOrder
.
size
();
i
++
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPair
=
m_mapSlides
.
find
(
m_arrSlidesOrder
[
i
]);
...
...
@@ -382,9 +381,7 @@ void CPPTUserInfo::FromDocument()
DurationSlide
=
PPT_DEFAULT_SLIDE_DURATION
;
CSlide
*
elm
=
new
CSlide
();
m_arSlides
.
push_back
(
elm
);
// тут его заполняем...
m_arSlides
.
push_back
(
new
CSlide
());
// если на слайде есть анимации
std
::
map
<
DWORD
,
Animations
::
CSlideTimeLine
*>::
iterator
pTimeLine
=
m_mapAnimations
.
find
(
pPair
->
first
);
...
...
@@ -409,12 +406,196 @@ void CPPTUserInfo::FromDocument()
pSlide
->
m_lWidth
=
(
LONG
)(
c_dMasterUnitsToMillimetreKoef
*
lOriginWidth
);
pSlide
->
m_lHeight
=
(
LONG
)(
c_dMasterUnitsToMillimetreKoef
*
lOriginHeight
);
LoadSlide
(
pPair
->
first
,
m_arSlides
.
back
());
LoadSlide
(
pPair
->
first
,
pSlide
);
}
m_arNotes
.
reserve
(
m_arrNotesOrder
.
size
());
for
(
size_t
i
=
0
;
i
<
m_arrNotesOrder
.
size
();
i
++
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPair
=
m_mapNotes
.
find
(
m_arrNotesOrder
[
i
]);
if
(
pPair
==
m_mapNotes
.
end
())
continue
;
LoadNoteFromPrevUsers
(
pPair
->
first
);
DurationSlide
=
PPT_DEFAULT_SLIDE_DURATION
;
m_arNotes
.
push_back
(
new
CSlide
());
CSlide
*
pSlide
=
m_arNotes
.
back
();
pSlide
->
m_lOriginalWidth
=
lOriginWidth
;
pSlide
->
m_lOriginalHeight
=
lOriginHeight
;
pSlide
->
m_lWidth
=
(
LONG
)(
c_dMasterUnitsToMillimetreKoef
*
lOriginWidth
);
pSlide
->
m_lHeight
=
(
LONG
)(
c_dMasterUnitsToMillimetreKoef
*
lOriginHeight
);
LoadNotes
(
pPair
->
first
,
pSlide
);
}
CalculateEditor
(
m_oInfo
);
}
void
CPPTUserInfo
::
LoadNotes
(
DWORD
dwNoteID
,
CSlide
*
pNotes
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPairNotes
=
m_mapNotes
.
find
(
dwNoteID
);
if
(
pPairNotes
==
m_mapNotes
.
end
())
return
;
CRecordSlide
*
pRecordSlide
=
pPairNotes
->
second
;
if
(
NULL
==
pRecordSlide
)
return
;
pNotes
->
m_bUseLayoutColorScheme
=
true
;
CSlideInfo
slide_info
;
m_arNotesWrapper
.
push_back
(
slide_info
);
CSlideInfo
*
pNotesWrapper
=
&
m_arNotesWrapper
.
back
();
int
indexUser
=
pRecordSlide
->
m_IndexUser
;
pNotesWrapper
->
m_parEmptyPictures
=
&
m_pDocumentInfo
->
m_arUsers
[
indexUser
]
->
m_arOffsetPictures
;
pNotesWrapper
->
m_mapFilePictures
=
&
m_pDocumentInfo
->
m_mapStoreImageFile
;
//грузим placeholder
pNotesWrapper
->
m_arTextPlaceHolders
=
pRecordSlide
->
m_oPersist
.
m_arTextAttrs
;
std
::
vector
<
CRecordNotesAtom
*>
oArrayNotesAtoms
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayNotesAtoms
,
false
,
true
);
if
(
0
==
oArrayNotesAtoms
.
size
())
{
// ошибка!!!
return
;
}
bool
bMasterColorScheme
=
oArrayNotesAtoms
[
0
]
->
m_bMasterScheme
;
bool
bMasterBackGround
=
oArrayNotesAtoms
[
0
]
->
m_bMasterBackground
;
bool
bMasterObjects
=
oArrayNotesAtoms
[
0
]
->
m_bMasterObjects
;
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPairSlide
=
m_mapSlides
.
find
(
oArrayNotesAtoms
[
0
]
->
m_nSlideIDRef
);
if
(
pPairSlide
==
m_mapSlides
.
end
())
{
//????? у заметок нет слайда !!!
}
//-----------------------------------------------------
CSlide
*
pSlide
=
m_arSlides
[
pPairSlide
->
second
->
m_Index
];
pNotes
->
m_lSlideID
=
pPairSlide
->
second
->
m_Index
;
pSlide
->
m_lNotesID
=
m_arNotes
.
size
()
-
1
;
//-----------------------------------------------------
CTheme
*
pTheme
=
&
m_arThemes
[
pSlide
->
m_lThemeID
];
CSlideInfo
*
pThemeWrapper
=
&
m_arMasterWrapper
[
pSlide
->
m_lThemeID
];
CLayout
*
pLayout
=
NULL
;
//-----------------------------------------------------
std
::
vector
<
NSPresentationEditor
::
CColor
>*
pArrayColorScheme
=
&
pTheme
->
m_arColorScheme
;
// читаем цветовую схему -----------------------------------------------------------
pNotes
->
m_bUseLayoutColorScheme
=
true
;
if
(
!
bMasterColorScheme
)
{
std
::
vector
<
CRecordColorSchemeAtom
*>
oArrayColors
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayColors
,
false
);
for
(
size_t
i
=
0
;
i
<
oArrayColors
.
size
();
++
i
)
{
if
(
0x01
==
oArrayColors
[
i
]
->
m_oHeader
.
RecInstance
)
{
pNotes
->
m_bUseLayoutColorScheme
=
false
;
oArrayColors
[
i
]
->
ToArray
(
&
pNotes
->
m_arColorScheme
);
CorrectColorScheme
(
pNotes
->
m_arColorScheme
);
// проверим на совпадение
size_t
nCountC
=
pNotes
->
m_arColorScheme
.
size
();
size_t
nIndexC
=
0
;
if
(
nCountC
==
pArrayColorScheme
->
size
())
{
for
(;
nIndexC
<
nCountC
;
++
nIndexC
)
{
if
(
pNotes
->
m_arColorScheme
[
i
].
IsEqual
(
pArrayColorScheme
->
at
(
i
)))
break
;
}
}
if
(
nIndexC
==
nCountC
)
{
pNotes
->
m_bUseLayoutColorScheme
=
true
;
pNotes
->
m_arColorScheme
.
clear
();
}
break
;
}
}
}
//------------------------------------------------------------------------------------
bool
bHasDate
=
false
;
bool
bHasSlideNumber
=
false
;
bool
bHasFooter
=
false
;
int
nFormatDate
=
1
;
std
::
vector
<
CRecordHeadersFootersContainer
*>
oArrayHeadersFootersInfo
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayHeadersFootersInfo
,
true
,
false
);
if
(
!
oArrayHeadersFootersInfo
.
empty
())
{
if
(
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
)
{
bHasDate
=
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasDate
||
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasTodayDate
||
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasUserDate
;
bHasFooter
=
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasFooter
;
bHasSlideNumber
=
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasSlideNumber
;
if
(
oArrayHeadersFootersInfo
[
0
]
->
m_oHeadersFootersAtom
->
m_bHasUserDate
)
nFormatDate
=
2
;
}
for
(
int
i
=
0
;
i
<
3
;
i
++
)
pNotes
->
m_PlaceholdersReplaceString
[
i
]
=
oArrayHeadersFootersInfo
[
0
]
->
m_HeadersFootersString
[
i
];
}
//------------- читаем все элементы ------------------------------------------------------------------------------------------
pNotes
->
m_bIsBackground
=
false
;
std
::
vector
<
CRecordShapeContainer
*>
oArrayShapes
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayShapes
,
true
);
for
(
size_t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
{
IElement
*
pElement
=
NULL
;
oArrayShapes
[
nShape
]
->
GetElement
(
&
pElement
,
&
m_oExMedia
,
pNotes
->
m_lOriginalWidth
,
pNotes
->
m_lOriginalHeight
,
pTheme
,
pLayout
,
pThemeWrapper
,
pNotesWrapper
,
pNotes
);
if
(
NULL
!=
pElement
)
{
if
(
pElement
->
m_bIsBackground
&&
!
pElement
->
m_bHaveAnchor
&&
!
bMasterBackGround
)
{
CShapeElement
*
pShape
=
dynamic_cast
<
CShapeElement
*>
(
pElement
);
if
(
NULL
!=
pShape
)
{
pShape
->
SetupProperties
(
pNotes
,
pTheme
,
pLayout
);
pNotes
->
m_bIsBackground
=
true
;
pNotes
->
m_oBackground
=
pShape
->
m_oBrush
;
}
RELEASEOBJECT
(
pElement
);
continue
;
}
if
(
pElement
->
m_bHaveAnchor
)
{
pNotes
->
m_arElements
.
push_back
(
pElement
);
}
if
(
pElement
->
m_lPlaceholderType
>
0
)
{
pNotes
->
m_mapPlaceholders
.
insert
(
std
::
pair
<
int
,
int
>
(
pElement
->
m_lPlaceholderType
,
pNotes
->
m_arElements
.
size
()
-
1
));
}
}
}
}
void
CPPTUserInfo
::
LoadSlide
(
DWORD
dwSlideID
,
CSlide
*
pSlide
)
{
...
...
@@ -562,7 +743,7 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
std
::
vector
<
CRecordColorSchemeAtom
*>
oArrayColors
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayColors
,
false
);
for
(
in
t
i
=
0
;
i
<
oArrayColors
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oArrayColors
.
size
();
++
i
)
{
if
(
0x01
==
oArrayColors
[
i
]
->
m_oHeader
.
RecInstance
)
{
...
...
@@ -628,7 +809,7 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
std
::
vector
<
CRecordCString
*>
oArrayStrings
;
pRecordSlide
->
GetRecordsByType
(
&
oArrayStrings
,
false
,
false
);
for
(
int
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
{
if
(
oArrayStrings
[
i
]
->
m_oHeader
.
RecType
==
0x0fba
)
{
...
...
@@ -642,7 +823,7 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
pSlide
->
m_bIsBackground
=
false
;
for
(
in
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
for
(
size_
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
{
IElement
*
pElement
=
NULL
;
...
...
@@ -1029,7 +1210,8 @@ void CPPTUserInfo::LoadMainMaster(DWORD dwMasterID, const LONG& lOriginWidth, co
}
std
::
vector
<
CRecordCString
*>
oArrayStrings
;
pMaster
->
GetRecordsByType
(
&
oArrayStrings
,
false
,
false
);
for
(
int
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
{
if
(
oArrayStrings
[
i
]
->
m_oHeader
.
RecType
==
0x0fba
)
{
...
...
@@ -1100,7 +1282,7 @@ void CPPTUserInfo::LoadMainMaster(DWORD dwMasterID, const LONG& lOriginWidth, co
std
::
vector
<
CRecordTextMasterStyleAtom
*>
oArrayTextMasters
;
pMaster
->
GetRecordsByType
(
&
oArrayTextMasters
,
true
,
false
);
for
(
in
t
i
=
0
;
i
<
oArrayTextMasters
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oArrayTextMasters
.
size
();
++
i
)
{
LONG
lType
=
(
LONG
)
oArrayTextMasters
[
i
]
->
m_oHeader
.
RecInstance
;
if
((
0
>
lType
)
||
(
lType
>
8
))
...
...
@@ -1142,7 +1324,7 @@ void CPPTUserInfo::LoadMainMaster(DWORD dwMasterID, const LONG& lOriginWidth, co
CLayout
*
pLayout
=
NULL
;
// ну нету тут разметок ...!!
for
(
in
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
for
(
size_
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
{
NSPresentationEditor
::
IElement
*
pElement
=
NULL
;
oArrayShapes
[
nShape
]
->
GetElement
(
&
pElement
,
&
m_oExMedia
,
lOriginWidth
,
lOriginHeight
,
pTheme
,
pLayout
,
pMasterWrapper
,
pMasterWrapper
);
...
...
@@ -1177,7 +1359,7 @@ void CPPTUserInfo::LoadMainMaster(DWORD dwMasterID, const LONG& lOriginWidth, co
void
CPPTUserInfo
::
LoadMasters
(
const
LONG
&
lOriginWidth
,
const
LONG
&
lOriginHeight
)
{
for
(
long
i
=
0
;
i
<
m_arrMastersOrder
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
m_arrMastersOrder
.
size
();
i
++
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPair
=
m_mapMasters
.
find
(
m_arrMastersOrder
[
i
]);
if
(
pPair
==
m_mapMasters
.
end
())
continue
;
...
...
@@ -1185,7 +1367,7 @@ void CPPTUserInfo::LoadMasters(const LONG& lOriginWidth, const LONG& lOriginHeig
LoadMainMaster
(
pPair
->
first
,
lOriginWidth
,
lOriginHeight
);
}
for
(
long
i
=
0
;
i
<
m_arrMastersOrder
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
m_arrMastersOrder
.
size
();
i
++
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPair
=
m_mapMasters
.
find
(
m_arrMastersOrder
[
i
]);
if
(
pPair
==
m_mapMasters
.
end
())
continue
;
...
...
@@ -1281,7 +1463,7 @@ void CPPTUserInfo::LoadNoMainMaster(DWORD dwMasterID, const LONG& lOriginWidth,
pCurMaster
->
GetRecordsByType
(
&
oArrayColors
,
false
);
pLayout
->
m_arColorScheme
.
clear
();
for
(
in
t
i
=
0
;
i
<
oArrayColors
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oArrayColors
.
size
();
++
i
)
{
if
(
0x01
==
oArrayColors
[
i
]
->
m_oHeader
.
RecInstance
)
{
...
...
@@ -1341,7 +1523,7 @@ void CPPTUserInfo::LoadNoMainMaster(DWORD dwMasterID, const LONG& lOriginWidth,
std
::
vector
<
CRecordCString
*>
oArrayStrings
;
pCurMaster
->
GetRecordsByType
(
&
oArrayStrings
,
false
,
false
);
for
(
int
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
oArrayStrings
.
size
();
i
++
)
{
if
(
oArrayStrings
[
i
]
->
m_oHeader
.
RecType
==
0x0fba
)
{
...
...
@@ -1352,7 +1534,7 @@ void CPPTUserInfo::LoadNoMainMaster(DWORD dwMasterID, const LONG& lOriginWidth,
std
::
vector
<
CRecordShapeContainer
*>
oArrayShapes
;
pCurMaster
->
GetRecordsByType
(
&
oArrayShapes
,
true
);
for
(
in
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
for
(
size_
t
nShape
=
0
;
nShape
<
oArrayShapes
.
size
();
++
nShape
)
{
IElement
*
pElement
=
NULL
;
oArrayShapes
[
nShape
]
->
GetElement
(
&
pElement
,
&
m_oExMedia
,
lOriginWidth
,
lOriginHeight
,
pTheme
,
pLayout
,
pThemeWrapper
,
pMasterWrapper
);
...
...
@@ -1467,7 +1649,7 @@ void CPPTUserInfo::LoadMasterFromPrevUsers(DWORD dwMasterID)
size_t
lUsersCount
=
m_pDocumentInfo
->
m_arUsers
.
size
();
for
(
in
t
lIndexUser
=
m_lIndexThisUser
+
1
;
lIndexUser
<
lUsersCount
;
++
lIndexUser
)
for
(
size_
t
lIndexUser
=
m_lIndexThisUser
+
1
;
lIndexUser
<
lUsersCount
;
++
lIndexUser
)
{
std
::
map
<
DWORD
,
CRecordSlide
*>::
iterator
pPair
=
m_pDocumentInfo
->
m_arUsers
[
lIndexUser
]
->
m_mapMasters
.
find
(
dwMasterID
);
...
...
@@ -1569,7 +1751,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
std
::
vector
<
CRecordExVideoContainer
*>
oArray
;
pExObjects
->
GetRecordsByType
(
&
oArray
,
true
);
for
(
in
t
nIndex
=
0
;
nIndex
<
oArray
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArray
.
size
();
++
nIndex
)
{
LoadExVideo
(
oArray
[
nIndex
]);
}
...
...
@@ -1588,15 +1770,15 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
pExObjects
->
GetRecordsByType
(
&
oArrayWAVLink
,
true
);
pExObjects
->
GetRecordsByType
(
&
oArrayAudioEmbedded
,
true
);
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayAudioMIDI
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayAudioMIDI
.
size
();
++
nIndex
)
{
LoadExAudio
(
oArrayAudioMIDI
[
nIndex
]);
}
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayWAVLink
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayWAVLink
.
size
();
++
nIndex
)
{
LoadExAudio
(
oArrayWAVLink
[
nIndex
]);
}
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayAudioEmbedded
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayAudioEmbedded
.
size
();
++
nIndex
)
{
DWORD
dwKeySound
=
oArrayAudioEmbedded
[
nIndex
]
->
m_nSoundID
;
DWORD
dwKeyObj
=
oArrayAudioEmbedded
[
nIndex
]
->
m_oMedia
.
m_nExObjID
;
...
...
@@ -1613,7 +1795,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
m_oExMedia
.
m_arAudios
.
push_back
(
oAudio
);
}
}
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayAudioCD
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayAudioCD
.
size
();
++
nIndex
)
{
DWORD
dwKeyObj
=
oArrayAudioCD
[
nIndex
]
->
m_oMedia
.
m_nExObjID
;
...
...
@@ -1633,7 +1815,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
pExObjects
->
GetRecordsByType
(
&
oArrayHyperlinkContainer
,
true
);
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayHyperlinkContainer
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayHyperlinkContainer
.
size
();
++
nIndex
)
{
std
::
vector
<
CRecordExHyperlinkAtom
*>
oArrayHyperlink
;
std
::
vector
<
CRecordCString
*>
oArrayCString
;
...
...
@@ -1646,7 +1828,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
NSPresentationEditor
::
CExFilesInfo
oInfo
;
oInfo
.
m_dwID
=
oArrayHyperlink
[
0
]
->
m_nHyperlinkID
;
for
(
in
t
i
=
0
;
i
<
oArrayCString
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oArrayCString
.
size
();
i
++
)
{
if
(
oArrayCString
[
i
]
->
m_oHeader
.
RecInstance
==
1
)
oInfo
.
m_strFilePath
=
oArrayCString
[
i
]
->
m_strText
;
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/PPTDocumentInfoOneUser.h
View file @
7d188b22
...
...
@@ -47,8 +47,6 @@ public:
std
::
map
<
DWORD
,
DWORD
>
m_mapOffsetInPIDs
;
CRecordDocument
m_oDocument
;
//todooo при переходе на C++11 использовать НУЖНЫЙ здесь unsorted_map - m_arr .. Order уберутся
std
::
map
<
DWORD
,
CRecordSlide
*>
m_mapSlides
;
std
::
map
<
DWORD
,
CRecordSlide
*>
m_mapMasters
;
std
::
map
<
DWORD
,
CRecordSlide
*>
m_mapNotes
;
...
...
@@ -66,6 +64,7 @@ public:
// это как бы ППT-шная обертка над слайдом
std
::
vector
<
CSlideInfo
>
m_arSlideWrapper
;
std
::
vector
<
CSlideInfo
>
m_arMasterWrapper
;
std
::
vector
<
CSlideInfo
>
m_arNotesWrapper
;
// эти параметры - одни на весь документ.
// чтобы поддержать нашу схему (пптх) - копируем их в темы
...
...
@@ -106,8 +105,8 @@ public:
nullable
<
WORD
>
m_wLanguage
;
// язык пользователя (редактора)
bool
m_bRtl
;
bool
m_bShowComments
;
public:
//-----------------------------------------------------------------------------------------------------
CPPTUserInfo
();
~
CPPTUserInfo
();
...
...
@@ -119,6 +118,7 @@ public:
void
NormalizeCoords
(
long
lWidth
,
long
lHeight
);
void
LoadSlide
(
DWORD
dwSlideID
,
CSlide
*
pSlide
);
void
LoadNotes
(
DWORD
dwNotesID
,
CSlide
*
pSlide
);
void
LoadMasters
(
const
LONG
&
lOriginWidth
,
const
LONG
&
lOriginHeight
);
...
...
@@ -170,7 +170,6 @@ public:
oScheme
=
oArrayMem
;
}
std
::
wstring
ConvertLayoutType
(
INT
nGeom
,
BYTE
*
pPlaceholders
)
{
switch
(
nGeom
)
...
...
@@ -287,6 +286,7 @@ public:
return
_T
(
"blank"
);
}
void
AddAnimation
(
DWORD
dwSlideID
,
double
Width
,
double
Height
,
IElement
*
pElement
);
void
AddAudioTransition
(
DWORD
dwSlideID
,
CTransition
*
pTransition
,
const
std
::
wstring
&
strFilePath
);
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileDefines.h
View file @
7d188b22
...
...
@@ -73,10 +73,26 @@ typedef BYTE BOOL1;
#define RECORD_TYPE_EXOBJLIST_ATOM 1034
#define RECORD_TYPE_PPDRAWING_GROUP 1035
#define RECORD_TYPE_PPDRAWING 1036
#define RT_RoundTripTheme12Atom 1038
#define RT_RoundTripColorMapping12Atom 1039
#define RECORD_TYPE_NAMEDSHOWS 1040
#define RECORD_TYPE_NAMEDSHOW 1041
#define RECORD_TYPE_NAMEDSHOW_SLIDES 1042
#define RECORD_TYPE_SHEET_PROPERTIES 1044
#define RECORD_TYPE_ORIGINALMAINMASTERID 1052
#define RECORD_TYPE_COMPOSITEMASTERID 1053
#define RECORD_TYPE_ROUNDTRIPCONTENTMASTERINFO12 1054
#define RECORD_TYPE_ROUNDTRIPSHAPEID12 1055
#define RECORD_TYPE_ROUNDTRIPHFPLACEHOLDER12 1056
#define RECORD_TYPE_ROUNDTRIPCONTENTMASTERID 1058
#define RECORD_TYPE_ROUNDTRIPOARTTEXTSTYLES12 1059
#define RECORD_TYPE_ROUNDTRIPHEADERFOOTERDEFAULTS12ATOM 1060
#define RECORD_TYPE_ROUNDTRIPDOCFLAGS12 1061
#define RECORD_TYPE_ROUNDTRIPSHAPECHECKSUMFORCUSTOMLAYOUTS12 1062
#define RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12 1063
#define RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12 1064
#define RECORD_TYPE_LIST 2000
#define RECORD_TYPE_FONTCOLLECTION 2005
#define RECORD_TYPE_BOOKMARKCOLLECTION 2019
...
...
@@ -182,19 +198,6 @@ typedef BYTE BOOL1;
// Records ~12050 seem to be related to Document Encryption
#define RECORD_TYPE_DOCUMENT_ENCRYPTION_ATOM 12052
#define RECORD_TYPE_ORIGINALMAINMASTERID 1052
#define RECORD_TYPE_COMPOSITEMASTERID 1053
#define RECORD_TYPE_ROUNDTRIPCONTENTMASTERINFO12 1054
#define RECORD_TYPE_ROUNDTRIPSHAPEID12 1055
#define RECORD_TYPE_ROUNDTRIPHFPLACEHOLDER12 1056
#define RECORD_TYPE_ROUNDTRIPCONTENTMASTERID 1058
#define RECORD_TYPE_ROUNDTRIPOARTTEXTSTYLES12 1059
#define RECORD_TYPE_ROUNDTRIPHEADERFOOTERDEFAULTS12ATOM 1060
#define RECORD_TYPE_ROUNDTRIPDOCFLAGS12 1061
#define RECORD_TYPE_ROUNDTRIPSHAPECHECKSUMFORCUSTOMLAYOUTS12 1062
#define RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12 1063
#define RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12 1064
//records greater then 0xF000 belong to with Microsoft Office Drawing format also known as Escher
#define RECORD_TYPE_ESCHER_DGG_CONTAINER 0xF000
#define RECORD_TYPE_ESCHER_DGG 0xF006
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/Records.cpp
View file @
7d188b22
...
...
@@ -95,8 +95,8 @@ IRecord* CreateByType(SRecordHeader oHeader)
//CREATE_BY_TYPE(RECORD_TYPE_DOC_ROUTING_SLIP , CRecordDocRoutingSlipAtom)
//CREATE_BY_TYPE(RECORD_TYPE_EXOBJLIST_ATOM , CRecordExObjListAtom)
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN , CRecordGridSpacing10Atom)
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN
, CRecordRoundTripThemeAtom)
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN
, CRecordRoundTripColorMappingAtom)
CREATE_BY_TYPE
(
RT_RoundTripTheme12Atom
,
CRecordRoundTripThemeAtom
)
CREATE_BY_TYPE
(
RT_RoundTripColorMapping12Atom
,
CRecordRoundTripColorMappingAtom
)
//CREATE_BY_TYPE(RECORD_TYPE_NAMEDSHOW_SLIDES , CRecordNamedShowSlidesAtom)
//CREATE_BY_TYPE(RECORD_TYPE_SHEET_PROPERTIES , CRecordNormalViewSetInfoAtom)
...
...
@@ -110,9 +110,9 @@ IRecord* CreateByType(SRecordHeader oHeader)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPCONTENTMASTERID , CRecordRoundTripContentMasterId12Atom)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPOARTTEXTSTYLES12 , CRecordRoundTripOArtTextStyles12Atom)
CREATE_BY_TYPE
(
RECORD_TYPE_ROUNDTRIPHEADERFOOTERDEFAULTS12ATOM
,
CRecordRoundTripHeaderFooterDefaults12Atom
)
CREATE_BY_TYPE
(
RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12
,
CRecordRoundTripNotesMasterTextStyles12Atom
)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPDOCFLAGS12 , CRecordRoundTripDocFlags12Atom)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPSHAPECHECKSUMFORCUSTOMLAYOUTS12 , CRecordRoundTripShapeCheckSumForCustomLayouts12Atom)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12 , CRecordRoundTripNotesMasterTextStyles12Atom)
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12 , CRecordRoundTripCustomTableStyles12Atom)
//CREATE_BY_TYPE(RECORD_TYPE_BOOKMARK_SEED_ATOM , CRecordBookmarkSeedAtom)
...
...
ASCOfficePPTFile/PPTFormatLib/Reader/Records.h
View file @
7d188b22
...
...
@@ -182,7 +182,7 @@ public:
return
;
// возвращаем указатели, их не удалять наверху!!!!
for
(
in
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
{
T
pRec
=
dynamic_cast
<
T
>
(
m_arRecords
[
nIndex
]);
if
(
NULL
!=
pRec
)
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Animations/AnimationTypes.h
View file @
7d188b22
...
...
@@ -206,7 +206,7 @@ namespace Animations
std
::
vector
<
std
::
wstring
>
arMovePath
;
boost
::
algorithm
::
split
(
arMovePath
,
MovePath
,
boost
::
algorithm
::
is_any_of
(
L" "
),
boost
::
algorithm
::
token_compress_on
);
for
(
in
t
i
=
0
;
i
<
arMovePath
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
arMovePath
.
size
();
i
++
)
{
ActionPoint
aPoint
;
aPoint
.
TYPE
=
arMovePath
[
i
++
][
0
];
...
...
@@ -245,7 +245,7 @@ namespace Animations
{
std
::
wstring
MovePath
;
for
(
in
t
i
=
0
;
i
<
m_Points
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
m_Points
.
size
();
++
i
)
{
std
::
wstring
NextPoint
;
...
...
ASCOfficePPTFile/PPTFormatLib/Records/DocumentRecords.h
View file @
7d188b22
...
...
@@ -39,9 +39,7 @@ public:
std
::
vector
<
SSlidePersist
>
m_arNotePersists
;
std
::
vector
<
SSlidePersist
>
m_arSlidePersists
;
public:
CRecordDocument
()
:
m_arMasterPersists
(),
m_arNotePersists
(),
m_arSlidePersists
()
CRecordDocument
()
{
}
...
...
@@ -145,7 +143,7 @@ public:
std
::
vector
<
CRecordSlideListWithText
*>
oArraySlideWithText
;
this
->
GetRecordsByType
(
&
oArraySlideWithText
,
true
,
false
);
for
(
in
t
nIndexList
=
0
;
nIndexList
<
oArraySlideWithText
.
size
();
++
nIndexList
)
for
(
size_
t
nIndexList
=
0
;
nIndexList
<
oArraySlideWithText
.
size
();
++
nIndexList
)
{
CRecordSlideListWithText
*
pAtom
=
oArraySlideWithText
[
nIndexList
];
std
::
vector
<
SSlidePersist
>*
pArray
=
NULL
;
...
...
@@ -155,20 +153,15 @@ public:
case
CRecordSlideListWithText
:
:
CollectionOfMasterSlides
:
{
pArray
=
&
m_arMasterPersists
;
break
;
}
}
break
;
case
CRecordSlideListWithText
:
:
CollectionOfNotesSlides
:
{
pArray
=
&
m_arNotePersists
;
break
;
}
}
break
;
case
CRecordSlideListWithText
:
:
CollectionOfSlides
:
{
pArray
=
&
m_arSlidePersists
;
break
;
}
}
break
;
default:
{
// этого не может быть...
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/BlipStoreContainer.h
View file @
7d188b22
...
...
@@ -53,7 +53,7 @@ public:
pArray
->
clear
();
std
::
map
<
DWORD
,
int
>
image_map
;
for
(
in
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
{
CRecordBlipStoreEntry
*
pEntry
=
dynamic_cast
<
CRecordBlipStoreEntry
*>
(
m_arRecords
[
nIndex
]);
if
(
NULL
!=
pEntry
)
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/GroupShapeContainer.h
View file @
7d188b22
...
...
@@ -71,7 +71,7 @@ public:
oArrayShapes
[
0
]
->
bGroupShape
=
true
;
//тут описание самой группы
int
nIndexBreak
=
-
1
;
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayShapes
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayShapes
.
size
();
++
nIndex
)
{
std
::
vector
<
CRecordGroupShape
*>
oArrayGroupShapes
;
oArrayShapes
[
nIndex
]
->
GetRecordsByType
(
&
oArrayGroupShapes
,
false
,
true
);
...
...
@@ -120,7 +120,7 @@ public:
bool
bIsRecalc
=
((
lW1
>
0
)
&&
(
lH1
>
0
)
&&
(
lW2
>
0
)
&&
(
lH2
>
0
));
if
(
bIsRecalc
)
{
for
(
in
t
nIndex
=
0
;
nIndex
<
oArrayShapes
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oArrayShapes
.
size
();
++
nIndex
)
{
if
(
nIndex
!=
nIndexBreak
)
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
View file @
7d188b22
...
...
@@ -1890,7 +1890,7 @@ protected:
if
(
master_levels
)
{
for
(
in
t
i
=
0
;
i
<
pText
->
m_arParagraphs
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
pText
->
m_arParagraphs
.
size
();
i
++
)
{
if
(
i
>=
master_levels
->
m_arrProps
.
size
())
break
;
...
...
ASCOfficePPTFile/PPTFormatLib/Records/HeadersFootersAtom.h
View file @
7d188b22
...
...
@@ -198,7 +198,7 @@ public:
{
CRecordsContainer
::
ReadFromStream
(
oHeader
,
pStream
);
for
(
in
t
i
=
0
;
i
<
m_arRecords
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
m_arRecords
.
size
();
i
++
)
{
switch
(
m_arRecords
[
i
]
->
m_oHeader
.
RecType
)
{
...
...
ASCOfficePPTFile/PPTFormatLib/Records/NotesAtom.h
View file @
7d188b22
...
...
@@ -34,14 +34,13 @@
class
CRecordNotesAtom
:
public
CUnknownRecord
{
public:
UINT
m_nSlideIDRef
;
bool
m_bMasterObjects
;
bool
m_bMasterScheme
;
bool
m_bMasterBackground
;
public:
CRecordNotesAtom
()
{
}
...
...
ASCOfficePPTFile/PPTFormatLib/Records/RecordsIncluder.h
View file @
7d188b22
...
...
@@ -91,6 +91,7 @@
#include "RoundTripColorMappingAtom.h"
#include "RoundTripNewPlaceholderId12Atom.h"
#include "RoundTripThemeAtom.h"
#include "RoundTripNotesMasterTextStyles12Atom.h"
#include "TextRulerAtom.h"
#include "ShapeFlags10Atom.h"
#include "ShapeFlagsAtom.h"
...
...
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripColorMappingAtom.h
View file @
7d188b22
...
...
@@ -34,9 +34,8 @@
class
CRecordRoundTripColorMappingAtom
:
public
CUnknownRecord
{
std
::
wstring
m_pString
;
public:
std
::
string
m_strData
;
CRecordRoundTripColorMappingAtom
()
{
...
...
@@ -48,6 +47,7 @@ public:
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
return
CUnknownRecord
::
ReadFromStream
(
oHeader
,
pStream
);
m_oHeader
=
oHeader
;
m_strData
=
StreamUtils
::
ReadStringA
(
pStream
,
(
long
)
m_oHeader
.
RecLen
);
}
};
ASCOfficePPTFile/PPTFormatLib/Records/RoundTripThemeAtom.h
View file @
7d188b22
...
...
@@ -34,9 +34,8 @@
class
CRecordRoundTripThemeAtom
:
public
CUnknownRecord
{
std
::
wstring
m_strData
;
public:
std
::
string
m_strData
;
CRecordRoundTripThemeAtom
()
{
...
...
@@ -48,6 +47,7 @@ public:
virtual
void
ReadFromStream
(
SRecordHeader
&
oHeader
,
POLE
::
Stream
*
pStream
)
{
return
CUnknownRecord
::
ReadFromStream
(
oHeader
,
pStream
);
m_oHeader
=
oHeader
;
m_strData
=
StreamUtils
::
ReadStringA
(
pStream
,
(
long
)
m_oHeader
.
RecLen
);
}
};
ASCOfficePPTFile/PPTFormatLib/Records/SlideContainer.h
View file @
7d188b22
...
...
@@ -129,7 +129,7 @@ public:
bool
IsSlide
()
{
for
(
in
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
m_arRecords
.
size
();
++
nIndex
)
{
if
((
RECORD_TYPE_SLIDE
==
m_arRecords
[
nIndex
]
->
m_oHeader
.
RecType
)
||
(
RECORD_TYPE_MAINMASTER
==
m_arRecords
[
nIndex
]
->
m_oHeader
.
RecType
)
||
...
...
ASCOfficePPTFile/PPTFormatLib/Records/TextBytesAtom.h
View file @
7d188b22
...
...
@@ -59,7 +59,7 @@ public:
{
pStream
->
read
(
pUTF16_low
,
m_oHeader
.
RecLen
);
for
(
int
i
=
0
;
i
<
m_oHeader
.
RecLen
;
i
++
)
for
(
UINT
i
=
0
;
i
<
m_oHeader
.
RecLen
;
i
++
)
{
pUTF16
[
i
]
=
pUTF16_low
[
i
];
}
...
...
ASCOfficePPTFile/PPTFormatLib/Records/TextSpecInfoAtom.h
View file @
7d188b22
...
...
@@ -86,11 +86,12 @@ public:
int
pos_text
=
0
,
pos_si
=
0
;
int
ind
=
0
;
for
(
int
i
=
0
;
i
<
pText
->
m_arParagraphs
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
pText
->
m_arParagraphs
.
size
();
i
++
)
{
if
(
ind
>=
m_arrSIs
.
size
())
break
;
for
(
in
t
j
=
0
;
j
<
pText
->
m_arParagraphs
[
i
].
m_arSpans
.
size
();
j
++
)
for
(
size_
t
j
=
0
;
j
<
pText
->
m_arParagraphs
[
i
].
m_arSpans
.
size
();
j
++
)
{
if
(
pos_text
+
pText
->
m_arParagraphs
[
i
].
m_arSpans
[
j
].
m_strText
.
length
()
>
pos_si
+
m_arrSIs
[
ind
].
lCount
)
{
...
...
ASCOfficePPTXFile/Editor/Drawing/Document.h
View file @
7d188b22
...
...
@@ -41,11 +41,10 @@ namespace NSPresentationEditor
public:
std
::
vector
<
CTheme
>
m_arThemes
;
std
::
vector
<
CSlide
*>
m_arSlides
;
std
::
vector
<
CSlide
*>
m_arNotes
;
CMetricInfo
m_oInfo
;
public:
CDocument
()
:
m_arThemes
(),
m_arSlides
()
{
}
...
...
@@ -58,6 +57,7 @@ namespace NSPresentationEditor
{
m_arThemes
=
oSrc
.
m_arThemes
;
m_arSlides
=
oSrc
.
m_arSlides
;
m_arNotes
=
oSrc
.
m_arNotes
;
m_oInfo
=
oSrc
.
m_oInfo
;
...
...
@@ -69,19 +69,18 @@ namespace NSPresentationEditor
*
this
=
oSrc
;
}
public:
inline
void
Clear
()
{
ClearThemes
();
try
{
ClearSlides
();
ClearNotes
();
}
catch
(...)
{
}
}
// работа с темами
inline
void
ClearThemes
()
{
m_arThemes
.
clear
();
...
...
@@ -97,23 +96,24 @@ namespace NSPresentationEditor
m_arThemes
[
nIndex
]
=
oTheme
;
}
// работа со слайдом
inline
void
ClearSlides
()
{
for
(
in
t
i
=
0
;
i
<
m_arSlides
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
m_arSlides
.
size
();
i
++
)
{
RELEASEOBJECT
(
m_arSlides
[
i
]);
}
m_arSlides
.
clear
();
}
inline
void
AddSlide
(
CSlide
*
oSlide
)
inline
void
ClearNotes
(
)
{
m_arSlides
.
push_back
(
oSlide
);
for
(
size_t
i
=
0
;
i
<
m_arNotes
.
size
();
i
++
)
{
RELEASEOBJECT
(
m_arNotes
[
i
]);
}
m_arNotes
.
clear
();
}
public:
// функция производит расчет по теме и слайдам
#if defined (_DEBUG)
std
::
wstring
GetXmlSlideTransition
(
CSlide
&
oSlide
/*, CAudioOverlay& oAudioOverlay*/
)
{
std
::
wstring
Source
=
std
::
wstring
(
_T
(
""
)
);
...
...
@@ -338,7 +338,7 @@ namespace NSPresentationEditor
return
Source
;
}
#endif
double
CalculateTimes
(
CAudioOverlay
&
oAudioOverlay
)
{
CaclulateSlideTimes
();
...
...
@@ -486,7 +486,6 @@ namespace NSPresentationEditor
}
}
public:
void
ResetAutoText
(
IElement
*
pElement
,
vector_string
const
(
&
placeholdersReplaceString
)[
3
])
{
CShapeElement
*
pShape
=
dynamic_cast
<
CShapeElement
*>
(
pElement
);
...
...
ASCOfficePPTXFile/Editor/Drawing/Slide.h
View file @
7d188b22
...
...
@@ -41,6 +41,9 @@ namespace NSPresentationEditor
LONG
m_lThemeID
;
LONG
m_lLayoutID
;
LONG
m_lSlideID
;
//for notes rels
LONG
m_lNotesID
;
//for slide rels
std
::
vector
<
IElement
*>
m_arElements
;
CSlideShowInfo
m_oSlideShow
;
std
::
multimap
<
int
,
int
>
m_mapPlaceholders
;
...
...
@@ -91,6 +94,8 @@ namespace NSPresentationEditor
m_lThemeID
=
-
1
;
m_lLayoutID
=
-
1
;
m_lSlideID
=
-
1
;
m_lNotesID
=
-
1
;
m_lWidth
=
270
;
m_lHeight
=
190
;
...
...
@@ -125,6 +130,8 @@ namespace NSPresentationEditor
m_lThemeID
=
oSrc
.
m_lThemeID
;
m_lLayoutID
=
oSrc
.
m_lLayoutID
;
m_lNotesID
=
oSrc
.
m_lNotesID
;
m_lSlideID
=
oSrc
.
m_lSlideID
;
m_lWidth
=
oSrc
.
m_lWidth
;
m_lHeight
=
oSrc
.
m_lHeight
;
...
...
ASCOfficePPTXFile/Editor/Drawing/Theme.h
View file @
7d188b22
...
...
@@ -32,7 +32,6 @@
#pragma once
#include "Structures.h"
#include "Layout.h"
//#include "../PPTXWriter/CSS.h"
namespace
NSPresentationEditor
{
...
...
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