diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-11-17 21:06:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-11-18 08:02:21 +0100 |
commit | d9391396434a5ad93f6796248c255b5bb2f3cba7 (patch) | |
tree | 1b9fc10e2f9c61f4fc05483040c701641de97410 /vcl/source | |
parent | c70b00820ec46035e50c7922876c5423c2f5f936 (diff) |
vcl: clean up unused PDFDocument functions
These are unused since the pdfium-based signature verification.
Change-Id: Ie15369cbd0548febd03be3ac3475036e1f46cd16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106027
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/ipdf/pdfdocument.cxx | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 911cb2381ed5..41c44bd01b57 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -180,8 +180,6 @@ bool PDFDocument::RemoveSignature(size_t nPosition) return m_aEditBuffer.good(); } -const std::vector<size_t>& PDFDocument::GetEOFs() const { return m_aEOFs; } - sal_Int32 PDFDocument::createObject() { sal_Int32 nObject = m_aXRef.size(); @@ -2163,71 +2161,6 @@ std::vector<PDFObjectElement*> PDFDocument::GetSignatureWidgets() return aRet; } -int PDFDocument::GetMDPPerm() -{ - int nRet = 3; - - std::vector<PDFObjectElement*> aSignatures = GetSignatureWidgets(); - if (aSignatures.empty()) - { - return nRet; - } - - for (const auto& pSignature : aSignatures) - { - vcl::filter::PDFObjectElement* pSig = pSignature->LookupObject("V"); - if (!pSig) - { - SAL_WARN("vcl.filter", "PDFDocument::GetMDPPerm: can't find signature object"); - continue; - } - - auto pReference = dynamic_cast<PDFArrayElement*>(pSig->Lookup("Reference")); - if (!pReference || pReference->GetElements().empty()) - { - continue; - } - - auto pFirstReference = dynamic_cast<PDFDictionaryElement*>(pReference->GetElements()[0]); - if (!pFirstReference) - { - SAL_WARN("vcl.filter", - "PDFDocument::GetMDPPerm: reference array doesn't contain a dictionary"); - continue; - } - - PDFElement* pTransformParams = pFirstReference->LookupElement("TransformParams"); - auto pTransformParamsDict = dynamic_cast<PDFDictionaryElement*>(pTransformParams); - if (!pTransformParamsDict) - { - auto pTransformParamsRef = dynamic_cast<PDFReferenceElement*>(pTransformParams); - if (pTransformParamsRef) - { - PDFObjectElement* pTransformParamsObj = pTransformParamsRef->LookupObject(); - if (pTransformParamsObj) - { - pTransformParamsDict = pTransformParamsObj->GetDictionary(); - } - } - } - - if (!pTransformParamsDict) - { - continue; - } - - auto pP = dynamic_cast<PDFNumberElement*>(pTransformParamsDict->LookupElement("P")); - if (!pP) - { - return 2; - } - - return pP->GetValue(); - } - - return nRet; -} - std::vector<unsigned char> PDFDocument::DecodeHexString(PDFHexStringElement const* pElement) { return svl::crypto::DecodeHexString(pElement->GetValue()); |