mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibPDF: Rename m_disable_encryption to m_enable_encryption
Double negation is confusing. No behavior change.
This commit is contained in:
parent
92d2895057
commit
63670f27de
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ namespace PDF {
|
|||
PDFErrorOr<Vector<Operator>> Parser::parse_operators(Document* document, ReadonlyBytes bytes)
|
||||
{
|
||||
Parser parser(document, bytes);
|
||||
parser.m_disable_encryption = true;
|
||||
parser.m_enable_encryption = false;
|
||||
return parser.parse_operators();
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ NonnullRefPtr<StringObject> Parser::parse_string()
|
|||
|
||||
auto string_object = make_object<StringObject>(string, is_binary_string);
|
||||
|
||||
if (m_document->security_handler() && !m_disable_encryption)
|
||||
if (m_document->security_handler() && m_enable_encryption)
|
||||
m_document->security_handler()->decrypt(string_object, m_current_reference_stack.last());
|
||||
|
||||
auto unencrypted_string = string_object->string();
|
||||
|
@ -471,7 +471,7 @@ PDFErrorOr<NonnullRefPtr<StreamObject>> Parser::parse_stream(NonnullRefPtr<DictO
|
|||
|
||||
auto stream_object = make_object<StreamObject>(dict, MUST(ByteBuffer::copy(bytes)));
|
||||
|
||||
if (m_document->security_handler() && !m_disable_encryption)
|
||||
if (m_document->security_handler() && m_enable_encryption)
|
||||
m_document->security_handler()->decrypt(stream_object, m_current_reference_stack.last());
|
||||
|
||||
if (dict->contains(CommonNames::Filter)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue