Commit bed88400 authored by ElenaSubbotina's avatar ElenaSubbotina

PptxFormat - slide sections

parent 1aa0b039
......@@ -415,11 +415,10 @@ namespace NSBinPptxRW
LONG lLayouts = (LONG)m_arSlideMasters_Theme[i].m_arLayouts.size();
for (LONG j = 0; j < lLayouts; ++j)
{
arrLays.push_back(PPTX::Logic::XmlId());
arrLays.push_back(PPTX::Logic::XmlId(L"p:sldLayoutId"));
std::wstring sId = std::to_wstring((_UINT64)(0x80000000 + __nCountLayouts + j + 1));
arrLays[j].m_name = _T("sldLayoutId");
arrLays[j].id = sId;
arrLays[j].rid = (size_t)(j + 1);
}
......@@ -755,11 +754,10 @@ namespace NSBinPptxRW
LONG nCountLayouts = 0;
for (LONG i = 0; i < nCountMasters; ++i)
{
m_oPresentation.sldMasterIdLst.push_back(PPTX::Logic::XmlId());
m_oPresentation.sldMasterIdLst.push_back(PPTX::Logic::XmlId(L"p:sldMasterId"));
std::wstring sId = std::to_wstring((_UINT64)(0x80000000 + nCountLayouts));
m_oPresentation.sldMasterIdLst[i].m_name = _T("sldMasterId");
m_oPresentation.sldMasterIdLst[i].id = sId;
m_oPresentation.sldMasterIdLst[i].rid = (size_t)(i + 1);
nCountLayouts += (LONG)(m_arSlideMasters_Theme[i].m_arLayouts.size() + 1);
......@@ -773,11 +771,10 @@ namespace NSBinPptxRW
m_oPresentation.sldIdLst.clear();
for (LONG i = 0; i < nCountSlides; ++i)
{
m_oPresentation.sldIdLst.push_back(PPTX::Logic::XmlId());
m_oPresentation.sldIdLst.push_back(PPTX::Logic::XmlId(L"p:sldId"));
std::wstring sId = std::to_wstring(256 + i);
m_oPresentation.sldIdLst[i].m_name = _T("sldId");
m_oPresentation.sldIdLst[i].id = sId;
m_oPresentation.sldIdLst[i].rid = (size_t)nCurrentRels;
++nCurrentRels;
......@@ -788,8 +785,8 @@ namespace NSBinPptxRW
m_oPresentation.notesMasterIdLst.clear();
if (bNotesMasterPresent)
{
m_oPresentation.notesMasterIdLst.push_back(PPTX::Logic::XmlId());
m_oPresentation.notesMasterIdLst[0].m_name = _T("notesMasterId");
m_oPresentation.notesMasterIdLst.push_back(PPTX::Logic::XmlId(L"p:notesMasterId"));
m_oPresentation.notesMasterIdLst[0].rid = (size_t)nCurrentRels;
++nCurrentRels;
}
......
......@@ -32,15 +32,15 @@
#ifndef PPTX_LOGIC_EXTP_PROPERTIES_INCLUDE_H_
#define PPTX_LOGIC_EXTP_PROPERTIES_INCLUDE_H_
#include "./../WrapperWritingElement.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/RId.h"
#include "../Presentation/SectionLst.h"
//--------------------------------------------------------------------------------------------------------------
//<p:ext uri="{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}">
//<p14:media xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" r:embed="rId2">
//<p14:trim st="93333.0816" end="96583.4816"/>
//</p14:media>
//</p:ext>
//--------------------------------------------------------------------------------------------------------------
//<ext uri="{05C60535-1F16-4fd2-B633-F4F36F0B64E0}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main">
// <x14:sparklineGroups xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">
// <x14:sparklineGroup displayEmptyCellsAs="gap">
......@@ -61,10 +61,33 @@
// </x14:sparklineGroup>
// </x14:sparklineGroups>
//</ext>
//--------------------------------------------------------------------------------------------------------------
//<a:ext uri="{63B3BB69-23CF-44E3-9099-C40C66FF867C}">
// <a14:compatExt spid="_x0000_s1025"/>
//</a:ext>
//--------------------------------------------------------------------------------------------------------------
// <p:ext uri="{521415D9-36F7-43E2-AB2F-B90AF26B5E84}">
// <p14:sectionLst xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main">
// <p14:section name="123" id="{775558AA-D529-4C59-9762-B6F3CDAC8092}">
// <p14:sldIdLst>
// <p14:sldId id="256"/>
// <p14:sldId id="257"/>
// </p14:sldIdLst>
// </p14:section>
// <p14:section name="qwerty" id="{296A3C58-7D47-4848-A546-3C86980BE927}">
// <p14:sldIdLst>
// <p14:sldId id="258"/>
// </p14:sldIdLst>
// </p14:section>
// <p14:section name="Раздел без заголовка" id="{DA908BF8-2A15-4E46-B49B-C1BB4B4AAF31}">
// <p14:sldIdLst/>
// </p14:section>
// </p14:sectionLst>
// </p:ext>
// <p:ext uri="{EFAFB233-063F-42B5-8137-9DF3F51BA10A}">
// <p15:sldGuideLst xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"/>
// </p:ext>
//</p:extLst>
namespace PPTX
{
......@@ -115,48 +138,61 @@ namespace PPTX
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("uri"), uri)
WritingElement_ReadAttributes_ReadSingle ( oReader, L"uri", uri)
WritingElement_ReadAttributes_End( oReader )
}
void ReadAttributes1(XmlUtils::CXmlLiteReader& oReader)
{
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_ReadSingle( oReader, _T("r:embed"), link)
WritingElement_ReadAttributes_ReadSingle( oReader, L"r:embed", link)
WritingElement_ReadAttributes_End( oReader )
}
void ReadAttributes2(XmlUtils::CXmlLiteReader& oReader)
{
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, _T("st"), st)
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("end"), end)
WritingElement_ReadAttributes_Read_if ( oReader, L"st", st)
WritingElement_ReadAttributes_Read_else_if ( oReader, L"end", end)
WritingElement_ReadAttributes_End( oReader )
}
void ReadAttributes3(XmlUtils::CXmlLiteReader& oReader)
{
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("spid"), spid)
WritingElement_ReadAttributes_Start( oReader );
WritingElement_ReadAttributes_ReadSingle ( oReader, L"spid", spid)
WritingElement_ReadAttributes_End( oReader )
}
virtual void fromXML(XmlUtils::CXmlNode& node)
{//todooo списком ..
XmlUtils::CXmlNode media = node.ReadNodeNoNS(_T("media"));
if (media.IsValid())
{
link = media.GetAttribute(_T("r:embed"));
XmlUtils::CXmlNodes oNodes;
if (node.GetNodes(L"*", oNodes))
{
int nCount = oNodes.GetCount();
for (int i = 0; i < nCount; ++i)
{
XmlUtils::CXmlNode oNode;
oNodes.GetAt(i, oNode);
std::wstring strName = XmlUtils::GetNameNoNS(oNode.GetName());
if (L"media" == strName)
{
link = oNode.GetAttribute(L"r:embed");
XmlUtils::CXmlNode trim = media.ReadNodeNoNS(_T("trim"));
XmlUtils::CXmlNode trim = oNode.ReadNodeNoNS(L"trim");
if (trim.IsValid())
{
trim.ReadAttributeBase(_T("st"), st);
trim.ReadAttributeBase(_T("end"), end);
trim.ReadAttributeBase(L"st", st);
trim.ReadAttributeBase(L"end", end);
}
return;
}
XmlUtils::CXmlNode compatExt = node.ReadNodeNoNS(_T("compatExt"));
if (compatExt.IsValid())
else if (L"compatExt" == strName)
{
spid = media.GetAttribute(_T("spid"));
return;
spid = oNode.GetAttribute(L"spid");
}
else if (L"sectionLst" == strName)
{
sectionLst = oNode;
}
}
}
}
......@@ -170,11 +206,11 @@ namespace PPTX
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
if (link.IsInit() && uri.IsInit())
if (link.IsInit())
{
pWriter->StartNode(L"p:ext");
pWriter->StartAttributes();
pWriter->WriteAttribute(L"uri", *uri);
pWriter->WriteAttribute(L"uri", std::wstring(L"{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}"));
pWriter->EndAttributes();
pWriter->StartNode(L"p14:media");
......@@ -185,6 +221,16 @@ namespace PPTX
pWriter->EndNode(L"p14:media");
pWriter->EndNode(L"p:ext");
}
if (sectionLst.IsInit())
{
pWriter->StartNode(L"p:ext");
pWriter->StartAttributes();
pWriter->WriteAttribute(L"uri", std::wstring(L"{521415D9-36F7-43E2-AB2F-B90AF26B5E84}"));
pWriter->EndAttributes();
sectionLst->toXmlWriter(pWriter);
pWriter->EndNode(L"p:ext");
}
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
......@@ -202,9 +248,10 @@ namespace PPTX
nullable<OOX::RId> link;
nullable_double st;
nullable_double end;
//compatExt
nullable_string spid;
nullable<nsPresentation::SectionLst> sectionLst;
//dataModelExt
//table
//sparklineGroups
......
......@@ -896,7 +896,6 @@ namespace PPTX
{
PPTX::Logic::Ext ext;
ext.link = OOX::RId(blipFill.blip->mediaRid);
ext.uri = L"{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}";
nvPicPr.nvPr.extLst.push_back(ext);
int nRId = -1;
......
......@@ -45,9 +45,14 @@ namespace PPTX
public:
PPTX_LOGIC_BASE(XmlId)
XmlId(std::wstring name)
{
m_name = name;
}
virtual void fromXML(XmlUtils::CXmlNode& node)
{
m_name = XmlUtils::GetNameNoNS(node.GetName());
m_name = node.GetName();
node.ReadAttributeBase(L"r:id", rid);
node.ReadAttributeBase(L"id", id);
}
......@@ -57,7 +62,7 @@ namespace PPTX
oAttr.Write(_T("r:id"), rid.ToString());
oAttr.Write(_T("id"), id);
return XmlUtils::CreateNode(_T("p:") + m_name, oAttr);
return XmlUtils::CreateNode(m_name, oAttr);
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
......@@ -69,17 +74,48 @@ namespace PPTX
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
}
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
{
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
pReader->Skip(1); // start attributes
while (true)
{
BYTE _at = pReader->GetUChar_TypeNode();
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
break;
switch (_at)
{
case 0:
id = pReader->GetString2();
break;
case 1:
rid = pReader->GetString2();
break;
default:
break;
}
}
pReader->Seek(_end_rec);
}
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
pWriter->StartNode(_T("p:") + m_name);
pWriter->StartNode( m_name );
pWriter->StartAttributes();
pWriter->WriteAttribute(_T("id"), id);
pWriter->WriteAttribute(_T("r:id"), rid.ToString());
std::wstring sRid = rid.ToString();
if (sRid.empty() == false)
{
pWriter->WriteAttribute(_T("r:id"), sRid);
}
pWriter->EndAttributes();
pWriter->EndNode(_T("p:") + m_name);
pWriter->EndNode( m_name );
}
nullable_string id;
......
......@@ -52,40 +52,42 @@ namespace PPTX
class Namespaces
{
public:
Namespaces() : a(L"a", L"http://schemas.openxmlformats.org/drawingml/2006/main"),
b(L"b", L"http://schemas.openxmlformats.org/officeDocument/2006/bibliography"),
cdr(L"cdr", L"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"),
cp(L"cp", L"http://schemas.openxmlformats.org/package/2006/metadata/core-properties"),
dc(L"dc", L"http://purl.org/dc/elements/1.1/"),
Namespaces() :
a (L"a", L"http://schemas.openxmlformats.org/drawingml/2006/main"),
b (L"b", L"http://schemas.openxmlformats.org/officeDocument/2006/bibliography"),
cdr (L"cdr", L"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"),
cp (L"cp", L"http://schemas.openxmlformats.org/package/2006/metadata/core-properties"),
dc (L"dc", L"http://purl.org/dc/elements/1.1/"),
dchrt(L"dchrt", L"http://schemas.openxmlformats.org/drawingml/2006/chart"),
dcmitype(L"dcmitype", L"http://purl.org/dc/dcmitype/"),
dcterms(L"dcterms", L"http://purl.org/dc/terms/"),
ddgrm(L"ddgrm", L"http://schemas.openxmlformats.org/drawingml/2006/diagram"),
dgm(L"dgm", L"http://schemas.openxmlformats.org/drawingml/2006/diagram"),
dgm (L"dgm", L"http://schemas.openxmlformats.org/drawingml/2006/diagram"),
dlckcnv(L"dlckcnv", L"http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"),
dpct(L"dpct", L"http://schemas.openxmlformats.org/drawingml/2006/picture"),
ds(L"ds", L"http://schemas.openxmlformats.org/officeDocument/2006/customXml"),
m(L"m", L"http://schemas.openxmlformats.org/officeDocument/2006/math"),
o(L"o", L"urn:schemas-microsoft-com:office:office"),
p(L"p", L"http://schemas.openxmlformats.org/presentationml/2006/main"),
pic(L"pic", L"http://schemas.openxmlformats.org/drawingml/2006/picture"),
ds (L"ds", L"http://schemas.openxmlformats.org/officeDocument/2006/customXml"),
m (L"m", L"http://schemas.openxmlformats.org/officeDocument/2006/math"),
o (L"o", L"urn:schemas-microsoft-com:office:office"),
p (L"p", L"http://schemas.openxmlformats.org/presentationml/2006/main"),
pic (L"pic", L"http://schemas.openxmlformats.org/drawingml/2006/picture"),
pvml(L"pvml", L"urn:schemas-microsoft-com:office:powerpoint"),
r(L"r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
s(L"s", L"http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"),
sl(L"sl", L"http://schemas.openxmlformats.org/schemaLibrary/2006/main"),
v(L"v", L"urn:schemas-microsoft-com:vml"),
ve(L"ve", L"http://schemas.openxmlformats.org/markup-compatibility/2006"),
vp(L"vp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
vt(L"vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"),
w(L"w", L"http://schemas.openxmlformats.org/wordprocessingml/2006/main"),
w10(L"w10", L"urn:schemas-microsoft-com:office:word"),
wne(L"wne", L"http://schemas.microsoft.com/office/word/2006/wordml"),
wp(L"wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
x(L"x", L"urn:schemas-microsoft-com:office:excel"),
xdr(L"xdr", L"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"),
r (L"r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
s (L"s", L"http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"),
sl (L"sl", L"http://schemas.openxmlformats.org/schemaLibrary/2006/main"),
v (L"v", L"urn:schemas-microsoft-com:vml"),
ve (L"ve", L"http://schemas.openxmlformats.org/markup-compatibility/2006"),
vp (L"vp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
vt (L"vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"),
w (L"w", L"http://schemas.openxmlformats.org/wordprocessingml/2006/main"),
w10 (L"w10", L"urn:schemas-microsoft-com:office:word"),
wne (L"wne", L"http://schemas.microsoft.com/office/word/2006/wordml"),
wp (L"wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
x (L"x", L"urn:schemas-microsoft-com:office:excel"),
xdr (L"xdr", L"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"),
xmlns(L"xmlns", L"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"),
xsd(L"xsd", L"http://www.w3.org/2001/XMLSchema"),
xsi(L"xsi", L"http://www.w3.org/2001/XMLSchema-instance")
xsd (L"xsd", L"http://www.w3.org/2001/XMLSchema"),
xsi (L"xsi", L"http://www.w3.org/2001/XMLSchema-instance"),
p14 (L"p14", L"http://schemas.microsoft.com/office/powerpoint/2010/main")
{
}
......@@ -124,6 +126,7 @@ namespace PPTX
const Namespace xmlns;
const Namespace xsd;
const Namespace xsi;
const Namespace p14;
};
static Namespaces g_Namespaces;
......
......@@ -37,19 +37,19 @@
#include "FileContainer.h"
#include "FileTypes.h"
#include "Limit/Conformance.h"
#include "Logic/TextListStyle.h"
#include "Logic/ClrMap.h"
#include "Theme/ClrScheme.h"
#include "Presentation/EmbeddedFont.h"
#include "Presentation/Kinsoku.h"
#include "Presentation/NotesSz.h"
#include "Presentation/PhotoAlbum.h"
#include "Logic/XmlId.h"
#include "Presentation/SldSz.h"
#include "CommentAuthors.h"
#include "Limit/Conformance.h"
#include "Logic/TextListStyle.h"
#include "Logic/ClrMap.h"
#include "Logic/ExtP.h"
#include "Theme/ClrScheme.h"
namespace PPTX
{
class Presentation : public WrapperFile, public PPTX::FileContainer
......@@ -87,7 +87,6 @@ namespace PPTX
oNode.ReadAttributeBase(L"showSpecialPlsOnTitleSld", attrShowSpecialPlsOnTitleSld);
oNode.ReadAttributeBase(L"strictFirstAndLastChars", attrStrictFirstAndLastChars);
//custDataLst (Customer Data List)
//custShowLst (List of Custom Shows)
defaultTextStyle = oNode.ReadNode(_T("p:defaultTextStyle"));
......@@ -100,8 +99,7 @@ namespace PPTX
{
oNodeEmbeddedFonts.LoadArray(_T("p:embeddedFont"), embeddedFontLst);
size_t count = embeddedFontLst.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < embeddedFontLst.size(); ++i)
embeddedFontLst[i].SetParentFilePointer(this);
}
......@@ -111,8 +109,7 @@ namespace PPTX
{
oNodeHMList.LoadArray(_T("p:handoutMasterId"), handoutMasterIdLst);
size_t count = handoutMasterIdLst.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < handoutMasterIdLst.size(); ++i)
handoutMasterIdLst[i].SetParentFilePointer(this);
}
......@@ -128,8 +125,7 @@ namespace PPTX
{
oNodeMIDList.LoadArray(_T("p:notesMasterId"), notesMasterIdLst);
size_t count = notesMasterIdLst.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < notesMasterIdLst.size(); ++i)
notesMasterIdLst[i].SetParentFilePointer(this);
}
......@@ -147,8 +143,7 @@ namespace PPTX
{
oNode_sldId.LoadArray(_T("p:sldId"), sldIdLst);
size_t count = sldIdLst.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < sldIdLst.size(); ++i)
sldIdLst[i].SetParentFilePointer(this);
}
......@@ -158,16 +153,36 @@ namespace PPTX
{
oNode_sldM_Id.LoadArray(_T("p:sldMasterId"), sldMasterIdLst);
size_t count = sldMasterIdLst.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < sldMasterIdLst.size(); ++i)
sldMasterIdLst[i].SetParentFilePointer(this);
}
sldSz = oNode.ReadNode(_T("p:sldSz"));
if (sldSz.is_init())
sldSz->SetParentFilePointer(this);
//smartTags (Smart Tags)
XmlUtils::CXmlNode list = oNode.ReadNodeNoNS(_T("extLst"));
if (list.IsValid())
{
XmlUtils::CXmlNodes oNodes;
if (list.GetNodes(_T("*"), oNodes))
{
int nCount = oNodes.GetCount();
for (int i = 0; i < nCount; ++i)
{
XmlUtils::CXmlNode oNode;
oNodes.GetAt(i, oNode);
PPTX::Logic::Ext ext;
ext.fromXML(oNode);
if (ext.sectionLst.IsInit())
{
sectionLst = ext.sectionLst;
}
}
}
}
//smartTags (Smart Tags)
Normalize();
}
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::CContentTypes& content)const
......@@ -205,6 +220,7 @@ namespace PPTX
pWriter->WriteRecord2(5, sldSz);
pWriter->WriteRecord2(6, commentAuthors);
pWriter->WriteRecord2(7, sectionLst);
pWriter->EndRecord();
}
......@@ -312,6 +328,12 @@ namespace PPTX
commentAuthors->fromPPTY(pReader);
break;
}
case 7:
{
sectionLst = new nsPresentation::SectionLst();
sectionLst->fromPPTY(pReader);
break;
}
default:
{
pReader->Seek(_end_pos);
......@@ -350,11 +372,11 @@ namespace PPTX
pWriter->EndAttributes();
pWriter->WriteArray(_T("p:sldMasterIdLst"), sldMasterIdLst);
pWriter->WriteArray(_T("p:notesMasterIdLst"), notesMasterIdLst);
pWriter->WriteArray(_T("p:handoutMasterIdLst"), handoutMasterIdLst);
pWriter->WriteArray(_T("p:embeddedFontLst"), embeddedFontLst);
pWriter->WriteArray(_T("p:sldIdLst"), sldIdLst);
pWriter->WriteArray(L"p:sldMasterIdLst", sldMasterIdLst);
pWriter->WriteArray(L"p:notesMasterIdLst", notesMasterIdLst);
pWriter->WriteArray(L"p:handoutMasterIdLst", handoutMasterIdLst);
pWriter->WriteArray(L"p:embeddedFontLst", embeddedFontLst);
pWriter->WriteArray(L"p:sldIdLst", sldIdLst);
pWriter->Write(sldSz);
pWriter->Write(notesSz);
......@@ -362,7 +384,17 @@ namespace PPTX
pWriter->Write(kinsoku);
pWriter->Write(defaultTextStyle);
pWriter->EndNode(_T("p:presentation"));
std::vector<Logic::Ext> extLst;
if (sectionLst.IsInit())
{
Logic::Ext exp;
exp.sectionLst = sectionLst;
extLst.push_back(exp);
}
pWriter->WriteArray(L"p:extLst", extLst);
pWriter->EndNode(L"p:presentation");
}
public:
......@@ -394,6 +426,7 @@ namespace PPTX
std::vector<Logic::XmlId> sldIdLst;
std::vector<Logic::XmlId> sldMasterIdLst;
nullable<nsPresentation::SldSz> sldSz;
nullable<nsPresentation::SectionLst> sectionLst;
//smartTags (Smart Tags)
// Attrs
......
......@@ -2987,6 +2987,10 @@
RelativePath="..\.\PPTXFormat\Presentation.h"
>
</File>
<File
RelativePath="..\PPTXFormat\Presentation\SectionLst.h"
>
</File>
<File
RelativePath="..\.\PPTXFormat\Presentation\SldSz.h"
>
......
......@@ -44,9 +44,11 @@ namespace OOX
public:
RId() : m_id(0)
{
bNumber = false;
}
RId(const size_t id) : m_id(id)
{
bNumber = true;
}
RId(const std::wstring& rid)
{
......@@ -68,11 +70,13 @@ namespace OOX
{
std::wstring strParam = rid.substr(nFindStringLength);
m_id = XmlUtils::GetUInteger(strParam);
bNumber = true;
}
else
{
m_id = 0;
m_sId = rid;
bNumber = false;
}
return *this;
......@@ -82,6 +86,7 @@ namespace OOX
{
m_id = oSrc.m_id;
m_sId = oSrc.m_sId;
bNumber = oSrc.bNumber;
return *this;
}
......@@ -118,6 +123,7 @@ namespace OOX
const RId next() const
{
bNumber = true;
return RId(m_id + 1);
}
......@@ -125,8 +131,10 @@ namespace OOX
{
if(!m_sId.empty())
return m_sId;
else
else if (bNumber)
return _T("rId") + std::to_wstring((unsigned int)m_id);
else
return L"";
}
template<typename T>
void toPPTY(BYTE type, T pWriter) const
......@@ -137,6 +145,7 @@ namespace OOX
private:
size_t m_id;
std::wstring m_sId;
mutable bool bNumber;
};
} // namespace OOX
......
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