Commit 92fb4ac4 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent decfeec7
...@@ -909,19 +909,24 @@ namespace PPTX ...@@ -909,19 +909,24 @@ namespace PPTX
ext.link = OOX::RId(blipFill.blip->mediaRid); ext.link = OOX::RId(blipFill.blip->mediaRid);
nvPicPr.nvPr.extLst.push_back(ext); nvPicPr.nvPr.extLst.push_back(ext);
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; int nRId = -1;
if (blipFill.additionalFile.is<OOX::Audio>()) if (blipFill.additionalFile.is<OOX::Audio>())
{ {
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"audioFile"); nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"audioFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio", nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio", strMediaRelsPath, L"");
L"NULL", L"External");
} }
if (blipFill.additionalFile.is<OOX::Video>()) if (blipFill.additionalFile.is<OOX::Video>())
{ {
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"videoFile"); nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"videoFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video", nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video", strMediaRelsPath, L"");
L"NULL", L"External");
} }
if (nvPicPr.nvPr.media.Media.IsInit() && nRId > 0) 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