diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-01-03 23:00:56 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-01-04 05:18:13 +0100 |
commit | b55567a0fa6708500cd0905f7a26a28d70979001 (patch) | |
tree | 622bcd3af070c593f84d673633a357ebaf1c0e29 /include | |
parent | 1342612308cf7c9d38a1b87a42d353e8ef8ffdac (diff) | |
download | qpdf-b55567a0fa6708500cd0905f7a26a28d70979001.tar.zst |
Add special case setV code for button fields
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFFormFieldObjectHelper.hh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/qpdf/QPDFFormFieldObjectHelper.hh b/include/qpdf/QPDFFormFieldObjectHelper.hh index 5b8a2d0e..7ab9a1c0 100644 --- a/include/qpdf/QPDFFormFieldObjectHelper.hh +++ b/include/qpdf/QPDFFormFieldObjectHelper.hh @@ -163,10 +163,13 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper void setFieldAttribute(std::string const& key, std::string const& utf8_value); - // Set /V (field value) to the given value. Optionally set - // /NeedAppearances to true. You can explicitly tell this method - // not to set /NeedAppearances if you are going to explicitly - // generate an appearance stream yourself. + // Set /V (field value) to the given value. If need_appearances is + // true and the field type is either /Tx (text) or /Ch (choice), + // set /NeedAppearances to true. You can explicitly tell this + // method not to set /NeedAppearances if you are going to generate + // an appearance stream yourself. Starting with qpdf 8.3.0, this + // method handles fields of type /Btn (checkboxes, radio buttons, + // pushbuttons) specially. QPDF_DLL void setV(QPDFObjectHandle value, bool need_appearances = true); @@ -177,6 +180,9 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper void setV(std::string const& utf8_value, bool need_appearances = true); private: + void setRadioButtonValue(QPDFObjectHandle name); + void setCheckBoxValue(bool value); + class Members { friend class QPDFFormFieldObjectHelper; |