Commit d2c5ea02 authored by ElenaSubbotina's avatar ElenaSubbotina

OOXML - fix ole object read

parent 419ec7ed
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
......
...@@ -1502,7 +1502,22 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p ...@@ -1502,7 +1502,22 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if(pElem && NULL != pOle && pOle->m_sProgId.IsInit() && (pOle->m_oId.IsInit() || pOle->m_OleObjectFile.IsInit())) if(pElem && NULL != pOle && pOle->m_sProgId.IsInit() && (pOle->m_oId.IsInit() || pOle->m_OleObjectFile.IsInit()))
{ {
PPTX::Logic::Pic* pPicture = dynamic_cast<PPTX::Logic::Pic*>(pElem->GetElem().operator ->()); PPTX::Logic::Pic* pPicture = dynamic_cast<PPTX::Logic::Pic*>(pElem->GetElem().operator ->());
if ((NULL != pPicture) && (pPicture->blipFill.blip.IsInit())) PPTX::Logic::Shape* pShape = dynamic_cast<PPTX::Logic::Shape*>(pElem->GetElem().operator ->());
if ((!pPicture && pShape) && (pShape->spPr.Fill.is<PPTX::Logic::BlipFill>()))
{//convert pptx shape to pptx picture
pPicture = new PPTX::Logic::Pic();
pPicture->nvPicPr.nvPr = pShape->nvSpPr.nvPr;
pPicture->nvPicPr.cNvPr = pShape->nvSpPr.cNvPr;
pPicture->spPr = pShape->spPr;
pPicture->blipFill = pShape->spPr.Fill.as<PPTX::Logic::BlipFill>();
pPicture->spPr.Fill = PPTX::Logic::UniFill();
pShape = NULL;
pElem->InitElem(pPicture);
}
if ((pPicture) && (pPicture->blipFill.blip.IsInit()))
{ {
if (pOle->m_OleObjectFile.IsInit()) if (pOle->m_OleObjectFile.IsInit())
{ {
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\X2tTestD.pdb"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
DebugInformationFormat="4" DebugInformationFormat="4"
......
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