mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
handout binary
This commit is contained in:
@ -91,7 +91,9 @@ namespace NSBinPptxRW
|
||||
SlideNotesRels = 45,
|
||||
NotesRels = 46,
|
||||
NotesMastersRels= 47,
|
||||
CustomProperties= 48
|
||||
CustomProperties= 48,
|
||||
HandoutMastersRels = 49
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1581,6 +1581,16 @@ namespace NSBinPptxRW
|
||||
std::to_wstring(nIndexTheme + 1) + L".xml\"/>";
|
||||
m_pWriter->WriteString(s);
|
||||
}
|
||||
void CRelsGenerator::StartThemeHandoutMaster(int nIndexTheme)
|
||||
{
|
||||
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\">");
|
||||
|
||||
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::StartLayout(int nIndexTheme)
|
||||
{
|
||||
m_pWriter->WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
@ -1653,13 +1663,18 @@ namespace NSBinPptxRW
|
||||
|
||||
return rid;
|
||||
}
|
||||
|
||||
void CRelsGenerator::WriteNotesMaster()
|
||||
{
|
||||
std::wstring strRels0 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
|
||||
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster\" Target=\"notesMasters/notesMaster1.xml\"/>";
|
||||
m_pWriter->WriteString(strRels0);
|
||||
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster\" Target=\"notesMasters/notesMaster1.xml\"/>";
|
||||
m_pWriter->WriteString(strRels0);
|
||||
}
|
||||
void CRelsGenerator::WriteHandoutMaster()
|
||||
{
|
||||
std::wstring strRels0 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
|
||||
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster\" Target=\"handoutMasters/handoutMaster1.xml\"/>";
|
||||
m_pWriter->WriteString(strRels0);
|
||||
}
|
||||
std::wstring CRelsGenerator::WriteCustom(const std::wstring & file_name)
|
||||
{
|
||||
std::wstring rid = L"rId" + std::to_wstring(m_lNextRelsID++);
|
||||
|
||||
@ -162,12 +162,14 @@ namespace NSBinPptxRW
|
||||
std::map<size_t, LONG> layouts;
|
||||
std::map<size_t, LONG> notes;
|
||||
std::map<size_t, LONG> notesMasters;
|
||||
std::map<size_t, LONG> handoutMasters;
|
||||
|
||||
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;
|
||||
std::vector<LONG> m_oNotesMasters_Rels;
|
||||
std::vector<LONG> m_oHandoutMasters_Rels;
|
||||
|
||||
NSShapeImageGen::CMediaManager* m_pMediaManager;
|
||||
|
||||
@ -488,10 +490,13 @@ namespace NSBinPptxRW
|
||||
void StartLayout (int nIndexTheme);
|
||||
void StartSlide (int nIndexSlide, int nIndexLayout, int nIndexNotes);
|
||||
void StartNotes (int nIndexSlide);
|
||||
void StartThemeNotesMaster(int nIndexTheme);
|
||||
|
||||
|
||||
void WriteThemes (int nCount);
|
||||
void WriteNotesMaster();
|
||||
void WriteHandoutMaster();
|
||||
|
||||
void StartThemeNotesMaster(int nIndexTheme);
|
||||
void StartThemeHandoutMaster(int nIndexTheme);
|
||||
|
||||
std::wstring WriteCustom(const std::wstring& file_name);
|
||||
std::wstring WriteMaster(int nIndex);
|
||||
|
||||
@ -33,12 +33,12 @@
|
||||
#include "Converter.h"
|
||||
#include "../../PPTXFormat/Presentation/PresentationChildElements.h"
|
||||
#include "../../PPTXFormat/NotesSlide.h"
|
||||
#include "../../PPTXFormat/HandoutMaster.h"
|
||||
|
||||
namespace PPTX2EditorAdvanced
|
||||
{
|
||||
DWORD Convert(NSBinPptxRW::CBinaryFileWriter& oBinaryWriter, PPTX::Document& oFolder, const std::wstring& strSourceDirectory, const std::wstring& strDstFile, bool bIsNoBase64)
|
||||
{
|
||||
// сначала соберем все объекты для конвертации и сформируем main-таблицы
|
||||
NSBinPptxRW::CCommonWriter* pCommon = oBinaryWriter.m_pCommon;
|
||||
|
||||
std::vector<smart_ptr<PPTX::Theme>> _themes;
|
||||
@ -47,6 +47,7 @@ namespace PPTX2EditorAdvanced
|
||||
std::vector<smart_ptr<PPTX::SlideLayout>> _layouts;
|
||||
std::vector<smart_ptr<PPTX::NotesSlide>> _notes;
|
||||
std::vector<smart_ptr<PPTX::NotesMaster>> _notesMasters;
|
||||
std::vector<smart_ptr<PPTX::HandoutMaster>> _handoutMasters;
|
||||
|
||||
smart_ptr<PPTX::Presentation> presentation = oFolder.Get(OOX::Presentation::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
|
||||
@ -55,7 +56,6 @@ namespace PPTX2EditorAdvanced
|
||||
int cy = presentation->sldSz->cy;
|
||||
#endif
|
||||
|
||||
// записываем все темы
|
||||
size_t nCountMasters = presentation->sldMasterIdLst.size();
|
||||
for (size_t nMaster = 0; nMaster < nCountMasters; ++nMaster)
|
||||
{
|
||||
@ -167,6 +167,47 @@ namespace PPTX2EditorAdvanced
|
||||
oBinaryWriter.m_pCommon->m_oNotesMasters_Rels.push_back(nNotesMastersRelsIndex);
|
||||
}
|
||||
|
||||
// записываем все handoutMasters
|
||||
size_t nCountHandoutMasters = presentation->handoutMasterIdLst.size();
|
||||
for (size_t nHandout = 0; nHandout < nCountHandoutMasters; ++nHandout)
|
||||
{
|
||||
smart_ptr<PPTX::HandoutMaster> handoutMaster = ((*presentation)[presentation->handoutMasterIdLst[nHandout].rid.get()]).smart_dynamic_cast<PPTX::HandoutMaster>();
|
||||
if (false == handoutMaster.IsInit())
|
||||
{
|
||||
// такого быть не должно
|
||||
continue;
|
||||
}
|
||||
size_t pPointerNM = (size_t)(handoutMaster.operator ->());
|
||||
|
||||
std::map<size_t, LONG>::const_iterator pSearchNM = pCommon->handoutMasters.find(pPointerNM);
|
||||
if (pSearchNM != pCommon->handoutMasters.end())
|
||||
{
|
||||
// такого быть не должно
|
||||
continue;
|
||||
}
|
||||
|
||||
// записываем mainMaster
|
||||
LONG lCountNM = (LONG)_handoutMasters.size();
|
||||
pCommon->handoutMasters[pPointerNM] = lCountNM;
|
||||
_handoutMasters.push_back(handoutMaster);
|
||||
|
||||
// проверяем theme
|
||||
size_t pPointerTh = (size_t)(handoutMaster->theme_.operator ->());
|
||||
LONG nHandoutMastersRelsIndex = -1;
|
||||
std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find(pPointerTh);
|
||||
if (pSearchTh == pCommon->themes.end())
|
||||
{
|
||||
LONG lCountTh = (LONG)_themes.size();
|
||||
pCommon->themes[pPointerTh] = lCountTh;
|
||||
_themes.push_back(handoutMaster->theme_);
|
||||
nHandoutMastersRelsIndex = lCountTh;
|
||||
}
|
||||
else {
|
||||
nHandoutMastersRelsIndex = pSearchTh->second;
|
||||
}
|
||||
oBinaryWriter.m_pCommon->m_oHandoutMasters_Rels.push_back(nHandoutMastersRelsIndex);
|
||||
}
|
||||
|
||||
// записываем все слайды
|
||||
for (size_t i = 0; i < presentation->sldIdLst.size(); ++i)
|
||||
{
|
||||
@ -407,6 +448,14 @@ namespace PPTX2EditorAdvanced
|
||||
{
|
||||
_notesMasters[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
// handoutmasters
|
||||
oBinaryWriter.StartMainRecord(NSBinPptxRW::NSMainTables::HandoutMasters);
|
||||
ULONG nCountHM = (ULONG)_handoutMasters.size();
|
||||
oBinaryWriter.WriteULONG(nCountHM);
|
||||
for (ULONG i = 0; i < nCountHM; ++i)
|
||||
{
|
||||
_handoutMasters[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
// ImageMap ---------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSBinPptxRW::NSMainTables::ImageMap);
|
||||
oBinaryWriter.StartRecord(NSBinPptxRW::NSMainTables::ImageMap);
|
||||
@ -529,13 +578,25 @@ namespace PPTX2EditorAdvanced
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
oBinaryWriter.EndRecord();
|
||||
// HandoutMastersRels --------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSBinPptxRW::NSMainTables::HandoutMastersRels);
|
||||
oBinaryWriter.StartRecord(NSBinPptxRW::NSMainTables::HandoutMastersRels);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
_s_rels = oBinaryWriter.m_pCommon->m_oHandoutMasters_Rels.size();
|
||||
for (size_t i = 0; i < _s_rels; ++i)
|
||||
{
|
||||
oBinaryWriter.WriteInt1(0, oBinaryWriter.m_pCommon->m_oHandoutMasters_Rels[i]);
|
||||
}
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
oBinaryWriter.EndRecord();
|
||||
|
||||
oBinaryWriter.EndRecord();
|
||||
// ------------------------------------------------
|
||||
oBinaryWriter.WriteEmbeddedFonts();
|
||||
oBinaryWriter.WriteMainPart(nStartPos);
|
||||
|
||||
// все записалось нормально. осталось скинуть на диск
|
||||
BYTE* pbBinBuffer = oBinaryWriter.GetBuffer();
|
||||
int nBinBufferLen = (int)oBinaryWriter.GetPosition();
|
||||
if (bIsNoBase64)
|
||||
|
||||
@ -39,9 +39,9 @@ namespace Writers
|
||||
}
|
||||
void DefaultNotesMasterWriter::Write(std::wstring fileName)
|
||||
{
|
||||
std::wstring s_Common = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
std::wstring s_Common = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
|
||||
|
||||
s_Common += _T("<p:notesMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">\
|
||||
s_Common += L"<p:notesMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">\
|
||||
<p:cSld>\
|
||||
<p:bg>\
|
||||
<p:bgPr>\
|
||||
@ -224,7 +224,54 @@ namespace Writers
|
||||
</a:defRPr>\
|
||||
</a:lvl9pPr>\
|
||||
</p:notesStyle>\
|
||||
</p:notesMaster>");
|
||||
</p:notesMaster>";
|
||||
|
||||
OOX::CPath pathFile = fileName;
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFile(pathFile.GetPath());
|
||||
oFile.WriteStringUTF8(s_Common);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
DefaultHandoutMasterWriter::DefaultHandoutMasterWriter()
|
||||
{
|
||||
}
|
||||
void DefaultHandoutMasterWriter::Write(std::wstring fileName)
|
||||
{
|
||||
std::wstring s_Common = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
|
||||
|
||||
s_Common += L"<p:handoutMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
|
||||
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
|
||||
xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">\
|
||||
<p:cSld><p:bg><p:bgRef idx=\"1001\"><a:schemeClr val=\"bg1\"/></p:bgRef></p:bg><p:spTree><p:nvGrpSpPr><p:cNvPr id=\"1\" name=""/>\
|
||||
<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/><a:chOff x=\"0\" y=\"0\"/><a:chExt cx=\"0\" cy=\"0\"/>\
|
||||
</a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id=\"2\" name=\"Header Placeholder 1\"><a:extLst><a:ext uri=\"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\">\
|
||||
<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{F67C4017-3E03-D994-D007-4D4D5EBE9CE9}\"/></a:ext></a:extLst>\
|
||||
</p:cNvPr><p:cNvSpPr><a:spLocks noGrp=\"1\"/></p:cNvSpPr><p:nvPr><p:ph type=\"hdr\" sz=\"quarter\"/></p:nvPr></p:nvSpPr><p:spPr>\
|
||||
<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"2971800\" cy=\"458788\"/></a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></p:spPr>\
|
||||
<p:txBody><a:bodyPr vert=\"horz\" lIns=\"91440\" tIns=\"45720\" rIns=\"91440\" bIns=\"45720\" rtlCol=\"0\"/><a:lstStyle><a:lvl1pPr algn=\"l\"><a:defRPr sz=\"1200\"/>\
|
||||
</a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id=\"3\" name=\"Date Placeholder 2\">\
|
||||
<a:extLst><a:ext uri=\"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\"><a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" \
|
||||
id=\"{749FF9CD-FA8A-BCBD-7746-C502D224F9D4}\"/></a:ext></a:extLst></p:cNvPr><p:cNvSpPr><a:spLocks noGrp=\"1\"/></p:cNvSpPr><p:nvPr><p:ph type=\"dt\" sz=\"quarter\" \
|
||||
idx=\"1\"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x=\"3884613\" y=\"0\"/><a:ext cx=\"2971800\" cy=\"458788\"/></a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/>\
|
||||
</a:prstGeom></p:spPr><p:txBody><a:bodyPr vert=\"horz\" lIns=\"91440\" tIns=\"45720\" rIns=\"91440\" bIns=\"45720\" rtlCol=\"0\"/><a:lstStyle><a:lvl1pPr algn=\"r\">\
|
||||
<a:defRPr sz=\"1200\"/></a:lvl1pPr></a:lstStyle><a:p><a:fld id=\"{DBDFD766-57CE-4B91-8DD2-37F0838B984D}\" type=\"datetimeFigureOut\"><a:rPr smtClean=\"0\"/>\
|
||||
<a:t></a:t></a:fld><a:endParaRPr/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id=\"4\" name=\"Footer Placeholder 3\"><a:extLst>\
|
||||
<a:ext uri=\"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\"><a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" \
|
||||
id=\"{942A17DF-8C78-FA66-4CE3-783B1C5D3A5A}\"/></a:ext></a:extLst></p:cNvPr><p:cNvSpPr><a:spLocks noGrp=\"1\"/></p:cNvSpPr><p:nvPr>\
|
||||
<p:ph type=\"ftr\" sz=\"quarter\" idx=\"2\"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x=\"0\" y=\"8685213\"/><a:ext cx=\"2971800\" cy=\"458787\"/>\
|
||||
</a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert=\"horz\" lIns=\"91440\" tIns=\"45720\" rIns=\"91440\" bIns=\"45720\" rtlCol=\"0\" \
|
||||
anchor=\"b\"/><a:lstStyle><a:lvl1pPr algn=\"l\"><a:defRPr sz=\"1200\"/></a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr>\
|
||||
<p:cNvPr id=\"5\" name=\"Slide Number Placeholder 4\"><a:extLst><a:ext uri=\"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\">\
|
||||
<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{54E6FC8D-4D60-9D7A-1320-C69919607B49}\"/></a:ext></a:extLst>\
|
||||
</p:cNvPr><p:cNvSpPr><a:spLocks noGrp=\"1\"/></p:cNvSpPr><p:nvPr><p:ph type=\"sldNum\" sz=\"quarter\" idx=\"3\"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm>\
|
||||
<a:off x=\"3884613\" y=\"8685213\"/><a:ext cx=\"2971800\" cy=\"458787\"/></a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></p:spPr><p:txBody>\
|
||||
<a:bodyPr vert=\"horz\" lIns=\"91440\" tIns=\"45720\" rIns=\"91440\" bIns=\"45720\" rtlCol=\"0\" anchor=\"b\"/><a:lstStyle><a:lvl1pPr algn=\"r\"><a:defRPr sz=\"1200\"/>\
|
||||
</a:lvl1pPr></a:lstStyle><a:p><a:fld id=\"{D7F4AEF4-93E6-4B70-916A-B30E3EBEE0F3}\" type=\"slidenum\"><a:rPr smtClean=\"0\"/><a:t><3E>#<23></a:t></a:fld><a:endParaRPr/>\
|
||||
</a:p></p:txBody></p:sp></p:spTree><p:extLst><p:ext uri=\"{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}\">\
|
||||
<p14:creationId xmlns:p14=\"http://schemas.microsoft.com/office/powerpoint/2010/main\" val=\"2429687043\"/></p:ext></p:extLst></p:cSld>\
|
||||
<p:clrMap bg1=\"lt1\" tx1=\"dk1\" bg2=\"lt2\" tx2=\"dk2\" accent1=\"accent1\" accent2=\"accent2\" accent3=\"accent3\" accent4=\"accent4\" accent5=\"accent5\" accent6=\"accent6\" \
|
||||
hlink=\"hlink\" folHlink=\"folHlink\"/></p:handoutMaster>";
|
||||
|
||||
OOX::CPath pathFile = fileName;
|
||||
|
||||
|
||||
@ -42,5 +42,11 @@ namespace Writers
|
||||
DefaultNotesMasterWriter();
|
||||
void Write(std::wstring fileName);
|
||||
};
|
||||
class DefaultHandoutMasterWriter
|
||||
{
|
||||
public:
|
||||
DefaultHandoutMasterWriter();
|
||||
void Write(std::wstring fileName);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -66,8 +66,8 @@ namespace NSBinPptxRW
|
||||
{
|
||||
m_strDstFolder = strFolder;
|
||||
|
||||
OOX::CPath pathPPT = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt");
|
||||
OOX::CPath pathDocProps = m_strDstFolder + FILE_SEPARATOR_STR + _T("docProps");
|
||||
OOX::CPath pathPPT = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt";
|
||||
OOX::CPath pathDocProps = m_strDstFolder + FILE_SEPARATOR_STR + L"docProps";
|
||||
|
||||
NSDirectory::CreateDirectory(m_strDstFolder);
|
||||
NSDirectory::CreateDirectory(pathDocProps.GetPath());
|
||||
@ -77,19 +77,19 @@ namespace NSBinPptxRW
|
||||
|
||||
m_oImageManager.SetDstFolder(pathPPT.GetPath());
|
||||
|
||||
OOX::CPath pathMedia = pathPPT / _T("media");
|
||||
OOX::CPath pathMedia = pathPPT / L"media";
|
||||
m_oImageManager.SetDstMedia(pathMedia.GetPath());
|
||||
NSDirectory::CreateDirectory(pathMedia.GetPath());
|
||||
|
||||
OOX::CPath pathCharts = pathPPT / _T("charts");
|
||||
OOX::CPath pathCharts = pathPPT / L"charts";
|
||||
m_oImageManager.SetDstCharts(pathCharts.GetPath());
|
||||
|
||||
OOX::CPath pathEmbeddings = pathPPT / _T("embeddings");
|
||||
OOX::CPath pathEmbeddings = pathPPT / L"embeddings";
|
||||
m_oImageManager.SetDstEmbed(pathEmbeddings.GetPath());
|
||||
|
||||
m_oReader.m_pRels->m_pManager = &m_oImageManager;
|
||||
|
||||
OOX::CPath pathTheme = pathPPT / _T("theme");
|
||||
OOX::CPath pathTheme = pathPPT / L"theme";
|
||||
NSDirectory::CreateDirectory(pathTheme.GetPath());
|
||||
|
||||
m_oReader.m_strFolderThemes = pathTheme.GetPath();
|
||||
@ -186,6 +186,7 @@ namespace NSBinPptxRW
|
||||
LONG nCountLayouts = 0;
|
||||
LONG nCountSlides = 0;
|
||||
bool bNotesMasterPresent = false;
|
||||
bool bHandoutMasterPresent = false;
|
||||
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::Themes);
|
||||
if (m_mainTables.end() != pPair)
|
||||
@ -317,6 +318,23 @@ namespace NSBinPptxRW
|
||||
m_arNotesMasters_Theme.push_back(m_oReader.GetULong());
|
||||
}
|
||||
}
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::HandoutMastersRels);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
m_oReader.Skip(6); // type + len + start attr
|
||||
|
||||
size_t index = 0;
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = m_oReader.GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
m_arHandoutMasters_Theme.push_back(m_oReader.GetULong());
|
||||
}
|
||||
}
|
||||
|
||||
// теперь нужно удалить все themes, которые не ведут на мастерслайды
|
||||
std::vector<LONG> arThemes;
|
||||
std::vector<LONG> arThemesDst;
|
||||
@ -336,7 +354,6 @@ namespace NSBinPptxRW
|
||||
arThemesSave[ind] = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_arNotesMasters_Theme.size(); i++)
|
||||
{
|
||||
int index = m_arNotesMasters_Theme[i];
|
||||
@ -345,6 +362,14 @@ namespace NSBinPptxRW
|
||||
arThemesSave[index] = true;
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; i < m_arHandoutMasters_Theme.size(); i++)
|
||||
{
|
||||
int index = m_arHandoutMasters_Theme[i];
|
||||
if (index >= 0 && index < (int)arThemesSave.size())
|
||||
{
|
||||
arThemesSave[index] = true;
|
||||
}
|
||||
}
|
||||
LONG lCurrectTheme = 0;
|
||||
for (LONG i = 0; i < nCountMasters && i < arThemesSave.size(); ++i)
|
||||
{
|
||||
@ -363,7 +388,7 @@ namespace NSBinPptxRW
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_oReader.m_strFolderThemes;
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -402,7 +427,7 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
@ -410,8 +435,8 @@ namespace NSBinPptxRW
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::SlideMasters);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slideMasters");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"slideMasters";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -459,7 +484,7 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
@ -467,8 +492,8 @@ namespace NSBinPptxRW
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::SlideLayouts);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slideLayouts");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"slideLayouts";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -501,7 +526,7 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
@ -514,8 +539,8 @@ namespace NSBinPptxRW
|
||||
|
||||
if (lCount > 0)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("notesSlides");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"notesSlides";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -555,7 +580,7 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strNotesXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strNotesXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strNotesXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
@ -569,8 +594,8 @@ namespace NSBinPptxRW
|
||||
|
||||
if (lCount > 0 || m_arNotesSlides.size() > 0)//один элемент
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("notesMasters");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"notesMasters";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -579,7 +604,7 @@ namespace NSBinPptxRW
|
||||
m_arNotesMasters.push_back(elm);
|
||||
|
||||
m_oReader.m_pRels->Clear();
|
||||
m_oReader.m_pRels->StartThemeNotesMaster((int)m_arSlideMasters_Theme.size());
|
||||
m_oReader.m_pRels->StartThemeNotesMaster(m_arNotesMasters_Theme[0]);
|
||||
|
||||
bNotesMasterPresent = true;
|
||||
if (lCount > 0)
|
||||
@ -601,22 +626,73 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterNotesXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterNotesXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterNotesXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDefaultNotesMasters((int)m_arSlideMasters_Theme.size());
|
||||
CreateDefaultNotesMasters(m_arNotesMasters_Theme[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// handoutMasters
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::HandoutMasters);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
m_oReader.Seek(pPair->second);
|
||||
LONG lCount = m_oReader.GetLong();
|
||||
|
||||
if (lCount > 0)
|
||||
{
|
||||
bHandoutMasterPresent = true;
|
||||
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"handoutMasters";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
|
||||
PPTX::HandoutMaster elm(&m_oDocument);
|
||||
m_arHandoutMasters.push_back(elm);
|
||||
|
||||
m_oReader.m_pRels->Clear();
|
||||
m_oReader.m_pRels->StartThemeHandoutMaster(m_arHandoutMasters_Theme[0]);
|
||||
|
||||
if (lCount > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_arHandoutMasters.back().fromPPTY(&m_oReader);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
m_oReader.m_pRels->CloseRels();
|
||||
|
||||
std::wstring strMasterHandoutXml = L"handoutMaster1.xml";
|
||||
oXmlWriter.ClearNoAttack();
|
||||
|
||||
m_arHandoutMasters.back().toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterHandoutXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterHandoutXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDefaultHandoutMasters(m_arHandoutMasters_Theme[0]);
|
||||
}
|
||||
}
|
||||
// slides
|
||||
int nComment = 1;
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::Slides);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slides");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"slides";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -642,7 +718,7 @@ namespace NSBinPptxRW
|
||||
|
||||
if (m_arSlides[i].comments.is_init())
|
||||
{
|
||||
OOX::CPath pathFolderCommentDir = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("comments");
|
||||
OOX::CPath pathFolderCommentDir = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"comments";
|
||||
if (1 == nComment)
|
||||
{
|
||||
NSDirectory::CreateDirectory(pathFolderCommentDir.GetPath());
|
||||
@ -679,7 +755,7 @@ namespace NSBinPptxRW
|
||||
OOX::CPath pathFile = pathFolder + FILE_SEPARATOR_STR + strMasterXml;
|
||||
oXmlWriter.SaveToFile(pathFile.GetPath());
|
||||
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + _T(".rels");
|
||||
OOX::CPath pathFileRels = pathFolderRels + FILE_SEPARATOR_STR + strMasterXml + L".rels";
|
||||
m_oReader.m_pRels->SaveRels(pathFileRels.GetPath());
|
||||
}
|
||||
}
|
||||
@ -770,28 +846,28 @@ namespace NSBinPptxRW
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oApp.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathApp = m_strDstFolder + FILE_SEPARATOR_STR + _T("docProps") + FILE_SEPARATOR_STR + _T("app.xml");
|
||||
OOX::CPath pathApp = m_strDstFolder + FILE_SEPARATOR_STR + L"docProps" + FILE_SEPARATOR_STR + L"app.xml";
|
||||
oXmlWriter.SaveToFile(pathApp.GetPath());
|
||||
|
||||
// core
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oCore.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathCore = m_strDstFolder + FILE_SEPARATOR_STR + _T("docProps") + FILE_SEPARATOR_STR + _T("core.xml");
|
||||
OOX::CPath pathCore = m_strDstFolder + FILE_SEPARATOR_STR + L"docProps" + FILE_SEPARATOR_STR + L"core.xml";
|
||||
oXmlWriter.SaveToFile(pathCore.GetPath());
|
||||
|
||||
// presProps
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oPresProps.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathPresProps = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("presProps.xml");
|
||||
OOX::CPath pathPresProps = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"presProps.xml";
|
||||
oXmlWriter.SaveToFile(pathPresProps.GetPath());
|
||||
|
||||
// viewProps
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oViewProps.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathViewProps = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("viewProps.xml");
|
||||
OOX::CPath pathViewProps = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"viewProps.xml";
|
||||
oXmlWriter.SaveToFile(pathViewProps.GetPath());
|
||||
|
||||
m_oReader.m_pRels->Clear();
|
||||
@ -816,15 +892,15 @@ namespace NSBinPptxRW
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oCustomProperties->toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathCore = m_strDstFolder + FILE_SEPARATOR_STR + _T("docProps") + FILE_SEPARATOR_STR + OOX::FileTypes::CustomProperties.DefaultFileName().GetPath();
|
||||
OOX::CPath pathCore = m_strDstFolder + FILE_SEPARATOR_STR + L"docProps" + FILE_SEPARATOR_STR + OOX::FileTypes::CustomProperties.DefaultFileName().GetPath();
|
||||
oXmlWriter.SaveToFile(pathCore.GetPath());
|
||||
}
|
||||
// customs
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::Customs);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("customXml");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"customXml";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolder.GetPath());
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
@ -849,15 +925,15 @@ namespace NSBinPptxRW
|
||||
oXmlWriter.ClearNoAttack();
|
||||
m_oTableStyles.toXmlWriter(&oXmlWriter);
|
||||
|
||||
OOX::CPath pathTableStyles = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("tableStyles.xml");
|
||||
OOX::CPath pathTableStyles = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"tableStyles.xml";
|
||||
oXmlWriter.SaveToFile(pathTableStyles.GetPath());
|
||||
|
||||
// presentation
|
||||
pPair = m_mainTables.find(NSBinPptxRW::NSMainTables::Presentation);
|
||||
if (m_mainTables.end() != pPair)
|
||||
{
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt");
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt";
|
||||
OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
|
||||
NSDirectory::CreateDirectory(pathFolderRels.GetPath());
|
||||
|
||||
@ -904,9 +980,16 @@ namespace NSBinPptxRW
|
||||
m_oPresentation.notesMasterIdLst[0].rid = m_oReader.m_pRels->m_lNextRelsID;
|
||||
m_oReader.m_pRels->WriteNotesMaster();
|
||||
}
|
||||
if (bHandoutMasterPresent)
|
||||
{
|
||||
m_oPresentation.handoutMasterIdLst.push_back(PPTX::Logic::XmlId(L"p:handoutMasterId"));
|
||||
|
||||
m_oPresentation.handoutMasterIdLst[0].rid = m_oReader.m_pRels->m_lNextRelsID;
|
||||
m_oReader.m_pRels->WriteHandoutMaster();
|
||||
}
|
||||
if (m_oPresentation.comments.is_init())
|
||||
{
|
||||
OOX::CPath pathFolderCommentDir = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("comments");
|
||||
OOX::CPath pathFolderCommentDir = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"comments";
|
||||
if (1 == nComment)
|
||||
{
|
||||
NSDirectory::CreateDirectory(pathFolderCommentDir.GetPath());
|
||||
@ -989,7 +1072,11 @@ namespace NSBinPptxRW
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml", L"/ppt/notesMasters", L"notesMaster1.xml");
|
||||
}
|
||||
|
||||
// handout master
|
||||
if (!m_arHandoutMasters.empty())
|
||||
{
|
||||
pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml", L"/ppt/handoutMasters", L"handoutMaster1.xml");
|
||||
}
|
||||
// masters
|
||||
for (LONG i = 0; i < nCountMasters; ++i)
|
||||
{
|
||||
@ -1017,21 +1104,21 @@ namespace NSBinPptxRW
|
||||
pContentTypes->Write(m_strDstFolder);
|
||||
|
||||
|
||||
std::wstring strRELS = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
std::wstring strRELS = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\
|
||||
<Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\
|
||||
<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"ppt/presentation.xml\"/>\
|
||||
<Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>");
|
||||
<Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>";
|
||||
if (m_oCustomProperties.IsInit())
|
||||
{
|
||||
strRELS += L"<Relationship Id=\"rId4\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties\" Target=\"docProps/custom.xml\"/>";
|
||||
}
|
||||
strRELS += L"</Relationships>";
|
||||
|
||||
OOX::CPath filePathRels = m_strDstFolder + FILE_SEPARATOR_STR + _T("_rels");
|
||||
OOX::CPath filePathRels = m_strDstFolder + FILE_SEPARATOR_STR + L"_rels";
|
||||
NSDirectory::CreateDirectory(filePathRels.GetPath());
|
||||
|
||||
filePathRels = filePathRels + FILE_SEPARATOR_STR + _T(".rels");
|
||||
filePathRels = filePathRels + FILE_SEPARATOR_STR + L".rels";
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(filePathRels.GetPath());
|
||||
@ -1131,16 +1218,16 @@ namespace NSBinPptxRW
|
||||
int nCountSlides = (int)m_arSlides.size();
|
||||
|
||||
m_oApp.HeadingPairs.push_back(PPTX::Logic::HeadingVariant());
|
||||
m_oApp.HeadingPairs[0].m_type = _T("lpstr");
|
||||
m_oApp.HeadingPairs[0].m_strContent = _T("Theme");
|
||||
m_oApp.HeadingPairs[0].m_type = L"lpstr";
|
||||
m_oApp.HeadingPairs[0].m_strContent = L"Theme";
|
||||
m_oApp.HeadingPairs.push_back(PPTX::Logic::HeadingVariant());
|
||||
m_oApp.HeadingPairs[1].m_type = _T("i4");
|
||||
m_oApp.HeadingPairs[1].m_type = L"i4";
|
||||
m_oApp.HeadingPairs[1].m_iContent = nCountThemes;
|
||||
m_oApp.HeadingPairs.push_back(PPTX::Logic::HeadingVariant());
|
||||
m_oApp.HeadingPairs[2].m_type = _T("lpstr");
|
||||
m_oApp.HeadingPairs[2].m_strContent = _T("Slide Titles");
|
||||
m_oApp.HeadingPairs[2].m_type = L"lpstr";
|
||||
m_oApp.HeadingPairs[2].m_strContent = L"Slide Titles";
|
||||
m_oApp.HeadingPairs.push_back(PPTX::Logic::HeadingVariant());
|
||||
m_oApp.HeadingPairs[3].m_type = _T("i4");
|
||||
m_oApp.HeadingPairs[3].m_type = L"i4";
|
||||
m_oApp.HeadingPairs[3].m_iContent = nCountSlides;
|
||||
|
||||
for (int i = 0; i < nCountThemes; ++i)
|
||||
@ -1184,8 +1271,7 @@ namespace NSBinPptxRW
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultCore()
|
||||
{
|
||||
// m_oCore.creator = _T("");
|
||||
m_oCore.m_sLastModifiedBy = _T("");
|
||||
m_oCore.m_sLastModifiedBy = L"";
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultViewProps()
|
||||
{
|
||||
@ -1203,7 +1289,7 @@ namespace NSBinPptxRW
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.CViewPr.Origin.y = -90;
|
||||
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst.push_back(PPTX::nsViewProps::Guide());
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst[0].orient = _T("horz");
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst[0].orient = L"horz";
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst[0].pos = 2160;
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst.push_back(PPTX::nsViewProps::Guide());
|
||||
m_oViewProps.SlideViewPr->CSldViewPr.GuideLst[1].pos = 2880;
|
||||
@ -1222,7 +1308,7 @@ namespace NSBinPptxRW
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultTableStyles()
|
||||
{
|
||||
m_oTableStyles.def = _T("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}");
|
||||
m_oTableStyles.def = L"{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}";
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultPresProps()
|
||||
{
|
||||
@ -1230,38 +1316,65 @@ namespace NSBinPptxRW
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultNotesMasters(int nIndexTheme)
|
||||
{
|
||||
std::wstring strThemeNotes = L"theme" + std::to_wstring( nIndexTheme ) + L".xml";
|
||||
std::wstring strThemeNotes = L"theme" + std::to_wstring(nIndexTheme) + L".xml";
|
||||
|
||||
OOX::CPath pathNotesTheme = m_oReader.m_strFolderThemes + FILE_SEPARATOR_STR + strThemeNotes;
|
||||
Writers::DefaultNotesThemeWriter notesTheme;
|
||||
notesTheme.Write(pathNotesTheme.GetPath());
|
||||
/////////////////////
|
||||
OOX::CPath pathNotesMasters = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("notesMasters");
|
||||
/////////////////////
|
||||
OOX::CPath pathNotesMasters = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"notesMasters";
|
||||
NSDirectory::CreateDirectory(pathNotesMasters.GetPath());
|
||||
|
||||
OOX::CPath pathNotesMaster1 = pathNotesMasters / _T("notesMaster1.xml");
|
||||
OOX::CPath pathNotesMaster1 = pathNotesMasters / L"notesMaster1.xml";
|
||||
Writers::DefaultNotesMasterWriter notesMaster;
|
||||
notesMaster.Write(pathNotesMaster1.GetPath());
|
||||
|
||||
OOX::CPath pathNotesMasterRels = pathNotesMasters / _T("_rels");
|
||||
OOX::CPath pathNotesMasterRels = pathNotesMasters / L"_rels";
|
||||
NSDirectory::CreateDirectory(pathNotesMasterRels.GetPath());
|
||||
|
||||
std::wstring strThemeNotesNum = std::to_wstring(nIndexTheme);
|
||||
|
||||
std::wstring strVal = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
std::wstring strVal = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\
|
||||
<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\" Target=\"../theme/theme") + strThemeNotesNum + _T(".xml\"/></Relationships>");
|
||||
<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\" Target=\"../theme/theme" + strThemeNotesNum + L".xml\"/></Relationships>";
|
||||
NSFile::CFileBinary oFileRels;
|
||||
oFileRels.CreateFile(pathNotesMasterRels.GetPath() + FILE_SEPARATOR_STR + _T("notesMaster1.xml.rels"));
|
||||
oFileRels.CreateFile(pathNotesMasterRels.GetPath() + FILE_SEPARATOR_STR + L"notesMaster1.xml.rels");
|
||||
oFileRels.WriteStringUTF8(strVal);
|
||||
oFileRels.CloseFile();
|
||||
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultHandoutMasters(int nIndexTheme)
|
||||
{
|
||||
std::wstring strThemeNotes = L"theme" + std::to_wstring(nIndexTheme) + L".xml";
|
||||
|
||||
OOX::CPath pathNotesTheme = m_oReader.m_strFolderThemes + FILE_SEPARATOR_STR + strThemeNotes;
|
||||
Writers::DefaultNotesThemeWriter notesTheme;
|
||||
notesTheme.Write(pathNotesTheme.GetPath());
|
||||
/////////////////////
|
||||
OOX::CPath pathHandoutMasters = m_strDstFolder + FILE_SEPARATOR_STR + L"ppt" + FILE_SEPARATOR_STR + L"handoutMasters";
|
||||
NSDirectory::CreateDirectory(pathHandoutMasters.GetPath());
|
||||
|
||||
OOX::CPath pathNotesMaster1 = pathHandoutMasters / L"handoutMaster1.xml";
|
||||
Writers::DefaultHandoutMasterWriter handoutMaster;
|
||||
handoutMaster.Write(pathHandoutMasters.GetPath());
|
||||
|
||||
OOX::CPath pathHandoutMasterRels = pathHandoutMasters / L"_rels";
|
||||
NSDirectory::CreateDirectory(pathHandoutMasterRels.GetPath());
|
||||
|
||||
std::wstring strThemeHandoutNum = std::to_wstring(nIndexTheme);
|
||||
|
||||
std::wstring strVal = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\
|
||||
<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\
|
||||
<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\" Target=\"../theme/theme" + strThemeHandoutNum + L".xml\"/></Relationships>";
|
||||
NSFile::CFileBinary oFileRels;
|
||||
oFileRels.CreateFile(pathHandoutMasterRels.GetPath() + FILE_SEPARATOR_STR + L"handoutMaster1.xml.rels");
|
||||
oFileRels.WriteStringUTF8(strVal);
|
||||
oFileRels.CloseFile();
|
||||
}
|
||||
void CPPTXWriter::CreateDefaultNote()
|
||||
{
|
||||
PPTX::Logic::NvGrpSpPr& nvGrpSpPr = m_oDefaultNote.cSld.spTree.nvGrpSpPr;
|
||||
nvGrpSpPr.cNvPr.id = 1;
|
||||
nvGrpSpPr.cNvPr.name = _T("");
|
||||
nvGrpSpPr.cNvPr.name = L"";
|
||||
|
||||
PPTX::Logic::Xfrm* xfrm = new PPTX::Logic::Xfrm();
|
||||
xfrm->offX = 0;
|
||||
@ -1278,22 +1391,22 @@ namespace NSBinPptxRW
|
||||
// shape comment !!! (TODO:)
|
||||
PPTX::Logic::Shape* pShape = new PPTX::Logic::Shape();
|
||||
pShape->nvSpPr.cNvPr.id = 100000;
|
||||
pShape->nvSpPr.cNvPr.name = _T("");
|
||||
pShape->nvSpPr.cNvPr.name = L"";
|
||||
|
||||
pShape->nvSpPr.cNvSpPr.noGrp = true;
|
||||
pShape->nvSpPr.cNvSpPr.noChangeArrowheads = true;
|
||||
|
||||
pShape->nvSpPr.nvPr.ph = new PPTX::Logic::Ph();
|
||||
pShape->nvSpPr.nvPr.ph->type = _T("body");
|
||||
pShape->nvSpPr.nvPr.ph->idx = _T("1");
|
||||
pShape->nvSpPr.nvPr.ph->type = L"body";
|
||||
pShape->nvSpPr.nvPr.ph->idx = L"1";
|
||||
|
||||
PPTX::Logic::TxBody* pTxBody = new PPTX::Logic::TxBody();
|
||||
pTxBody->Paragrs.push_back(PPTX::Logic::Paragraph());
|
||||
|
||||
PPTX::Logic::Run* pTxRun = new PPTX::Logic::Run();
|
||||
PPTX::Logic::Run* pTxRun = new PPTX::Logic::Run();
|
||||
pTxRun->rPr = new PPTX::Logic::RunProperties();
|
||||
pTxRun->rPr->smtClean = false;
|
||||
pTxRun->SetText(_T("")); // enter simple comment here
|
||||
pTxRun->SetText(L""); // enter simple comment here
|
||||
|
||||
pShape->txBody = pTxBody;
|
||||
if (pShape->txBody.IsInit())
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
|
||||
#include "../../PPTXFormat/NotesSlide.h"
|
||||
#include "../../DocxFormat/VmlDrawing.h"
|
||||
#include "../../PPTXFormat/HandoutMaster.h"
|
||||
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
@ -68,6 +69,10 @@ namespace NSBinPptxRW
|
||||
std::vector<LONG> m_arNotesSlides_Master;
|
||||
std::vector<LONG> m_arNotesMasters_Theme;
|
||||
|
||||
std::vector<PPTX::HandoutMaster> m_arHandoutMasters;
|
||||
std::vector<LONG> m_arHandoutSlides_Master;
|
||||
std::vector<LONG> m_arHandoutMasters_Theme;
|
||||
|
||||
PPTX::Document m_oDocument;
|
||||
PPTX::Presentation m_oPresentation;
|
||||
PPTX::TableStyles m_oTableStyles;
|
||||
@ -100,6 +105,7 @@ namespace NSBinPptxRW
|
||||
void CreateDefaultTableStyles();
|
||||
void CreateDefaultPresProps();
|
||||
void CreateDefaultNotesMasters(int nIndexTheme);
|
||||
void CreateDefaultHandoutMasters(int nIndexTheme);
|
||||
void CreateDefaultNote();
|
||||
};
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "Slide.h"
|
||||
#include "NotesMaster.h"
|
||||
#include "NotesSlide.h"
|
||||
#include "HandoutMaster.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -152,6 +153,18 @@ namespace PPTX
|
||||
}
|
||||
}
|
||||
|
||||
for (std::map<std::wstring, smart_ptr<OOX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const OOX::FileType& curType = pPair->second->type();
|
||||
|
||||
if (OOX::Presentation::FileTypes::HandoutMaster == curType)
|
||||
{
|
||||
smart_ptr<PPTX::HandoutMaster> pointer = pPair->second.smart_dynamic_cast<PPTX::HandoutMaster>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
for (std::map<std::wstring, smart_ptr<OOX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const OOX::FileType& curType = pPair->second->type();
|
||||
|
||||
@ -51,17 +51,90 @@ namespace PPTX
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile(filename.m_strFilename);
|
||||
|
||||
cSld = oNode.ReadNode(_T("p:cSld"));
|
||||
cSld = oNode.ReadNode(L"p:cSld");
|
||||
cSld.SetParentFilePointer(this);
|
||||
|
||||
clrMap = oNode.ReadNode(_T("p:clrMap"));
|
||||
clrMap = oNode.ReadNode(L"p:clrMap");
|
||||
clrMap.SetParentFilePointer(this);
|
||||
|
||||
hf = oNode.ReadNode(_T("p:hf"));
|
||||
hf = oNode.ReadNode(L"p:hf");
|
||||
|
||||
if (hf.is_init())
|
||||
hf->SetParentFilePointer(this);
|
||||
}
|
||||
void HandoutMaster::toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(NSBinPptxRW::NSMainTables::HandoutMasters);
|
||||
|
||||
pWriter->WriteRecord1(0, cSld);
|
||||
pWriter->WriteRecord1(1, clrMap);
|
||||
pWriter->WriteRecord2(2, hf);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
void HandoutMaster::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(L"p:handoutMaster");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(L"xmlns:a", PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:r", PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:p", PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
cSld.toXmlWriter(pWriter);
|
||||
|
||||
clrMap.toXmlWriter(pWriter);
|
||||
pWriter->Write(hf);
|
||||
|
||||
pWriter->EndNode(L"p:handoutMaster");
|
||||
}
|
||||
void HandoutMaster::fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
pReader->Skip(1); // type
|
||||
LONG end = pReader->GetPos() + pReader->GetRecordSize() + 4;
|
||||
|
||||
while (pReader->GetPos() < end)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
cSld.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
clrMap.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
hf = new Logic::HF();
|
||||
hf->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(end);
|
||||
}
|
||||
void HandoutMaster::ApplyRels()
|
||||
{
|
||||
theme_ = (FileContainer::Get(OOX::FileTypes::Theme)).smart_dynamic_cast<PPTX::Theme>();
|
||||
|
||||
if (theme_.IsInit())
|
||||
{
|
||||
theme_->SetColorMap(clrMap);
|
||||
}
|
||||
}
|
||||
void HandoutMaster::write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::CContentTypes& content)const
|
||||
{
|
||||
WrapperFile::write(filename, directory, content);
|
||||
|
||||
@ -52,19 +52,24 @@ namespace PPTX
|
||||
HandoutMaster(OOX::Document* pMain, const OOX::CPath& filename, FileMap& map);
|
||||
virtual ~HandoutMaster();
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map);
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::CContentTypes& content) const;
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const;
|
||||
|
||||
virtual const OOX::CPath DefaultDirectory() const;
|
||||
virtual const OOX::CPath DefaultFileName() const;
|
||||
|
||||
public:
|
||||
Logic::CSld cSld;
|
||||
Logic::ClrMap clrMap;
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const;
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader);
|
||||
|
||||
void ApplyRels();
|
||||
|
||||
Logic::CSld cSld;
|
||||
Logic::ClrMap clrMap;
|
||||
nullable<Logic::HF> hf;
|
||||
|
||||
smart_ptr<Theme> theme_;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
@ -56,17 +56,17 @@ namespace PPTX
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile(filename.m_strFilename);
|
||||
|
||||
cSld = oNode.ReadNode(_T("p:cSld"));
|
||||
cSld = oNode.ReadNode(L"p:cSld");
|
||||
cSld.SetParentFilePointer(this);
|
||||
|
||||
clrMap = oNode.ReadNode(_T("p:clrMap"));
|
||||
clrMap = oNode.ReadNode(L"p:clrMap");
|
||||
clrMap.SetParentFilePointer(this);
|
||||
|
||||
hf = oNode.ReadNode(_T("p:hf"));
|
||||
hf = oNode.ReadNode(L"p:hf");
|
||||
if (hf.IsInit())
|
||||
hf->SetParentFilePointer(this);
|
||||
|
||||
notesStyle = oNode.ReadNode(_T("p:notesStyle"));
|
||||
notesStyle = oNode.ReadNode(L"p:notesStyle");
|
||||
if (notesStyle.is_init())
|
||||
notesStyle->SetParentFilePointer(this);
|
||||
}
|
||||
@ -111,12 +111,12 @@ namespace PPTX
|
||||
}
|
||||
void NotesMaster::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:notesMaster"));
|
||||
pWriter->StartNode(L"p:notesMaster");
|
||||
|
||||
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:p"), PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:a", PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:r", PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(L"xmlns:p", PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
cSld.toXmlWriter(pWriter);
|
||||
@ -125,7 +125,7 @@ namespace PPTX
|
||||
pWriter->Write(hf);
|
||||
pWriter->Write(notesStyle);
|
||||
|
||||
pWriter->EndNode(_T("p:notesMaster"));
|
||||
pWriter->EndNode(L"p:notesMaster");
|
||||
}
|
||||
void NotesMaster::fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
@ -198,8 +198,8 @@ namespace PPTX
|
||||
{
|
||||
if (pMasterShape->nvSpPr.nvPr.ph.is_init())
|
||||
{
|
||||
std::wstring lIdx = pMasterShape->nvSpPr.nvPr.ph->idx.get_value_or(_T(""));
|
||||
std::wstring lType = pMasterShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
|
||||
std::wstring lIdx = pMasterShape->nvSpPr.nvPr.ph->idx.get_value_or(L"");
|
||||
std::wstring lType = pMasterShape->nvSpPr.nvPr.ph->type.get_value_or(L"body");
|
||||
|
||||
if (lType == L"ctrTitle") lType = L"title";
|
||||
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef PPTX_SLIDES_NOTESSLIDE_INCLUDE_H_
|
||||
#define PPTX_SLIDES_NOTESSLIDE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
@ -79,5 +77,3 @@ namespace PPTX
|
||||
smart_ptr<Theme> theme_;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_SLIDES_NOTESSLIDE_INCLUDE_H_
|
||||
|
||||
Reference in New Issue
Block a user