aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-01-26 09:00:23 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-01-27 14:31:12 +0100
commit07db3200cb0ef058b8a66ece8d9757adfba49fd1 (patch)
tree084c94a5778581451bb42e5cd38fffeb36a12e2b /libqpdf/QPDFAcroFormDocumentHelper.cc
parent710d2e54f0762b7702640766d33b7e0977ba69de (diff)
downloadqpdf-07db3200cb0ef058b8a66ece8d9757adfba49fd1.tar.zst
Remove some if statements and simplify some boolean expressions
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index ad6efc70..c3ade76c 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -280,9 +280,7 @@ QPDFAcroFormDocumentHelper::getFieldForAnnotation(QPDFAnnotationObjectHelper h)
{
QPDFObjectHandle oh = h.getObjectHandle();
QPDFFormFieldObjectHelper result(QPDFObjectHandle::newNull());
- if (! (oh.isDictionary() &&
- oh.getKey("/Subtype").isName() &&
- (oh.getKey("/Subtype").getName() == "/Widget")))
+ if (! oh.isDictionaryOfType("", "/Widget"))
{
return result;
}