Commit c046776b authored by Sergey Konovalov's avatar Sergey Konovalov

Merge branch 'hotfix/v5.0.5' into develop

# Conflicts:
#	X2tConverter/src/cextracttools.h
parents 055a0257 875717ac
......@@ -2553,7 +2553,7 @@ namespace NExtractTools
}
int oox2mscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params)
{
std::wstring password = params.getPassword();
std::wstring password = params.getSavePassword();
ECMACryptFile cryptReader;
......@@ -2987,7 +2987,7 @@ namespace NExtractTools
{
if(AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX == nFormatTo)
{
if(params.hasPassword())
if(params.hasSavePassword())
{
std::wstring sToMscrypt = sTemp + FILE_SEPARATOR_STR + _T("tomscrypt.docx");
nRes = dir2zip(sFrom, sToMscrypt);
......@@ -3199,7 +3199,7 @@ namespace NExtractTools
{
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX == nFormatTo)
{
if(params.hasPassword())
if(params.hasSavePassword())
{
std::wstring sToMscrypt = sTemp + FILE_SEPARATOR_STR + _T("tomscrypt.xlsx");
nRes = dir2zip(sFrom, sToMscrypt);
......@@ -3386,7 +3386,7 @@ namespace NExtractTools
{
if(AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX == nFormatTo)
{
if(params.hasPassword())
if(params.hasSavePassword())
{
std::wstring sToMscrypt = sTemp + FILE_SEPARATOR_STR + _T("tomscrypt.pptx");
nRes = dir2zip(sFrom, sToMscrypt);
......
......@@ -382,6 +382,7 @@ namespace NExtractTools
int* m_nDoctParams;
std::wstring* m_sHtmlFileInternalPath;
std::wstring* m_sPassword;
std::wstring* m_sSavePassword;
std::wstring* m_sTempDir;
bool* m_bIsNoBase64;
//output params
......@@ -408,6 +409,7 @@ namespace NExtractTools
m_nDoctParams = NULL;
m_sHtmlFileInternalPath = NULL;
m_sPassword = NULL;
m_sSavePassword = NULL;
m_sTempDir = NULL;
m_bIsNoBase64 = NULL;
......@@ -434,6 +436,7 @@ namespace NExtractTools
RELEASEOBJECT(m_nDoctParams);
RELEASEOBJECT(m_sHtmlFileInternalPath);
RELEASEOBJECT(m_sPassword);
RELEASEOBJECT(m_sSavePassword);
RELEASEOBJECT(m_sTempDir);
RELEASEOBJECT(m_bIsNoBase64);
}
......@@ -575,6 +578,11 @@ namespace NExtractTools
RELEASEOBJECT(m_sPassword);
m_sPassword = new std::wstring(sValue);
}
else if(_T("m_sSavePassword") == sName)
{
RELEASEOBJECT(m_sSavePassword);
m_sSavePassword = new std::wstring(sValue);
}
else if(_T("m_sTempDir") == sName)
{
RELEASEOBJECT(m_sTempDir);
......@@ -608,6 +616,14 @@ namespace NExtractTools
std::wstring getPassword() const
{
return (NULL != m_sPassword) ? (*m_sPassword) : L"";
}
bool hasSavePassword() const
{
return NULL != m_sSavePassword;
}
std::wstring getSavePassword() const
{
return (NULL != m_sSavePassword) ? (*m_sSavePassword) : L"";
}
std::wstring getFontPath() const
{
......
......@@ -154,6 +154,7 @@ static std::wstring utf8_to_unicode(const char *src)
if (argc > 4)
{
oInputParams.m_sPassword = new std::wstring(sArg4);
oInputParams.m_sSavePassword = new std::wstring(sArg4);
}
result = NExtractTools::fromInputParams(oInputParams);
}
......
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