QPDFAcroFormDocumentHelper::getFieldForAnnotation(QPDFAnnotationObjectHelper h)
{
    QPDFObjectHandle oh = h.getObjectHandle();
    if (! (oh.isDictionary() &&
           oh.getKey("/Subtype").isName() &&
           (oh.getKey("/Subtype").getName() == "/Widget")))
    {
        throw std::logic_error(
            "QPDFAnnotationObjectHelper::getFieldForAnnotation called for"
            " non-/Widget annotation");
    }
    analyze();
    QPDFFormFieldObjectHelper result(QPDFObjectHandle::newNull());
    QPDFObjGen og(oh.getObjGen());
    if (this->m->annotation_to_field.count(og))
    {
        result = this->m->annotation_to_field[og];
    }
    return result;
}
QPDFAcroFormDocumentHelper::getFieldForAnnotation(QPDFAnnotationObjectHelper h)
{
    QPDFObjectHandle oh = h.getObjectHandle();
    if (! (oh.isDictionary() &&
           oh.getKey("/Subtype").isName() &&
           (oh.getKey("/Subtype").getName() == "/Widget")))
    {
        throw std::logic_error(
            "QPDFAnnotationObjectHelper::getFieldForAnnotation called for"
            " non-/Widget annotation");
    }
    analyze();
    QPDFFormFieldObjectHelper result(QPDFObjectHandle::newNull());
    QPDFObjGen og(oh.getObjGen());
    if (this->m->annotation_to_field.count(og))
    {
        result = this->m->annotation_to_field[og];
    }
    return result;
}