Commit 5a3f98c5 authored by Sergey Konovalov's avatar Sergey Konovalov

open notesMasters rels

parent 8677540a
...@@ -82,7 +82,8 @@ namespace NSBinPptxRW ...@@ -82,7 +82,8 @@ namespace NSBinPptxRW
FontsEmbedded = 44, FontsEmbedded = 44,
SlideNotesRels = 45, SlideNotesRels = 45,
NotesRels = 46 NotesRels = 46,
NotesMastersRels= 47
}; };
} }
} }
......
...@@ -154,6 +154,7 @@ namespace NSBinPptxRW ...@@ -154,6 +154,7 @@ namespace NSBinPptxRW
std::vector<LONG> m_oSlide_Layout_Rels; std::vector<LONG> m_oSlide_Layout_Rels;
std::vector<LONG> m_oSlide_Notes_Rels; std::vector<LONG> m_oSlide_Notes_Rels;
std::vector<LONG> m_oNote_Rels; std::vector<LONG> m_oNote_Rels;
std::vector<LONG> m_oNotesMasters_Rels;
NSShapeImageGen::CImageManager* m_pImageManager; NSShapeImageGen::CImageManager* m_pImageManager;
......
...@@ -147,13 +147,18 @@ namespace PPTX2EditorAdvanced ...@@ -147,13 +147,18 @@ namespace PPTX2EditorAdvanced
// проверяем theme // проверяем theme
size_t pPointerTh = (size_t)(noteMaster->theme_.operator ->()); size_t pPointerTh = (size_t)(noteMaster->theme_.operator ->());
LONG nNotesMastersRelsIndex = -1;
std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find(pPointerTh); std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find(pPointerTh);
if (pSearchTh == pCommon->themes.end()) if (pSearchTh == pCommon->themes.end())
{ {
LONG lCountTh = (LONG)_themes.size(); LONG lCountTh = (LONG)_themes.size();
pCommon->themes [pPointerTh] = lCountTh; pCommon->themes [pPointerTh] = lCountTh;
_themes.push_back(noteMaster->theme_); _themes.push_back(noteMaster->theme_);
nNotesMastersRelsIndex = lCountTh;
} else {
nNotesMastersRelsIndex = pSearchTh->second;
} }
oBinaryWriter.m_pCommon->m_oNotesMasters_Rels.push_back(nNotesMastersRelsIndex);
} }
// записываем все слайды // записываем все слайды
...@@ -490,6 +495,21 @@ namespace PPTX2EditorAdvanced ...@@ -490,6 +495,21 @@ namespace PPTX2EditorAdvanced
oBinaryWriter.EndRecord(); oBinaryWriter.EndRecord();
// ------------------------------------------------ // ------------------------------------------------
// NoteRels --------------------------------------
oBinaryWriter.StartMainRecord(NSMainTables::NotesMastersRels);
oBinaryWriter.StartRecord(NSMainTables::NotesMastersRels);
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
_s_rels = oBinaryWriter.m_pCommon->m_oNotesMasters_Rels.size();
for (size_t i = 0; i < _s_rels; ++i)
{
oBinaryWriter.WriteInt1(0, oBinaryWriter.m_pCommon->m_oNotesMasters_Rels[i]);
}
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
oBinaryWriter.EndRecord();
// ------------------------------------------------
oBinaryWriter.EndRecord(); oBinaryWriter.EndRecord();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment