This commit is contained in:
Elena.Subbotina
2024-05-08 10:53:05 +03:00
parent d16d7a1e76
commit 3104f84768
15 changed files with 185 additions and 149 deletions

View File

@ -74,8 +74,10 @@ public:
void SetThemesDir (std::wstring bsDir);
void SetUseSystemFonts (bool useSystemFonts);
void SetIsNoBase64 (bool val);
void SetMacroEnabled (bool val);
void SetIsNoBase64 (bool val);
void SetMacroEnabled (bool val);
bool GetMacroEnabled ();
_UINT32 OpenFileToPPTY (std::wstring bsInput, std::wstring bsOutput);
_UINT32 OpenDirectoryToPPTY (std::wstring bsInput, std::wstring bsOutput);

View File

@ -176,6 +176,10 @@ void CPPTXFile::SetMacroEnabled(bool val)
{
m_bIsMacro = val;
}
bool CPPTXFile::GetMacroEnabled()
{
return m_bIsMacro;
}
_UINT32 CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
{
if (m_strTempDir.empty()) m_strTempDir = NSDirectory::GetTempPath();
@ -261,7 +265,7 @@ _UINT32 CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput
BYTE* pSrcBuffer = new BYTE[lFileSize];
oFileBinary.ReadFile(pSrcBuffer, (DWORD)lFileSize);
oFileBinary.CloseFile();
std::wstring strBsInput = bsInput;
std::wstring srcFolder = NSDirectory::GetFolderPath(strBsInput);
@ -275,8 +279,8 @@ _UINT32 CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput
{
hRes = S_FALSE;
}
RELEASEARRAYOBJECTS(pSrcBuffer);
m_bIsMacro = oWriter.GetMacroEnabled();
return hRes;
}

View File

@ -371,8 +371,9 @@ namespace PPTX
}
}
}
pReader->Seek(_end_pos);
m_bMacroEnabled = m_pVbaProject.IsInit();
}
void Presentation::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const