[poppler] qt5/src qt6/src
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 29 22:56:27 UTC 2020
qt5/src/poppler-document.cc | 7 +++++--
qt6/src/poppler-document.cc | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 72827b0c11dc18a7eb6fce89c0e9877a8f3fc820
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Dec 29 23:50:05 2020 +0100
qt: Account for catalog potentially lacking AcroForm
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index b6c7624a..0a2a6ce4 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -801,9 +801,12 @@ Document::FormType Document::formType() const
QVector<int> Document::formCalculateOrder() const
{
- QVector<int> result;
-
Form *form = m_doc->doc->getCatalog()->getForm();
+ if (!form) {
+ return {};
+ }
+
+ QVector<int> result;
const std::vector<Ref> &calculateOrder = form->getCalculateOrder();
for (Ref r : calculateOrder) {
FormWidget *w = form->findWidgetByRef(r);
diff --git a/qt6/src/poppler-document.cc b/qt6/src/poppler-document.cc
index 9b5edc62..1a13d46d 100644
--- a/qt6/src/poppler-document.cc
+++ b/qt6/src/poppler-document.cc
@@ -783,9 +783,12 @@ Document::FormType Document::formType() const
QVector<int> Document::formCalculateOrder() const
{
- QVector<int> result;
-
Form *form = m_doc->doc->getCatalog()->getForm();
+ if (!form) {
+ return {};
+ }
+
+ QVector<int> result;
const std::vector<Ref> &calculateOrder = form->getCalculateOrder();
for (Ref r : calculateOrder) {
FormWidget *w = form->findWidgetByRef(r);
More information about the poppler
mailing list