Commit ebdfb2f7 authored by ElenaSubbotina's avatar ElenaSubbotina

OOxmlFormat - fix users files

parent 5f0e6349
...@@ -174,7 +174,8 @@ namespace PPTX ...@@ -174,7 +174,8 @@ namespace PPTX
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter; NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer; NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
BinDocxRW::CDocxSerializer* old_serial = pWriter->m_pMainDocument; BinDocxRW::CDocxSerializer* old_serial = pWriter->m_pMainDocument;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
oDrawingConverter.m_pBinaryWriter = pWriter; oDrawingConverter.m_pBinaryWriter = pWriter;
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &oFontProcessor, &oDrawingConverter, NULL); oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &oFontProcessor, &oDrawingConverter, NULL);
...@@ -189,6 +190,7 @@ namespace PPTX ...@@ -189,6 +190,7 @@ namespace PPTX
oDrawingConverter.m_pBinaryWriter = old_writer; oDrawingConverter.m_pBinaryWriter = old_writer;
*pWriter->m_pCurrentContainer = old_rels; *pWriter->m_pCurrentContainer = old_rels;
pWriter->m_pMainDocument = old_serial; pWriter->m_pMainDocument = old_serial;
*pWriter->m_pTheme = old_theme;
} }
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX || else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX ||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM) office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM)
...@@ -201,9 +203,10 @@ namespace PPTX ...@@ -201,9 +203,10 @@ namespace PPTX
DocWrapper::FontProcessor fp; DocWrapper::FontProcessor fp;
NSBinPptxRW::CDrawingConverter oDrawingConverter; NSBinPptxRW::CDrawingConverter oDrawingConverter;
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter; NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer; NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
oDrawingConverter.m_pBinaryWriter = pWriter; oDrawingConverter.m_pBinaryWriter = pWriter;
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(fp); BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(fp);
...@@ -215,7 +218,8 @@ namespace PPTX ...@@ -215,7 +218,8 @@ namespace PPTX
oDrawingConverter.m_pBinaryWriter = old_writer; oDrawingConverter.m_pBinaryWriter = old_writer;
*pWriter->m_pCurrentContainer = old_rels; *pWriter->m_pCurrentContainer = old_rels;
} *pWriter->m_pTheme = old_theme;
}
//else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX) //else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX)
//{ //{
//} //}
......
...@@ -2771,8 +2771,16 @@ namespace OOX{ ...@@ -2771,8 +2771,16 @@ namespace OOX{
if(_T("val") == wsName) if(_T("val") == wsName)
{ {
double* pNewElem = new double; double* pNewElem = new double;
std::wstring sVal = oReader.GetText(); std::wstring sVal = oReader.GetText(); // Yp2bbamFbt1iHeX3WM0_.pptx - value = "-"
*pNewElem = _tstof(sVal.c_str()); *pNewElem = 0;
__try
{
*pNewElem = _tstof(sVal.c_str());
}
catch(...)
{
}
m_val = pNewElem; m_val = pNewElem;
} }
WritingElement_ReadAttributes_End_No_NS( oReader ) WritingElement_ReadAttributes_End_No_NS( oReader )
......
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