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
7929d798
Commit
7929d798
authored
Apr 12, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open presentation notes
parent
4c3d8ca0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
21 deletions
+70
-21
ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
+3
-1
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
+2
-0
ASCOfficePPTXFile/Editor/Converter.h
ASCOfficePPTXFile/Editor/Converter.h
+65
-20
No files found.
ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
View file @
7929d798
...
...
@@ -80,7 +80,9 @@ namespace NSBinPptxRW
ImageMap
=
42
,
FontMap
=
43
,
FontsEmbedded
=
44
FontsEmbedded
=
44
,
SlideNotesRels
=
45
,
NotesRels
=
46
};
}
}
...
...
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
View file @
7929d798
...
...
@@ -152,6 +152,8 @@ namespace NSBinPptxRW
std
::
vector
<
_masterSlideInfo
>
m_oRels
;
std
::
vector
<
LONG
>
m_oSlide_Layout_Rels
;
std
::
vector
<
LONG
>
m_oSlide_Notes_Rels
;
std
::
vector
<
LONG
>
m_oNote_Rels
;
NSShapeImageGen
::
CImageManager
*
m_pImageManager
;
...
...
ASCOfficePPTXFile/Editor/Converter.h
View file @
7929d798
...
...
@@ -194,7 +194,7 @@ namespace PPTX2EditorAdvanced
// проверяем note
size_t
pPointerN
=
(
size_t
)(
slide
->
Note
.
operator
->
());
LONG
nNoteIndex
=
-
1
;
if
(
NULL
!=
pPointerN
)
{
std
::
map
<
size_t
,
LONG
>::
const_iterator
pSearchN
=
pCommon
->
notes
.
find
(
pPointerN
);
...
...
@@ -203,8 +203,27 @@ namespace PPTX2EditorAdvanced
LONG
lCountN
=
(
LONG
)
_notes
.
size
();
pCommon
->
notes
[
pPointerN
]
=
lCountN
;
_notes
.
push_back
(
slide
->
Note
);
nNoteIndex
=
lCountN
;
}
}
oBinaryWriter
.
m_pCommon
->
m_oSlide_Notes_Rels
.
push_back
(
nNoteIndex
);
}
for
(
size_t
i
=
0
;
i
<
_notes
.
size
();
++
i
)
{
smart_ptr
<
PPTX
::
NotesSlide
>
note
=
_notes
[
i
];
LONG
nMasterIndex
=
-
1
;
smart_ptr
<
PPTX
::
NotesMaster
>
noteMaster
=
note
->
Get
(
OOX
::
Presentation
::
FileTypes
::
NotesMaster
).
smart_dynamic_cast
<
PPTX
::
NotesMaster
>
();
if
(
noteMaster
.
is_init
())
{
size_t
pPointerL
=
(
size_t
)(
noteMaster
.
operator
->
());
std
::
map
<
size_t
,
LONG
>::
const_iterator
pSearchL
=
pCommon
->
notesMasters
.
find
(
pPointerL
);
if
(
pSearchL
!=
pCommon
->
notesMasters
.
end
())
{
nMasterIndex
=
pSearchL
->
second
;
}
}
oBinaryWriter
.
m_pCommon
->
m_oNote_Rels
.
push_back
(
nMasterIndex
);
}
// нужно записать все в maintables. А кроме главных таблиц ничего и нету. Все остальное лежит в них
...
...
@@ -328,27 +347,22 @@ namespace PPTX2EditorAdvanced
_slides
[
i
]
->
toPPTY
(
&
oBinaryWriter
);
}
if
(
false
)
{
// ПОКА нету NOTES
// notes
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
NotesSlides
);
ULONG
nCountN
=
(
ULONG
)
_notes
.
size
();
oBinaryWriter
.
WriteULONG
(
nCountN
);
for
(
ULONG
i
=
0
;
i
<
nCountN
;
++
i
)
{
_notes
[
i
]
->
toPPTY
(
&
oBinaryWriter
);
}
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
NotesSlides
);
ULONG
nCountN
=
(
ULONG
)
_notes
.
size
();
oBinaryWriter
.
WriteULONG
(
nCountN
);
for
(
ULONG
i
=
0
;
i
<
nCountN
;
++
i
)
{
_notes
[
i
]
->
toPPTY
(
&
oBinaryWriter
);
}
// notesmasters
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
NotesMasters
);
ULONG
nCountNM
=
(
ULONG
)
_notesMasters
.
size
();
oBinaryWriter
.
WriteULONG
(
nCountNM
);
for
(
ULONG
i
=
0
;
i
<
nCountNM
;
++
i
)
{
_notesMasters
[
i
]
->
toPPTY
(
&
oBinaryWriter
);
}
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
NotesMasters
);
ULONG
nCountNM
=
(
ULONG
)
_notesMasters
.
size
();
oBinaryWriter
.
WriteULONG
(
nCountNM
);
for
(
ULONG
i
=
0
;
i
<
nCountNM
;
++
i
)
{
_notesMasters
[
i
]
->
toPPTY
(
&
oBinaryWriter
);
}
// ImageMap ---------------------------------------
...
...
@@ -405,7 +419,21 @@ namespace PPTX2EditorAdvanced
oBinaryWriter
.
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
oBinaryWriter
.
EndRecord
();
// ------------------------------------------------
// SlideNotesRels --------------------------------------
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
SlideNotesRels
);
oBinaryWriter
.
StartRecord
(
NSMainTables
::
SlideNotesRels
);
oBinaryWriter
.
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
_s_rels
=
oBinaryWriter
.
m_pCommon
->
m_oSlide_Notes_Rels
.
size
();
for
(
size_t
i
=
0
;
i
<
_s_rels
;
++
i
)
{
oBinaryWriter
.
WriteInt1
(
0
,
oBinaryWriter
.
m_pCommon
->
m_oSlide_Notes_Rels
[
i
]);
}
oBinaryWriter
.
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
oBinaryWriter
.
EndRecord
();
// ------------------------------------------------
// ThemeRels --------------------------------------
...
...
@@ -445,7 +473,24 @@ namespace PPTX2EditorAdvanced
oBinaryWriter
.
EndRecord
();
}
// ------------------------------------------------
// NoteRels --------------------------------------
oBinaryWriter
.
StartMainRecord
(
NSMainTables
::
NotesRels
);
oBinaryWriter
.
StartRecord
(
NSMainTables
::
NotesRels
);
oBinaryWriter
.
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
_s_rels
=
oBinaryWriter
.
m_pCommon
->
m_oNote_Rels
.
size
();
for
(
size_t
i
=
0
;
i
<
_s_rels
;
++
i
)
{
oBinaryWriter
.
WriteInt1
(
0
,
oBinaryWriter
.
m_pCommon
->
m_oNote_Rels
[
i
]);
}
oBinaryWriter
.
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
oBinaryWriter
.
EndRecord
();
// ------------------------------------------------
oBinaryWriter
.
EndRecord
();
}
...
...
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