mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Save document with encryption
This commit is contained in:
@@ -291,6 +291,15 @@ const PDFObject& PDFDictionary::get(const PDFInplaceOrMemoryString& key) const
|
||||
}
|
||||
}
|
||||
|
||||
void PDFDictionary::removeEntry(const char* key)
|
||||
{
|
||||
auto it = find(key);
|
||||
if (it != m_dictionary.end())
|
||||
{
|
||||
m_dictionary.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void PDFDictionary::setEntry(const PDFInplaceOrMemoryString& key, PDFObject&& value)
|
||||
{
|
||||
auto it = find(key);
|
||||
@@ -327,7 +336,7 @@ std::vector<PDFDictionary::DictionaryEntry>::iterator PDFDictionary::find(const
|
||||
|
||||
std::vector<PDFDictionary::DictionaryEntry>::const_iterator PDFDictionary::find(const char* key) const
|
||||
{
|
||||
return std::find_if(m_dictionary.cbegin(), m_dictionary.cend(), [&key](const DictionaryEntry& entry) { return entry.first == key; });
|
||||
return std::find_if(m_dictionary.cbegin(), m_dictionary.cend(), [key](const DictionaryEntry& entry) { return entry.first == key; });
|
||||
}
|
||||
|
||||
std::vector<PDFDictionary::DictionaryEntry>::const_iterator PDFDictionary::find(const PDFInplaceOrMemoryString& key) const
|
||||
@@ -340,6 +349,11 @@ std::vector<PDFDictionary::DictionaryEntry>::iterator PDFDictionary::find(const
|
||||
return std::find_if(m_dictionary.begin(), m_dictionary.end(), [&key](const DictionaryEntry& entry) { return entry.first == key; });
|
||||
}
|
||||
|
||||
std::vector<PDFDictionary::DictionaryEntry>::iterator PDFDictionary::find(const char* key)
|
||||
{
|
||||
return std::find_if(m_dictionary.begin(), m_dictionary.end(), [key](const DictionaryEntry& entry) { return entry.first == key; });
|
||||
}
|
||||
|
||||
bool PDFStream::equals(const PDFObjectContent* other) const
|
||||
{
|
||||
Q_ASSERT(dynamic_cast<const PDFStream*>(other));
|
||||
|
Reference in New Issue
Block a user