From f68e25c7f278bbfee095d43d4405a74df0bd22ff Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 4 Mar 2021 15:47:51 -0500 Subject: Don't use handleWarning, which is being reverted --- libqpdf/QPDFAcroFormDocumentHelper.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc') 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"); } -- cgit v1.2.3-54-g00ecf