Commit ebdfb2f7 authored by ElenaSubbotina's avatar ElenaSubbotina

OOxmlFormat - fix users files

parent 5f0e6349
...@@ -174,6 +174,7 @@ namespace PPTX ...@@ -174,6 +174,7 @@ 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)
...@@ -203,6 +205,7 @@ namespace PPTX ...@@ -203,6 +205,7 @@ 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;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
oDrawingConverter.m_pBinaryWriter = pWriter; oDrawingConverter.m_pBinaryWriter = pWriter;
...@@ -215,6 +218,7 @@ namespace PPTX ...@@ -215,6 +218,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_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 = 0;
__try
{
*pNewElem = _tstof(sVal.c_str()); *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