fix findFirstFieldIdx

This commit is contained in:
Kulikova Svetlana
2023-06-07 14:18:04 +03:00
parent 98ef894a67
commit dc4ca0fe52
3 changed files with 56 additions and 14 deletions

View File

@ -914,7 +914,7 @@ void getAction(PDFDoc* pdfDoc, NSWasm::CData& oRes, Object* oAction, int nAnnot)
}
else if (oHide.isRef())
{
int nFind = pAcroForms->findFieldIdx(&oHide);
int nFind = pAcroForms->findFirstFieldIdx(&oHide);
if (nFind >= 0)
{
nFields++;
@ -966,7 +966,7 @@ void getAction(PDFDoc* pdfDoc, NSWasm::CData& oRes, Object* oAction, int nAnnot)
}
else if (oField.isRef())
{
int nFind = pAcroForms->findFieldIdx(&oField);
int nFind = pAcroForms->findFirstFieldIdx(&oField);
if (nFind >= 0)
{
nFields++;
@ -1024,7 +1024,7 @@ BYTE* CPdfReader::GetWidgets()
oCO.arrayGetNF(j, &oField);
if (oField.isRef())
{
int nFind = pAcroForms->findFieldIdx(&oField);
int nFind = pAcroForms->findFirstFieldIdx(&oField);
if (nFind >= 0)
{
nFields++;
@ -1035,6 +1035,8 @@ BYTE* CPdfReader::GetWidgets()
}
oRes.AddInt(nFields, nFieldsPos);
}
else
oRes.AddInt(0);
oCO.free();
for (int i = 0, nNum = pAcroForms->getNumFields(); i < nNum; ++i)
@ -2078,6 +2080,7 @@ BYTE* CPdfReader::GetAPWidget(int nRasterW, int nRasterH, int nBackgroundColor,
nWidth += 2;
nHeight += 2;
// Отрисовка на прозрачном холсте с заданым цветом фона
BYTE* pBgraData = new BYTE[nWidth * nHeight * 4];
unsigned int nColor = (unsigned int)nBackgroundColor;
unsigned int nSize = (unsigned int)(nWidth * nHeight);