diff --git a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp index 439ebf8aed..f3d8f231b9 100644 --- a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp +++ b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp @@ -1687,6 +1687,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C NSPresentationEditor::CShapeElement oShapeElem; CPPTShape* pPPTShape = NULL; + bool bSetShape = false; if (L"v:background" == strNameNode) { @@ -1885,6 +1886,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C } } oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape)); + bSetShape = true; if (bIsNeedCoordSizes) { @@ -1895,7 +1897,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C if (pPPTShape != NULL) { - oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape)); + if (!bSetShape) + oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape)); if (bIsNeedCoordSizes) { LoadCoordSize(oNodeShape, oShapeElem.m_pShape);