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 @@
QT -= core
QT -= gui
VERSION = 2.0.2.360
VERSION = 2.0.2.361
DEFINES += INTVER=$$VERSION
mac {
......
......@@ -1584,7 +1584,7 @@ namespace NExtractTools
nRes = AVS_FILEUTILS_ERROR_CONVERT;
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;
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatFrom)
......@@ -1616,7 +1616,7 @@ namespace NExtractTools
}
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)
{
......@@ -1842,13 +1842,13 @@ namespace NExtractTools
}
// 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");
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))
{
COfficeUtils oCOfficeUtils(NULL);
......@@ -1857,13 +1857,13 @@ namespace NExtractTools
}
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
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
std::wstring sResultDoctDir = sTemp + FILE_SEPARATOR_STR + _T("xlst_unpacked");
......@@ -1871,7 +1871,7 @@ namespace NExtractTools
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))
{
......@@ -1883,13 +1883,13 @@ namespace NExtractTools
}
// 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");
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;
......
......@@ -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 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_dir (const std::wstring &sFrom, const std::wstring &sTo, 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_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, const std::wstring &sFontPath, const std::wstring &sXmlOptions);
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 &sPassword, const std::wstring &sTemp, const std::wstring &sFontPath);
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 &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_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sXmlOptions, const std::wstring &sTemp);
......@@ -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 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 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
}
return true;
}
std::wstring getPassword()
{
return L"";
}
std::wstring getXmlOptions()
{
CString sRes;
......
......@@ -72,10 +72,11 @@ int main(int argc, char *argv[])
return getReturnErrorCode(AVS_FILEUTILS_ERROR_CONVERT_PARAMS);
}
std::wstring sArg1, sExePath;
InputParams oInputParams;
TConversionDirection conversion = TCD_AUTO;
std::wstring sXmlOptions;
std::wstring sArg1, sExePath;
InputParams oInputParams;
TConversionDirection conversion = TCD_AUTO;
std::wstring sXmlOptions;
std::wstring sPassword;
#if !defined(_WIN32) && !defined (_WIN64)
sExePath = utf8_to_unicode(argv [0]);
......@@ -89,8 +90,9 @@ int main(int argc, char *argv[])
if(sXmlExt == sArg1.substr(sArg1.length() - sXmlExt.length(), sXmlExt.length()))
{
oInputParams.FromXmlFile(sArg1);
conversion = oInputParams.getConversionDirection();
conversion = oInputParams.getConversionDirection();
sXmlOptions = oInputParams.getXmlOptions();
sPassword = oInputParams.getPassword();
}
else
{
......@@ -339,15 +341,15 @@ int main(int argc, char *argv[])
}
else if (TCD_XLS2XLSX == conversion)
{
result = xls2xlsx (sFileFrom, sFileTo, sTempDir, sFontPath);
result = xls2xlsx (sFileFrom, sFileTo, sPassword, sTempDir, sFontPath);
}
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)
{
result = xls2xlst_bin (sFileFrom, sFileTo, sTempDir, sFontPath, sXmlOptions);
result = xls2xlst_bin (sFileFrom, sFileTo, sPassword, sTempDir, sFontPath, sXmlOptions);
}
else if (TCD_ODF2OOX == conversion)
{
......@@ -379,7 +381,7 @@ int main(int argc, char *argv[])
}
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)
{
......
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