Commit f907a90b authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent f65a27cf
......@@ -118,6 +118,8 @@ namespace PPTX
return parentFileAs<SlideMaster>().GetMediaFullPathNameFromRId(*embed);
else if(parentFileIs<Theme>())
return parentFileAs<Theme>().GetMediaFullPathNameFromRId(*embed);
else if(parentFileIs<NotesSlide>())
return parentFileAs<NotesSlide>().GetMediaFullPathNameFromRId(*embed);
return _T("");
}
else if(link.IsInit())
......@@ -137,6 +139,8 @@ namespace PPTX
return parentFileAs<SlideMaster>().GetMediaFullPathNameFromRId(*link);
else if(parentFileIs<Theme>())
return parentFileAs<Theme>().GetMediaFullPathNameFromRId(*link);
else if(parentFileIs<NotesSlide>())
return parentFileAs<NotesSlide>().GetMediaFullPathNameFromRId(*link);
return _T("");
}
return _T("");
......@@ -150,6 +154,7 @@ namespace PPTX
else if(parentFileIs<SlideLayout>()) pOleObject = parentFileAs<SlideLayout>().GetOleObject(oRId);
else if(parentFileIs<SlideMaster>()) pOleObject = parentFileAs<SlideMaster>().GetOleObject(oRId);
else if(parentFileIs<Theme>()) pOleObject = parentFileAs<Theme>().GetOleObject(oRId);
else if(parentFileIs<NotesSlide>()) pOleObject = parentFileAs<NotesSlide>().GetOleObject(oRId);
if (pOleObject.IsInit())
return pOleObject->filename().m_strFilename;
......
......@@ -64,6 +64,8 @@ namespace PPTX
sLink = parentFileAs<SlideMaster>().GetFullHyperlinkNameFromRId(rid);
else if(parentFileIs<Theme>())
sLink = parentFileAs<Theme>().GetFullHyperlinkNameFromRId(rid);
else if(parentFileIs<NotesSlide>())
sLink = parentFileAs<NotesSlide>().GetFullHyperlinkNameFromRId(rid);
}
XmlUtils::replace_all(sLink, L"\\", L"/");
......
......@@ -88,7 +88,33 @@ namespace PPTX
{
return type().DefaultFileName();
}
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::Image> p = GetImage(rid);
if (!p.is_init())
return _T("");
return p->filename().m_strFilename;
}
virtual std::wstring GetFullHyperlinkNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::HyperLink> p = GetHyperlink(rid);
if (!p.is_init())
return _T("");
return p->Uri().m_strFilename;
}
virtual std::wstring GetLinkFromRId(const OOX::RId& rid)const
{
//return relsTable.Links.GetTargetById(rid);
smart_ptr<OOX::External> pExt = Find(rid).smart_dynamic_cast<OOX::External>();
if (pExt.IsInit())
return pExt->Uri().m_strFilename;
smart_ptr<OOX::Media> pMedia = Find(rid).smart_dynamic_cast<OOX::Media>();
if (pMedia.IsInit())
return pMedia->filename().m_strFilename;
return _T("");
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
pWriter->StartRecord(NSBinPptxRW::NSMainTables::NotesSlides);
......
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