mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Merge pull request 'Fix bug 76845' (#531) from fix/bug-76845 into release/v9.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/531
This commit is contained in:
@ -2199,14 +2199,21 @@ BYTE* CPdfReader::GetAPAnnots(int nRasterW, int nRasterH, int nBackgroundColor,
|
||||
}
|
||||
if (oAnnot.dictLookup("Subtype", &oObj)->isName())
|
||||
sType = oObj.getName();
|
||||
oObj.free(); oAnnot.free();
|
||||
oObj.free();
|
||||
|
||||
if (sType == "Widget")
|
||||
{
|
||||
oAnnotRef.free();
|
||||
oAnnotRef.free(); oAnnot.free();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (oAnnot.dictLookupNF("IRT", &oObj)->isRef())
|
||||
{
|
||||
oObj.free(); oAnnotRef.free(); oAnnot.free();
|
||||
continue;
|
||||
}
|
||||
oAnnot.free(); oObj.free();
|
||||
|
||||
PdfReader::CAnnotAP* pAP = new PdfReader::CAnnotAP(pDoc, m_pFontManager, pFontList, nRasterW, nRasterH, nBackgroundColor, nPageIndex, sView, &oAnnotRef, nStartRefID);
|
||||
if (pAP)
|
||||
pAP->ToWASM(oRes);
|
||||
|
||||
@ -3095,6 +3095,7 @@ CAnnotMarkup::CAnnotMarkup(PDFDoc* pdfDoc, Object* oAnnotRef, int nPageIndex, in
|
||||
if (oAnnot.dictLookupNF("IRT", &oObj)->isRef())
|
||||
{
|
||||
m_unFlags |= (1 << 5);
|
||||
m_unAFlags &= ~(1 << 6); // IRT аннотации не отображаются
|
||||
m_unRefNumIRT = oObj.getRefNum() + nStartRefID;
|
||||
}
|
||||
oObj.free();
|
||||
|
||||
@ -1662,6 +1662,7 @@ void Annot::drawText(GString *text, GString *da, int quadding, double margin,
|
||||
|
||||
void Annot::draw(Gfx *gfx, GBool printing) {
|
||||
GBool oc, isLink;
|
||||
Object annotObj, oIRTObj;
|
||||
|
||||
// check the flags
|
||||
if ((flags & annotFlagHidden) ||
|
||||
@ -1670,6 +1671,18 @@ void Annot::draw(Gfx *gfx, GBool printing) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getObject(&annotObj)->isDict()) {
|
||||
annotObj.free();
|
||||
return;
|
||||
}
|
||||
|
||||
if (annotObj.dictLookupNF("IRT", &oIRTObj)->isRef()) {
|
||||
annotObj.free(); oIRTObj.free();
|
||||
return;
|
||||
}
|
||||
|
||||
annotObj.free(); oIRTObj.free();
|
||||
|
||||
// check the optional content entry
|
||||
if (doc->getOptionalContent()->evalOCObject(&ocObj, &oc) && !oc) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user