Commit e223ffd0 authored by ElenaSubbotina's avatar ElenaSubbotina

Merge remote-tracking branch 'origin/release/v5.0.0' into develop

parents b140f4b5 2d570818
......@@ -121,7 +121,7 @@ namespace PPTX
oAttr.Write(_T("noSelect"), noSelect);
std::wstring namespaceLocks = L"a";
if (m_namespace == L"wp") namespaceLocks = L"wp";
//if (m_namespace == L"wp") namespaceLocks = L"wp";
return XmlUtils::CreateNode(m_namespace + L":cNvGraphicFramePr", oAttr.m_strValue.empty() ? L"" : XmlUtils::CreateNode(namespaceLocks + L":graphicFrameLocks", oAttr));
}
......
......@@ -900,23 +900,28 @@ namespace PPTX
}
if (!blipFill.blip->mediaRid.empty())
{
PPTX::Logic::Ext ext;
PPTX::Logic::Ext ext;
ext.link = OOX::RId(blipFill.blip->mediaRid);
nvPicPr.nvPr.extLst.push_back(ext);
int nRId = -1;
std::wstring strMediaRelsPath;
if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_DOCX) strMediaRelsPath = L"media/";
else strMediaRelsPath = L"../media/";
smart_ptr<OOX::Media> mediaFile = blipFill.additionalFile.smart_dynamic_cast<OOX::Media>();
strMediaRelsPath += mediaFile->filename().GetFilename();
int nRId = -1;
if (blipFill.additionalFile.is<OOX::Audio>())
{
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"audioFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",
L"NULL", L"External");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio", strMediaRelsPath, L"");
}
if (blipFill.additionalFile.is<OOX::Video>())
{
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"videoFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",
L"NULL", L"External");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video", strMediaRelsPath, L"");
}
if (nvPicPr.nvPr.media.Media.IsInit() && nRId > 0)
......
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