diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-11-18 21:10:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-11-19 09:03:46 +0100 |
commit | 728bfa1879da097b65fd39b1e63c52478a913af0 (patch) | |
tree | 5bcc0a7ba585771f8c3100f81d0761793e7602a2 /xmlsecurity | |
parent | bcfd9f8f166aec58ee92642e8e70dc5a94a3119f (diff) |
pdfium: add signature and trailer end getter wrappers
So PDFiumDocument::getPointer() can be retired.
Change-Id: I77c34c3e263bd6f39e06e50f621f2eaff804c716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106079
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/pdfsignaturehelper.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx index 6b8eefef7099..6e0f1cfb176b 100644 --- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx +++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx @@ -472,7 +472,7 @@ bool PDFSignatureHelper::ReadAndVerifySignatureSvStream(SvStream& rStream) return false; } - int nSignatureCount = FPDF_GetSignatureCount(pPdfDocument->getPointer()); + int nSignatureCount = pPdfDocument->getSignatureCount(); if (nSignatureCount <= 0) { return true; @@ -480,7 +480,7 @@ bool PDFSignatureHelper::ReadAndVerifySignatureSvStream(SvStream& rStream) std::vector<Signature> aSignatures(nSignatureCount); for (int i = 0; i < nSignatureCount; ++i) { - FPDF_SIGNATURE pSignature = FPDF_GetSignatureObject(pPdfDocument->getPointer(), i); + FPDF_SIGNATURE pSignature = pPdfDocument->getSignature(i); std::vector<std::pair<size_t, size_t>> aByteRanges; GetByteRangesFromPDF(pSignature, aByteRanges); aSignatures[i] = Signature{ pSignature, aByteRanges }; @@ -496,9 +496,7 @@ bool PDFSignatureHelper::ReadAndVerifySignatureSvStream(SvStream& rStream) } } - int nNumTrailers = FPDF_GetTrailerEnds(pPdfDocument->getPointer(), nullptr, 0); - std::vector<unsigned int> aTrailerEnds(nNumTrailers); - FPDF_GetTrailerEnds(pPdfDocument->getPointer(), aTrailerEnds.data(), aTrailerEnds.size()); + std::vector<unsigned int> aTrailerEnds = pPdfDocument->getTrailerEnds(); m_aSignatureInfos.clear(); |