This commit is contained in:
ElenaSubbotina
2018-03-23 18:55:06 +03:00
parent bac1fee526
commit a7058f0dbd
2 changed files with 8 additions and 4 deletions

View File

@ -77,11 +77,14 @@ namespace PPTX
{
isThemeOverride = false;
m_map = NULL;
OOX::CDocx* docx = dynamic_cast<OOX::CDocx*>(File::m_pMainDocument);
if (docx) docx->m_pTheme = this;
read(filename, map);
OOX::CDocx* docx = dynamic_cast<OOX::CDocx*>(File::m_pMainDocument);
if (docx && !docx->m_pTheme && !isThemeOverride)
{
docx->m_pTheme = this;
}
}
virtual void read(const OOX::CPath& filename, FileMap& map)

View File

@ -963,9 +963,10 @@ namespace BinXlsxRW
OOX::CPath pathThemeOverrideFile = m_oSaveParams.sThemePath + FILE_SEPARATOR_STR + sThemeOverrideName;
smart_ptr<PPTX::Theme> pTheme = new PPTX::Theme(NULL);
pTheme->isThemeOverride = true;
pTheme->fromPPTY(&m_oBufferedStream);
pTheme->isThemeOverride = true;
NSBinPptxRW::CXmlWriter xmlWriter;
pTheme->toXmlWriter(&xmlWriter);