Form field highlighting

This commit is contained in:
Jakub Melka
2020-04-23 19:25:57 +02:00
parent d16e2a2c02
commit 76af397b07
6 changed files with 164 additions and 29 deletions

View File

@ -282,6 +282,17 @@ PDFFormManager::~PDFFormManager()
}
const PDFFormField* PDFFormManager::getFormFieldForWidget(PDFObjectReference widget) const
{
auto it = m_widgetToFormField.find(widget);
if (it != m_widgetToFormField.cend())
{
return it->second;
}
return nullptr;
}
PDFAnnotationManager* PDFFormManager::getAnnotationManager() const
{
return m_annotationManager;
@ -331,7 +342,7 @@ void PDFFormManager::updateWidgetToFormFieldMapping()
{
m_widgetToFormField.clear();
if (hasAcroForm())
if (hasAcroForm() || hasXFAForm())
{
for (const PDFFormFieldPointer& formFieldPtr : m_form.getFormFields())
{