aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDFWriter.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-08 15:18:08 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-08 17:51:15 +0100
commitcb769c62e55599e9f980001830bc61d9fcaa64a9 (patch)
tree0bf980c385a61cbc8720cf990762ffc1200f9d6a /include/qpdf/QPDFWriter.hh
parent716381f65a2b2dc72f8da2426ba71aeab02c507f (diff)
downloadqpdf-cb769c62e55599e9f980001830bc61d9fcaa64a9.tar.zst
WHITESPACE ONLY -- expand tabs in source code
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
Diffstat (limited to 'include/qpdf/QPDFWriter.hh')
-rw-r--r--include/qpdf/QPDFWriter.hh94
1 files changed, 47 insertions, 47 deletions
diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh
index cb6585f0..97d190a7 100644
--- a/include/qpdf/QPDFWriter.hh
+++ b/include/qpdf/QPDFWriter.hh
@@ -370,73 +370,73 @@ class QPDFWriter
// it unless you have to.
QPDF_DLL
void setR2EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_print, bool allow_modify,
- bool allow_extract, bool allow_annotate);
+ char const* user_password, char const* owner_password,
+ bool allow_print, bool allow_modify,
+ bool allow_extract, bool allow_annotate);
// R3 uses RC4, which is a weak cryptographic algorithm. Don't use
// it unless you have to.
QPDF_DLL
void setR3EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
bool allow_assemble, bool allow_annotate_and_form,
bool allow_form_filling, bool allow_modify_other,
- qpdf_r3_print_e print);
+ qpdf_r3_print_e print);
// R4 uses RC4, which is a weak cryptographic algorithm, when
// use_aes=false. Don't use it unless you have to.
QPDF_DLL
void setR4EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
bool allow_assemble, bool allow_annotate_and_form,
bool allow_form_filling, bool allow_modify_other,
- qpdf_r3_print_e print, bool encrypt_metadata, bool use_aes);
+ qpdf_r3_print_e print, bool encrypt_metadata, bool use_aes);
// R5 is deprecated. Do not use it for production use. Writing
// R5 is supported by qpdf primarily to generate test files for
// applications that may need to test R5 support.
QPDF_DLL
void setR5EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
bool allow_assemble, bool allow_annotate_and_form,
bool allow_form_filling, bool allow_modify_other,
- qpdf_r3_print_e print, bool encrypt_metadata);
+ qpdf_r3_print_e print, bool encrypt_metadata);
QPDF_DLL
void setR6EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
bool allow_assemble, bool allow_annotate_and_form,
bool allow_form_filling, bool allow_modify_other,
- qpdf_r3_print_e print, bool encrypt_metadata_aes);
+ qpdf_r3_print_e print, bool encrypt_metadata_aes);
// Pre qpdf 8.4.0 API
[[deprecated("see newer API above")]]
QPDF_DLL
void setR3EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
- qpdf_r3_print_e print, qpdf_r3_modify_e modify);
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
+ qpdf_r3_print_e print, qpdf_r3_modify_e modify);
[[deprecated("see newer API above")]]
QPDF_DLL
void setR4EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
- qpdf_r3_print_e print, qpdf_r3_modify_e modify,
- bool encrypt_metadata, bool use_aes);
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
+ qpdf_r3_print_e print, qpdf_r3_modify_e modify,
+ bool encrypt_metadata, bool use_aes);
[[deprecated("see newer API above")]]
QPDF_DLL
void setR5EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
- qpdf_r3_print_e print, qpdf_r3_modify_e modify,
- bool encrypt_metadata);
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
+ qpdf_r3_print_e print, qpdf_r3_modify_e modify,
+ bool encrypt_metadata);
[[deprecated("see newer API above")]]
QPDF_DLL
void setR6EncryptionParameters(
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
- qpdf_r3_print_e print, qpdf_r3_modify_e modify,
- bool encrypt_metadata_aes);
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
+ qpdf_r3_print_e print, qpdf_r3_modify_e modify,
+ bool encrypt_metadata_aes);
// Create linearized output. Disables qdf mode, content
// normalization, and stream prefiltering.
@@ -494,8 +494,8 @@ class QPDFWriter
private:
// flags used by unparseObject
- static int const f_stream = 1 << 0;
- static int const f_filtered = 1 << 1;
+ static int const f_stream = 1 << 0;
+ static int const f_filtered = 1 << 1;
static int const f_in_ostream = 1 << 2;
static int const f_hex_string = 1 << 3;
static int const f_no_encryption = 1 << 4;
@@ -544,14 +544,14 @@ class QPDFWriter
void writeObjectStream(QPDFObjectHandle object);
void writeObject(QPDFObjectHandle object, int object_stream_index = -1);
void writeTrailer(trailer_e which, int size,
- bool xref_stream, qpdf_offset_t prev,
+ bool xref_stream, qpdf_offset_t prev,
int linearization_pass);
bool willFilterStream(QPDFObjectHandle stream,
bool& compress_stream, bool& is_metadata,
PointerHolder<Buffer>* stream_data);
void unparseObject(QPDFObjectHandle object, int level, int flags,
- // for stream dictionaries
- size_t stream_length = 0, bool compress = false);
+ // for stream dictionaries
+ size_t stream_length = 0, bool compress = false);
void unparseChild(QPDFObjectHandle child, int level, int flags);
void initializeSpecialStreams();
void preserveObjectStreams();
@@ -559,24 +559,24 @@ class QPDFWriter
std::string getOriginalID1();
void generateID();
void interpretR3EncryptionParameters(
- std::set<int>& bits_to_clear,
- char const* user_password, char const* owner_password,
- bool allow_accessibility, bool allow_extract,
+ std::set<int>& bits_to_clear,
+ char const* user_password, char const* owner_password,
+ bool allow_accessibility, bool allow_extract,
bool allow_assemble, bool allow_annotate_and_form,
bool allow_form_filling, bool allow_modify_other,
- qpdf_r3_print_e print, qpdf_r3_modify_e modify);
+ qpdf_r3_print_e print, qpdf_r3_modify_e modify);
void disableIncompatibleEncryption(int major, int minor,
int extension_level);
void parseVersion(std::string const& version, int& major, int& minor) const;
int compareVersions(int major1, int minor1, int major2, int minor2) const;
void setEncryptionParameters(
- char const* user_password, char const* owner_password,
- int V, int R, int key_len, std::set<int>& bits_to_clear);
+ char const* user_password, char const* owner_password,
+ int V, int R, int key_len, std::set<int>& bits_to_clear);
void setEncryptionParametersInternal(
- int V, int R, int key_len, int P,
- std::string const& O, std::string const& U,
- std::string const& OE, std::string const& UE, std::string const& Perms,
- std::string const& id1, std::string const& user_password,
+ int V, int R, int key_len, int P,
+ std::string const& O, std::string const& U,
+ std::string const& OE, std::string const& UE, std::string const& Perms,
+ std::string const& id1, std::string const& user_password,
std::string const& encryption_key);
void setDataKey(int objid);
int openObject(int objid = 0);
@@ -679,8 +679,8 @@ class QPDFWriter
int encryption_V;
int encryption_R;
- std::string id1; // for /ID key of
- std::string id2; // trailer dictionary
+ std::string id1; // for /ID key of
+ std::string id2; // trailer dictionary
std::string final_pdf_version;
int final_extension_level;
std::string min_pdf_version;