Commit 0e5a581f authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

x2t linux64 build 2.0.2.361

parent 8957e952
File mode changed from 100644 to 100755
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
QT -= core QT -= core
QT -= gui QT -= gui
VERSION = 2.0.2.360 VERSION = 2.0.2.361
DEFINES += INTVER=$$VERSION DEFINES += INTVER=$$VERSION
mac { mac {
......
...@@ -1584,7 +1584,7 @@ namespace NExtractTools ...@@ -1584,7 +1584,7 @@ namespace NExtractTools
nRes = AVS_FILEUTILS_ERROR_CONVERT; nRes = AVS_FILEUTILS_ERROR_CONVERT;
return nRes; return nRes;
} }
int fromSpreadsheet(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params) int fromSpreadsheet(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params)
{ {
int nRes = 0; int nRes = 0;
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatFrom) if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatFrom)
...@@ -1616,7 +1616,7 @@ namespace NExtractTools ...@@ -1616,7 +1616,7 @@ namespace NExtractTools
} }
else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatFrom) else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatFrom)
{ {
nRes = xls2xlsx_dir(sFrom, sXlsxDir, sTemp, sFontPath); nRes = xls2xlsx_dir(sFrom, sXlsxDir, sPassword, sTemp, sFontPath);
} }
else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS == nFormatFrom) else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS == nFormatFrom)
{ {
...@@ -1842,13 +1842,13 @@ namespace NExtractTools ...@@ -1842,13 +1842,13 @@ namespace NExtractTools
} }
// xls -> xlsx // xls -> xlsx
int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath) int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath)
{ {
std::wstring sResultDocxDir = sTemp + FILE_SEPARATOR_STR + _T("xlsx_unpacked"); std::wstring sResultDocxDir = sTemp + FILE_SEPARATOR_STR + _T("xlsx_unpacked");
FileSystem::Directory::CreateDirectory(sResultDocxDir); FileSystem::Directory::CreateDirectory(sResultDocxDir);
int nRes = xls2xlsx_dir(sFrom, sResultDocxDir, sFontPath, sTemp); int nRes = xls2xlsx_dir(sFrom, sResultDocxDir, sPassword, sFontPath, sTemp);
if(SUCCEEDED_X2T(nRes)) if(SUCCEEDED_X2T(nRes))
{ {
COfficeUtils oCOfficeUtils(NULL); COfficeUtils oCOfficeUtils(NULL);
...@@ -1857,13 +1857,13 @@ namespace NExtractTools ...@@ -1857,13 +1857,13 @@ namespace NExtractTools
} }
return AVS_FILEUTILS_ERROR_CONVERT; return AVS_FILEUTILS_ERROR_CONVERT;
} }
int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath) int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath)
{ {
return S_OK == ConvertXls2Xlsx( sFrom, sTo, sFontPath, NULL) ? 0 : AVS_FILEUTILS_ERROR_CONVERT; return S_OK == ConvertXls2Xlsx( sFrom, sTo, sPassword, sFontPath, NULL) ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
} }
// xls -> xlst // xls -> xlst
int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions) int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions)
{ {
// Extract xlsx to temp directory // Extract xlsx to temp directory
std::wstring sResultDoctDir = sTemp + FILE_SEPARATOR_STR + _T("xlst_unpacked"); std::wstring sResultDoctDir = sTemp + FILE_SEPARATOR_STR + _T("xlst_unpacked");
...@@ -1871,7 +1871,7 @@ namespace NExtractTools ...@@ -1871,7 +1871,7 @@ namespace NExtractTools
FileSystem::Directory::CreateDirectory(sResultDoctDir); FileSystem::Directory::CreateDirectory(sResultDoctDir);
int nRes = xls2xlst_bin(sFrom, sResultDoctFileEditor, sTemp, sFontPath, sXmlOptions); int nRes = xls2xlst_bin(sFrom, sResultDoctFileEditor, sPassword, sTemp, sFontPath, sXmlOptions);
if (SUCCEEDED_X2T(nRes)) if (SUCCEEDED_X2T(nRes))
{ {
...@@ -1883,13 +1883,13 @@ namespace NExtractTools ...@@ -1883,13 +1883,13 @@ namespace NExtractTools
} }
// xls -> xlst_bin // xls -> xlst_bin
int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions) int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions)
{ {
std::wstring sResultXlsxDir = sTemp + FILE_SEPARATOR_STR + _T("xlsx_unpacked"); std::wstring sResultXlsxDir = sTemp + FILE_SEPARATOR_STR + _T("xlsx_unpacked");
FileSystem::Directory::CreateDirectory(sResultXlsxDir); FileSystem::Directory::CreateDirectory(sResultXlsxDir);
if (ConvertXls2Xlsx( sFrom, sResultXlsxDir, sFontPath, NULL)== S_OK) if (ConvertXls2Xlsx( sFrom, sResultXlsxDir, sPassword, sFontPath, NULL)== S_OK)
{ {
BinXlsxRW::CXlsxSerializer m_oCXlsxSerializer; BinXlsxRW::CXlsxSerializer m_oCXlsxSerializer;
......
...@@ -63,10 +63,10 @@ namespace NExtractTools ...@@ -63,10 +63,10 @@ namespace NExtractTools
int doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath); int doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath);
int docx_dir2doc (const std::wstring &sDocxDir, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath); int docx_dir2doc (const std::wstring &sDocxDir, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath);
int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath); int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath);
int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath); int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath);
int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions); int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions);
int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions); int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions);
int txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sXmlOptions, const std::wstring &sTemp); int txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sXmlOptions, const std::wstring &sTemp);
int txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sXmlOptions, const std::wstring &sTemp); int txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sXmlOptions, const std::wstring &sTemp);
...@@ -95,7 +95,7 @@ namespace NExtractTools ...@@ -95,7 +95,7 @@ namespace NExtractTools
int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params); int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params);
int fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params); int fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params);
int fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params); int fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params);
int fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params); int fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params);
int fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params); int fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, const InputParams& params);
......
...@@ -337,6 +337,11 @@ namespace NExtractTools ...@@ -337,6 +337,11 @@ namespace NExtractTools
} }
return true; return true;
} }
std::wstring getPassword()
{
return L"";
}
std::wstring getXmlOptions() std::wstring getXmlOptions()
{ {
CString sRes; CString sRes;
......
...@@ -76,6 +76,7 @@ int main(int argc, char *argv[]) ...@@ -76,6 +76,7 @@ int main(int argc, char *argv[])
InputParams oInputParams; InputParams oInputParams;
TConversionDirection conversion = TCD_AUTO; TConversionDirection conversion = TCD_AUTO;
std::wstring sXmlOptions; std::wstring sXmlOptions;
std::wstring sPassword;
#if !defined(_WIN32) && !defined (_WIN64) #if !defined(_WIN32) && !defined (_WIN64)
sExePath = utf8_to_unicode(argv [0]); sExePath = utf8_to_unicode(argv [0]);
...@@ -91,6 +92,7 @@ int main(int argc, char *argv[]) ...@@ -91,6 +92,7 @@ int main(int argc, char *argv[])
oInputParams.FromXmlFile(sArg1); oInputParams.FromXmlFile(sArg1);
conversion = oInputParams.getConversionDirection(); conversion = oInputParams.getConversionDirection();
sXmlOptions = oInputParams.getXmlOptions(); sXmlOptions = oInputParams.getXmlOptions();
sPassword = oInputParams.getPassword();
} }
else else
{ {
...@@ -339,15 +341,15 @@ int main(int argc, char *argv[]) ...@@ -339,15 +341,15 @@ int main(int argc, char *argv[])
} }
else if (TCD_XLS2XLSX == conversion) else if (TCD_XLS2XLSX == conversion)
{ {
result = xls2xlsx (sFileFrom, sFileTo, sTempDir, sFontPath); result = xls2xlsx (sFileFrom, sFileTo, sPassword, sTempDir, sFontPath);
} }
else if (TCD_XLS2XLST == conversion) else if (TCD_XLS2XLST == conversion)
{ {
result = xls2xlst (sFileFrom, sFileTo, sTempDir, sFontPath, sXmlOptions); result = xls2xlst (sFileFrom, sFileTo, sPassword, sTempDir, sFontPath, sXmlOptions);
} }
else if (TCD_XLS2XLST_BIN == conversion) else if (TCD_XLS2XLST_BIN == conversion)
{ {
result = xls2xlst_bin (sFileFrom, sFileTo, sTempDir, sFontPath, sXmlOptions); result = xls2xlst_bin (sFileFrom, sFileTo, sPassword, sTempDir, sFontPath, sXmlOptions);
} }
else if (TCD_ODF2OOX == conversion) else if (TCD_ODF2OOX == conversion)
{ {
...@@ -379,7 +381,7 @@ int main(int argc, char *argv[]) ...@@ -379,7 +381,7 @@ int main(int argc, char *argv[])
} }
else if (TCD_SPREADSHEET2 == conversion) else if (TCD_SPREADSHEET2 == conversion)
{ {
result = fromSpreadsheet(sFileFrom, nFormatFrom, sFileTo, nFormatTo, sTempDir, sFontPath, sXmlOptions, sThemeDir, bFromChanges, bPaid, oInputParams); result = fromSpreadsheet(sFileFrom, nFormatFrom, sFileTo, nFormatTo, sPassword, sTempDir, sFontPath, sXmlOptions, sThemeDir, bFromChanges, bPaid, oInputParams);
} }
else if (TCD_PRESENTATION2 == conversion) else if (TCD_PRESENTATION2 == conversion)
{ {
......
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