Merge remote-tracking branch 'origin/Applications/19.04'

remotes/origin/gsoc2019_animatedpdf
Albert Astals Cid 7 years ago
commit aa3813abf6
  1. 9
      generators/poppler/CMakeLists.txt
  2. 3
      generators/poppler/config-okular-poppler.h.cmake
  3. 4
      generators/poppler/formfields.cpp
  4. 20
      generators/poppler/pdfsignatureutils.cpp

@ -51,6 +51,15 @@ int main()
}
" HAVE_POPPLER_0_53)
check_cxx_source_compiles("
#include <poppler-qt5.h>
#include <poppler-form.h>
int main()
{
auto s = &Poppler::SignatureValidationInfo::signsTotalDocument;
}
" HAVE_POPPLER_0_58)
check_cxx_source_compiles("
#include <poppler-qt5.h>
int main()

@ -19,6 +19,9 @@
/* Defined if we have the 0.53 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_53 1
/* Defined if we have the 0.58 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_58 1
/* Defined if we have the 0.60 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_60 1

@ -429,6 +429,7 @@ bool PopplerFormFieldSignature::isVisible() const
PopplerFormFieldSignature::SignatureType PopplerFormFieldSignature::signatureType() const
{
#ifdef HAVE_POPPLER_0_58
switch ( m_field->signatureType() )
{
case Poppler::FormFieldSignature::AdbePkcs7sha1:
@ -440,6 +441,9 @@ PopplerFormFieldSignature::SignatureType PopplerFormFieldSignature::signatureTyp
default:
return Okular::FormFieldSignature::UnknownType;
}
#else
return Okular::FormFieldSignature::UnknownType;
#endif
}
const Okular::SignatureInfo &PopplerFormFieldSignature::signatureInfo() const

@ -193,6 +193,7 @@ PopplerSignatureInfo::CertificateStatus PopplerSignatureInfo::certificateStatus(
PopplerSignatureInfo::HashAlgorithm PopplerSignatureInfo::hashAlgorithm() const
{
#ifdef HAVE_POPPLER_0_58
switch ( m_info.hashAlgorithm() )
{
case Poppler::SignatureValidationInfo::HashAlgorithmMd2:
@ -212,6 +213,9 @@ PopplerSignatureInfo::HashAlgorithm PopplerSignatureInfo::hashAlgorithm() const
default:
return HashAlgorithmUnknown;
}
#else
return HashAlgorithmUnknown;
#endif
}
QString PopplerSignatureInfo::signerName() const
@ -221,7 +225,11 @@ QString PopplerSignatureInfo::signerName() const
QString PopplerSignatureInfo::signerSubjectDN() const
{
#ifdef HAVE_POPPLER_0_58
return m_info.signerSubjectDN();
#else
return {};
#endif
}
QString PopplerSignatureInfo::location() const
@ -249,17 +257,29 @@ QDateTime PopplerSignatureInfo::signingTime() const
QByteArray PopplerSignatureInfo::signature() const
{
#ifdef HAVE_POPPLER_0_58
return m_info.signature();
#else
return {};
#endif
}
QList<qint64> PopplerSignatureInfo::signedRangeBounds() const
{
#ifdef HAVE_POPPLER_0_58
return m_info.signedRangeBounds();
#else
return {};
#endif
}
bool PopplerSignatureInfo::signsTotalDocument() const
{
#ifdef HAVE_POPPLER_0_58
return m_info.signsTotalDocument();
#else
return false;
#endif
}
const Okular::CertificateInfo &PopplerSignatureInfo::certificateInfo() const

Loading…
Cancel
Save