From 01969c78a8f93af26c71ecff7ce36511b17d46c7 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 26 Jan 2022 14:56:24 -0500 Subject: QPDFJob: move private members into Members --- include/qpdf/QPDFJob.hh | 225 ++++++++++++++++++++++++------------------------ 1 file changed, 111 insertions(+), 114 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index e20bfc8d..1763efac 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -345,7 +345,7 @@ class QPDFJob enum password_mode_e { pm_bytes, pm_hex_bytes, pm_unicode, pm_auto }; - public: // QXXXQ + public: // QXXXQ begin public struct UnderOverlay { UnderOverlay(char const* which) : @@ -367,123 +367,10 @@ class QPDFJob std::vector from_pagenos; std::vector repeat_pagenos; }; - private: // QXXXQ - enum remove_unref_e { re_auto, re_yes, re_no }; - - std::shared_ptr password; - bool linearize; - bool decrypt; - int split_pages; - bool progress; - bool suppress_warnings; - bool warnings_exit_zero; - bool copy_encryption; - std::string encryption_file; - std::shared_ptr encryption_file_password; - bool encrypt; - bool password_is_hex_key; - bool suppress_password_recovery; - password_mode_e password_mode; - bool allow_insecure; - bool allow_weak_crypto; - std::string user_password; - std::string owner_password; - int keylen; - bool r2_print; - bool r2_modify; - bool r2_extract; - bool r2_annotate; - bool r3_accessibility; - bool r3_extract; - bool r3_assemble; - bool r3_annotate_and_form; - bool r3_form_filling; - bool r3_modify_other; - qpdf_r3_print_e r3_print; - bool force_V4; - bool force_R5; - bool cleartext_metadata; - bool use_aes; - bool stream_data_set; - qpdf_stream_data_e stream_data_mode; - bool compress_streams; - bool compress_streams_set; - bool recompress_flate; - bool recompress_flate_set; - int compression_level; - qpdf_stream_decode_level_e decode_level; - bool decode_level_set; - bool normalize_set; - bool normalize; - bool suppress_recovery; - bool object_stream_set; - qpdf_object_stream_e object_stream_mode; - bool ignore_xref_streams; - bool qdf_mode; - bool preserve_unreferenced_objects; - remove_unref_e remove_unreferenced_page_resources; - bool keep_files_open; - bool keep_files_open_set; - size_t keep_files_open_threshold; - bool newline_before_endstream; - std::string linearize_pass1; - bool coalesce_contents; - bool flatten_annotations; - int flatten_annotations_required; - int flatten_annotations_forbidden; - bool generate_appearances; - std::string min_version; - std::string force_version; - bool show_npages; - bool deterministic_id; - bool static_id; - bool static_aes_iv; - bool suppress_original_object_id; - bool show_encryption; - bool show_encryption_key; - bool check_linearization; - bool show_linearization; - bool show_xref; - bool show_trailer; - int show_obj; - int show_gen; - bool show_raw_stream_data; - bool show_filtered_stream_data; - bool show_pages; - bool show_page_images; - size_t collate; - bool flatten_rotation; - bool list_attachments; - std::string attachment_to_show; - std::list attachments_to_remove; - std::list attachments_to_add; - std::list attachments_to_copy; - bool json; - std::set json_keys; - std::set json_objects; - bool check; - bool optimize_images; - bool externalize_inline_images; - bool keep_inline_images; - bool remove_page_labels; - public: // QXXXQ size_t oi_min_width; size_t oi_min_height; size_t oi_min_area; - size_t ii_min_bytes; - private: // QXXXQ - UnderOverlay underlay; - UnderOverlay overlay; - UnderOverlay* under_overlay; - std::vector page_specs; - std::map rotations; - bool require_outfile; - bool replace_input; - bool check_is_encrypted; - bool check_requires_password; - std::shared_ptr infilename; - std::shared_ptr outfilename; // QXXXQ END-PUBLIC private: @@ -553,6 +440,8 @@ class QPDFJob void doJSONEncrypt(QPDF& pdf, JSON& j); void doJSONAttachments(QPDF& pdf, JSON& j); + enum remove_unref_e { re_auto, re_yes, re_no }; + class Members { friend class QPDFJob; @@ -571,6 +460,114 @@ class QPDFJob std::ostream* cerr; unsigned long encryption_status; bool verbose; + std::shared_ptr password; + bool linearize; + bool decrypt; + int split_pages; + bool progress; + bool suppress_warnings; + bool warnings_exit_zero; + bool copy_encryption; + std::string encryption_file; + std::shared_ptr encryption_file_password; + bool encrypt; + bool password_is_hex_key; + bool suppress_password_recovery; + password_mode_e password_mode; + bool allow_insecure; + bool allow_weak_crypto; + std::string user_password; + std::string owner_password; + int keylen; + bool r2_print; + bool r2_modify; + bool r2_extract; + bool r2_annotate; + bool r3_accessibility; + bool r3_extract; + bool r3_assemble; + bool r3_annotate_and_form; + bool r3_form_filling; + bool r3_modify_other; + qpdf_r3_print_e r3_print; + bool force_V4; + bool force_R5; + bool cleartext_metadata; + bool use_aes; + bool stream_data_set; + qpdf_stream_data_e stream_data_mode; + bool compress_streams; + bool compress_streams_set; + bool recompress_flate; + bool recompress_flate_set; + int compression_level; + qpdf_stream_decode_level_e decode_level; + bool decode_level_set; + bool normalize_set; + bool normalize; + bool suppress_recovery; + bool object_stream_set; + qpdf_object_stream_e object_stream_mode; + bool ignore_xref_streams; + bool qdf_mode; + bool preserve_unreferenced_objects; + remove_unref_e remove_unreferenced_page_resources; + bool keep_files_open; + bool keep_files_open_set; + size_t keep_files_open_threshold; + bool newline_before_endstream; + std::string linearize_pass1; + bool coalesce_contents; + bool flatten_annotations; + int flatten_annotations_required; + int flatten_annotations_forbidden; + bool generate_appearances; + std::string min_version; + std::string force_version; + bool show_npages; + bool deterministic_id; + bool static_id; + bool static_aes_iv; + bool suppress_original_object_id; + bool show_encryption; + bool show_encryption_key; + bool check_linearization; + bool show_linearization; + bool show_xref; + bool show_trailer; + int show_obj; + int show_gen; + bool show_raw_stream_data; + bool show_filtered_stream_data; + bool show_pages; + bool show_page_images; + size_t collate; + bool flatten_rotation; + bool list_attachments; + std::string attachment_to_show; + std::list attachments_to_remove; + std::list attachments_to_add; + std::list attachments_to_copy; + bool json; + std::set json_keys; + std::set json_objects; + bool check; + bool optimize_images; + bool externalize_inline_images; + bool keep_inline_images; + bool remove_page_labels; + size_t ii_min_bytes; + UnderOverlay underlay; + UnderOverlay overlay; + UnderOverlay* under_overlay; + std::vector page_specs; + std::map rotations; + bool require_outfile; + bool replace_input; + bool check_is_encrypted; + bool check_requires_password; + std::shared_ptr infilename; + std::shared_ptr outfilename; }; std::shared_ptr m; }; -- cgit v1.2.3-54-g00ecf