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
03edd408
Commit
03edd408
authored
Jun 13, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pptx binary - write notes & master notes
parent
9ff87b3c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
186 additions
and
104 deletions
+186
-104
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
+18
-5
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
+3
-2
ASCOfficePPTXFile/Editor/Converter.h
ASCOfficePPTXFile/Editor/Converter.h
+1
-2
ASCOfficePPTXFile/Editor/PPTXWriter.h
ASCOfficePPTXFile/Editor/PPTXWriter.h
+154
-89
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
+5
-1
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
+2
-2
ASCOfficePPTXFile/PPTXFormat/NotesMaster.h
ASCOfficePPTXFile/PPTXFormat/NotesMaster.h
+3
-3
No files found.
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
View file @
03edd408
...
...
@@ -1115,6 +1115,16 @@ namespace NSBinPptxRW
m_pWriter
->
WriteString
(
str
);
}
std
::
wstring
s
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme
\"
Target=
\"
../theme/theme"
+
std
::
to_wstring
(
nIndexTheme
+
1
)
+
L".xml
\"
/>"
;
m_pWriter
->
WriteString
(
s
);
}
void
CRelsGenerator
::
StartNotesMaster
(
int
nIndexTheme
)
{
m_pWriter
->
WriteString
(
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
));
m_pWriter
->
WriteString
(
_T
(
"<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>"
));
std
::
wstring
s
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme
\"
Target=
\"
../theme/theme"
+
std
::
to_wstring
(
nIndexTheme
+
1
)
+
L".xml
\"
/>"
;
...
...
@@ -1130,7 +1140,7 @@ namespace NSBinPptxRW
std
::
to_wstring
(
nIndexTheme
+
1
)
+
L".xml
\"
/>"
;
m_pWriter
->
WriteString
(
str
);
}
void
CRelsGenerator
::
StartSlide
(
int
nIndexSlide
,
int
nIndexLayout
)
void
CRelsGenerator
::
StartSlide
(
int
nIndexSlide
,
int
nIndexLayout
,
int
nIndexNotes
)
{
m_pWriter
->
WriteString
(
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
));
m_pWriter
->
WriteString
(
_T
(
"<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>"
));
...
...
@@ -1140,12 +1150,15 @@ namespace NSBinPptxRW
std
::
to_wstring
(
nIndexLayout
+
1
)
+
L".xml
\"
/>"
;
m_pWriter
->
WriteString
(
str
);
str
=
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
(
nIndexSlide
+
1
)
+
L".xml
\"
/>"
;
if
(
nIndexNotes
>=
0
)
{
str
=
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
\"
/>"
;
}
m_pWriter
->
WriteString
(
str
);
}
void
CRelsGenerator
::
StartNote
(
int
nIndexSlide
)
void
CRelsGenerator
::
StartNote
s
(
int
nIndexSlide
)
{
m_pWriter
->
WriteString
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
);
m_pWriter
->
WriteString
(
L"<Relationships xmlns=
\"
http://schemas.openxmlformats.org/package/2006/relationships
\"
>"
);
...
...
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
View file @
03edd408
...
...
@@ -407,8 +407,9 @@ namespace NSBinPptxRW
void
StartMaster
(
int
nIndexTheme
,
const
_slideMasterInfo
&
oInfo
);
void
StartLayout
(
int
nIndexTheme
);
void
StartSlide
(
int
nIndexSlide
,
int
nIndexLayout
);
void
StartNote
(
int
nIndexSlide
);
void
StartSlide
(
int
nIndexSlide
,
int
nIndexLayout
,
int
nIndexNotes
);
void
StartNotes
(
int
nIndexSlide
);
void
StartNotesMaster
(
int
nIndexTheme
);
void
WriteMasters
(
int
nCount
);
void
WriteThemes
(
int
nCount
);
...
...
ASCOfficePPTXFile/Editor/Converter.h
View file @
03edd408
...
...
@@ -162,8 +162,7 @@ namespace PPTX2EditorAdvanced
}
// записываем все слайды
size_t
nCount
=
presentation
->
sldIdLst
.
size
();
for
(
size_t
i
=
0
;
i
<
nCount
;
++
i
)
for
(
size_t
i
=
0
;
i
<
presentation
->
sldIdLst
.
size
();
++
i
)
{
std
::
wstring
rId
=
presentation
->
sldIdLst
[
i
].
rid
.
get
();
smart_ptr
<
PPTX
::
Slide
>
slide
=
((
*
presentation
)[
rId
]).
smart_dynamic_cast
<
PPTX
::
Slide
>
();
...
...
ASCOfficePPTXFile/Editor/PPTXWriter.h
View file @
03edd408
This diff is collapsed.
Click to expand it.
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
View file @
03edd408
...
...
@@ -44,7 +44,11 @@ namespace PPTX
{
public:
WritingElement_AdditionConstructors
(
ClrMap
)
PPTX_LOGIC_BASE2
(
ClrMap
)
ClrMap
(
std
::
wstring
name
=
L"p:clrMap"
)
{
m_name
=
name
;
}
virtual
OOX
::
EElementType
getType
()
const
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
View file @
03edd408
...
...
@@ -46,9 +46,9 @@ namespace PPTX
public:
WritingElement_AdditionConstructors
(
TextListStyle
)
TextListStyle
()
TextListStyle
(
std
::
wstring
name
=
L"a:lstStyle"
)
{
m_name
=
L"a:lstStyle"
;
m_name
=
name
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
...
...
ASCOfficePPTXFile/PPTXFormat/NotesMaster.h
View file @
03edd408
...
...
@@ -131,11 +131,11 @@ namespace PPTX
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"xmlns:a"
),
PPTX
::
g_Namespaces
.
a
.
m_strLink
);
pWriter
->
WriteAttribute
(
_T
(
"xmlns:r"
),
PPTX
::
g_Namespaces
.
r
.
m_strLink
);
pWriter
->
WriteAttribute
(
_T
(
"xmlns:m"
),
PPTX
::
g_Namespaces
.
m
.
m_strLink
);
pWriter
->
WriteAttribute
(
_T
(
"xmlns:w"
),
PPTX
::
g_Namespaces
.
w
.
m_strLink
);
pWriter
->
WriteAttribute
(
_T
(
"xmlns:p"
),
PPTX
::
g_Namespaces
.
p
.
m_strLink
);
pWriter
->
EndAttributes
();
cSld
.
toXmlWriter
(
pWriter
);
clrMap
.
toXmlWriter
(
pWriter
);
pWriter
->
Write
(
hf
);
pWriter
->
Write
(
notesStyle
);
...
...
@@ -172,7 +172,7 @@ namespace PPTX
}
case
3
:
{
notesStyle
=
new
Logic
::
TextListStyle
();
notesStyle
=
new
Logic
::
TextListStyle
(
L"p:notesStyle"
);
notesStyle
->
fromPPTY
(
pReader
);
break
;
}
...
...
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