aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-03-04 21:47:51 +0100
committerJay Berkenbilt <ejb@ql.org>2021-03-04 21:59:45 +0100
commitf68e25c7f278bbfee095d43d4405a74df0bd22ff (patch)
tree6d6b18378c8438b927aa88264ba7ab3c02a7c758 /libqpdf/QPDFAcroFormDocumentHelper.cc
parentaa89476e155a25c4f44dc375885395a2734a547f (diff)
downloadqpdf-f68e25c7f278bbfee095d43d4405a74df0bd22ff.tar.zst
Don't use handleWarning, which is being reverted
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index 7491d5a7..b0777f9b 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -742,8 +742,9 @@ QPDFAcroFormDocumentHelper::adjustDefaultAppearances(
&this->qpdf, DA.getUTF8Value());
try
{
+ auto nwarnings = this->qpdf.numWarnings();
da_stream.parseAsContents(&rf);
- if (rf.sawBad())
+ if (this->qpdf.numWarnings() > nwarnings)
{
QTC::TC("qpdf", "QPDFAcroFormDocumentHelper /DA parse error");
}
@@ -858,8 +859,9 @@ QPDFAcroFormDocumentHelper::adjustAppearanceStream(
ResourceFinder rf;
try
{
+ auto nwarnings = this->qpdf.numWarnings();
stream.parseAsContents(&rf);
- if (rf.sawBad())
+ if (this->qpdf.numWarnings() > nwarnings)
{
QTC::TC("qpdf", "QPDFAcroFormDocumentHelper AP parse error");
}