mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
djvu links
This commit is contained in:
@ -118,4 +118,10 @@ BYTE* CDjVuFile::GetPageGlyphs(int nPageIndex, int nRasterW, int nRasterH)
|
||||
return m_pImplementation->GetPageGlyphs(nPageIndex, nRasterW, nRasterH);
|
||||
return NULL;
|
||||
}
|
||||
BYTE* CDjVuFile::GetPageLinks (int nPageIndex, int nRasterW, int nRasterH)
|
||||
{
|
||||
if (m_pImplementation)
|
||||
return m_pImplementation->GetPageLinks(nPageIndex, nRasterW, nRasterH);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -74,5 +74,6 @@ public:
|
||||
#ifdef WASM_MODE
|
||||
BYTE* GetStructure();
|
||||
BYTE* GetPageGlyphs(int nPageIndex, int nRasterW, int nRasterH);
|
||||
BYTE* GetPageLinks (int nPageIndex, int nRasterW, int nRasterH);
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -568,6 +568,25 @@ BYTE* CDjVuFileImplementation::GetPageGlyphs(int nPageIndex, const
|
||||
oRes.ClearWithoutAttack();
|
||||
return res;
|
||||
}
|
||||
BYTE* CDjVuFileImplementation::GetPageLinks (int nPageIndex, const int& nRasterW, const int& nRasterH)
|
||||
{
|
||||
GP<DjVuImage> pPage = m_pDoc->get_page(nPageIndex);
|
||||
GP<DjVuAnno> pAnno = pPage->get_decoded_anno();
|
||||
GPList<GMapArea> map_areas = pAnno->ant->map_areas;
|
||||
|
||||
CData oRes;
|
||||
oRes.SkipLen();
|
||||
for(GPosition pos(map_areas); pos; ++pos)
|
||||
{
|
||||
GUTF8String sURL = map_areas[pos]->url;
|
||||
oRes.WriteString((BYTE*)sURL.getbuf(), sURL.length());
|
||||
}
|
||||
oRes.WriteLen();
|
||||
|
||||
BYTE* res = oRes.GetBuffer();
|
||||
oRes.ClearWithoutAttack();
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
void CDjVuFileImplementation::CreateFrame(IRenderer* pRenderer, GP<DjVuImage>& pPage, int nPage, XmlUtils::CXmlNode& text)
|
||||
{
|
||||
|
||||
@ -82,6 +82,7 @@ public:
|
||||
#ifdef WASM_MODE
|
||||
BYTE* GetStructure();
|
||||
BYTE* GetPageGlyphs(int nPageIndex, const int& nRasterW, const int& nRasterH);
|
||||
BYTE* GetPageLinks (int nPageIndex, const int& nRasterW, const int& nRasterH);
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user