Checkbox and radio form fields

This commit is contained in:
Jakub Melka
2020-05-02 18:04:25 +02:00
parent bfb26c4807
commit f604dd77b2
14 changed files with 584 additions and 23 deletions

View File

@ -45,6 +45,12 @@ QByteArray PDFObjectStorage::getDecodedStream(const PDFStream* stream) const
return PDFStreamFilterStorage::getDecodedStream(stream, std::bind(QOverload<const PDFObject&>::of(&PDFObjectStorage::getObject), this, std::placeholders::_1), getSecurityHandler());
}
bool PDFDocument::operator==(const PDFDocument& other) const
{
// Document is considered equal, if storage is equal
return m_pdfObjectStorage == other.m_pdfObjectStorage;
}
QByteArray PDFDocument::getDecodedStream(const PDFStream* stream) const
{
return m_pdfObjectStorage.getDecodedStream(stream);
@ -215,6 +221,13 @@ void PDFDocument::initInfo()
}
}
bool PDFObjectStorage::operator==(const PDFObjectStorage& other) const
{
// We compare just content. Security handler just defines encryption behavior.
return m_objects == other.m_objects &&
m_trailerDictionary == other.m_trailerDictionary;
}
const PDFObject& PDFObjectStorage::getObject(PDFObjectReference reference) const
{
if (reference.objectNumber >= 0 &&