Compare commits

..

4 Commits

Author SHA1 Message Date
1bd2c0b852 Merge branch 'hotfix/v4.2.7' into develop
fix bug 33867
2017-01-31 13:57:55 +03:00
82b0f4bce8 DiagramDrawing losing images 2017-01-31 13:50:16 +03:00
5635239274 fix crash on windows 2017-01-31 13:12:43 +03:00
765ca861fb fix bug 33842 (corrupted xlsx->csv convertion) 2017-01-27 15:22:14 +03:00
5 changed files with 18 additions and 15 deletions

View File

@ -1744,6 +1744,9 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
if (pDiagramDrawing)
{
result->InitElem(new PPTX::Logic::SpTree(*pDiagramDrawing->m_oShapeTree));
//to correct write blipFill rId to binary
m_strCurrentRelsPath = pDiagramDrawing->GetReadPath().GetPath();
SetCurrentRelsPath();
}
else
{//BG-FSC1.docx

View File

@ -213,6 +213,7 @@ namespace OOX
}
virtual void read(const CPath& oRootPath, const CPath& oFilePath)
{
m_oReadPath = oFilePath;
IFileContainer::Read( oRootPath, oFilePath );
//#ifdef USE_LITE_READER
@ -259,7 +260,12 @@ namespace OOX
{
return type().DefaultFileName();
}
const CPath& GetReadPath()
{
return m_oReadPath;
}
CPath m_oReadPath;
NSCommon::nullable<PPTX::Logic::SpTree> m_oShapeTree;
};

View File

@ -1041,14 +1041,8 @@ namespace NSFile
for (int nIndex = 0; nIndex < 1000; ++nIndex)
{
wsFileName = wsTemp;
#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[32] ={};
size_t sz = 0;
_itow_s(nTime + nIndex, buff, sz, 10);
wsFileName.append(buff, sz);
#else
wsFileName.append(std::to_wstring(nTime + nIndex));
#endif
if (wsExt)
{
wsFileName.append(wsExt);

View File

@ -248,16 +248,16 @@ namespace NExtractTools
}
else return AVS_FILEUTILS_ERROR_CONVERT; }
return xlsx_dir2xlst_bin(sTempUnpackedXLSX, sTo, params);
return xlsx_dir2xlst_bin(sTempUnpackedXLSX, sTo, params, true);
}
int xlsx_dir2xlst_bin (const std::wstring &sXlsxDir, const std::wstring &sTo, InputParams& params)
int xlsx_dir2xlst_bin (const std::wstring &sXlsxDir, const std::wstring &sTo, InputParams& params, bool bXmlOptions)
{
// Save to file (from temp dir)
BinXlsxRW::CXlsxSerializer m_oCXlsxSerializer;
m_oCXlsxSerializer.setFontDir(params.getFontPath());
return m_oCXlsxSerializer.saveToFile (sTo, sXlsxDir, params.getXmlOptions()) ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
return m_oCXlsxSerializer.saveToFile (sTo, sXlsxDir, bXmlOptions ? params.getXmlOptions() : L"") ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
}
// xslx -> xslt
@ -2053,11 +2053,11 @@ namespace NExtractTools
}
else if(AVS_OFFICESTUDIO_FILE_OTHER_JSON == nFormatTo)
{
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params);
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params, true);
}
else if(AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET == nFormatTo)
{
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params);
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params, true);
}
else
{
@ -2065,9 +2065,9 @@ namespace NExtractTools
NSDirectory::CreateDirectory(sXlstDir);
std::wstring sTFile = sXlstDir + FILE_SEPARATOR_STR + _T("Editor.bin");
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatTo)
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params);
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params, false);
else
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params);
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params, true);
if(SUCCEEDED_X2T(nRes))
{
nRes = fromXlstBin(sTFile, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);

View File

@ -56,7 +56,7 @@ namespace NExtractTools
int doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions);
int xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);