Commit 164c7faf authored by ElenaSubbotina's avatar ElenaSubbotina

..fix previus

parent 4c07ddbc
......@@ -361,7 +361,8 @@ namespace PPTX
if (smartArt.is_init() && !table.is_init() && !chartRec.is_init() && !spid.is_init())
{
//smartArt->LoadDrawing(pWriter);
smartArt->LoadDrawing(pWriter);
if (smartArt->m_diag.is_init())
{
smartArt->m_diag->nvGrpSpPr.cNvPr = nvGraphicFramePr.cNvPr;
......
......@@ -322,9 +322,6 @@ namespace PPTX
nvPicPr.toXmlWriter(pWriter);
blipFill.m_namespace = namespace_;
if (blipFill.blip.is_init())
blipFill.blip->m_namespace = _T("a");
blipFill.toXmlWriter(pWriter);
pWriter->m_lFlag = 1;
......@@ -338,7 +335,6 @@ namespace PPTX
if (pWriter->m_lDocType != XMLWRITER_DOC_TYPE_XLSX &&
pWriter->m_lDocType != XMLWRITER_DOC_TYPE_DOCX)
{
pWriter->EndNode(_T("p:pic"));
if(bOle)
{
pWriter->WriteString(L"</p:oleObj></a:graphicData></a:graphic></p:graphicFrame>");
......
......@@ -46,6 +46,9 @@ namespace PPTX
{
void SmartArt::LoadDrawing(NSBinPptxRW::CBinaryFileWriter* pWriter)
{
if (m_diag.IsInit())
return ;
FileContainer* pRels = NULL;
if (pWriter)
{
......@@ -104,7 +107,7 @@ namespace PPTX
pDiagramDrawing = dynamic_cast<OOX::CDiagramDrawing*>(oFileDrawing.operator->());
}
if (!pDiagramDrawing)
if (!pDiagramDrawing && pDiagramData)
{
// easy4cargo1.pptx - слайд 2 - в диаграмме Smart вместо ссылки на drawing.xml ссылка на стороннюю картинку
OOX::CPath pathDiagramData = pDiagramData->m_strFilename;
......@@ -121,7 +124,9 @@ namespace PPTX
if ((pDiagramDrawing) && (pDiagramDrawing->m_oShapeTree.IsInit()))
{
m_diag = pDiagramDrawing->m_oShapeTree;
m_diag = pDiagramDrawing->m_oShapeTree;
FillParentPointersForChilds();
m_oCommonRels = smart_ptr<PPTX::CCommonRels>( new PPTX::CCommonRels());
m_oCommonRels->_read(pDiagramDrawing->m_oReadPath);
}
......
......@@ -65,12 +65,12 @@ namespace PPTX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
FillParentPointersForChilds();
//FillParentPointersForChilds();
}
virtual void fromXML(XmlUtils::CXmlNode& node)
{
node.ReadAttributeBase(L"r:dm", id_data);
FillParentPointersForChilds();
//FillParentPointersForChilds();
}
virtual std::wstring toXML() const
{
......@@ -104,7 +104,6 @@ namespace PPTX
protected:
virtual void FillParentPointersForChilds()
{
LoadDrawing();
if(m_diag.IsInit())
m_diag->SetParentPointer(this);
}
......
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