Commit 03edd408 authored by ElenaSubbotina's avatar ElenaSubbotina

Pptx binary - write notes & master notes

parent 9ff87b3c
......@@ -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::StartNotes(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\">");
......
......@@ -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);
......
......@@ -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>();
......
This diff is collapsed.
......@@ -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
{
......
......@@ -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)
......
......@@ -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;
}
......
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