Some minor bugfixing

This commit is contained in:
Jakub Melka 2020-07-07 17:19:42 +02:00
parent 326e5567f7
commit 87d4935489
2 changed files with 7 additions and 4 deletions

View File

@ -272,9 +272,12 @@ PDFDocument PDFDocumentReader::readFromBuffer(const QByteArray& buffer)
}; };
// Now, we are ready to scan all objects // Now, we are ready to scan all objects
progressStart(occupiedEntries.size(), PDFTranslationContext::tr("Reading contents of document...")); if (!occupiedEntries.empty())
PDFExecutionPolicy::execute(PDFExecutionPolicy::Scope::Unknown, occupiedEntries.cbegin(), occupiedEntries.cend(), processEntry); {
progressFinish(); progressStart(occupiedEntries.size(), PDFTranslationContext::tr("Reading contents of document..."));
PDFExecutionPolicy::execute(PDFExecutionPolicy::Scope::Unknown, occupiedEntries.cbegin(), occupiedEntries.cend(), processEntry);
progressFinish();
}
if (m_result != Result::OK) if (m_result != Result::OK)
{ {

View File

@ -116,7 +116,7 @@ PDFSignature PDFSignature::parse(const PDFObjectStorage* storage, PDFObject obje
result.m_byteRanges.push_back(byteRange); result.m_byteRanges.push_back(byteRange);
} }
result.m_references = loader.readObjectList<PDFSignatureReference>(dictionary->get("References")); result.m_references = loader.readObjectList<PDFSignatureReference>(dictionary->get("Reference"));
std::vector<PDFInteger> changes = loader.readIntegerArrayFromDictionary(dictionary, "Changes"); std::vector<PDFInteger> changes = loader.readIntegerArrayFromDictionary(dictionary, "Changes");
if (changes.size() == 3) if (changes.size() == 3)