diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-16 15:10:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-17 20:29:10 +0000 |
commit | 7ccf36d81f53abacd92f014c7f6e1c2b1e618873 (patch) | |
tree | c7d9243b4d9724cdd5a4c49d92f5cdb7edd652aa /vcl | |
parent | 1d9c6042e89c6a688b0b9392e627d8c65de63d74 (diff) |
split out inability to have nss as HAVE_FEATURE_NSS
Change-Id: Ie9fa0291117ba81529cc396f96f3f02c4a7e4d79
Reviewed-on: https://gerrit.libreoffice.org/32093
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 78d341bfd0db..7a78058d7730 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -72,7 +72,7 @@ #include "pdfwriter_impl.hxx" -#if !defined(ANDROID) && !defined(IOS) && !defined(_WIN32) +#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32) // NSS headers for PDF signing #include "nss.h" #include "cert.h" @@ -99,6 +99,7 @@ #endif #include <config_eot.h> +#include <config_features.h> #if ENABLE_EOT #include <libeot/libeot.h> @@ -108,7 +109,7 @@ using namespace vcl; static bool g_bDebugDisableCompression = getenv("VCL_DEBUG_DISABLE_PDFCOMPRESSION"); -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS // Is this length truly the maximum possible, or just a number that // seemed large enough when the author tested this (with some type of // certificates)? I suspect the latter. @@ -5184,7 +5185,7 @@ bool PDFWriterImpl::emitCatalog() } aLine.append( "\n]" ); -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS if (m_nSignatureObject != -1) aLine.append( "/SigFlags 3"); #endif @@ -5194,7 +5195,7 @@ bool PDFWriterImpl::emitCatalog() aLine.append( " 0 R" ); // NeedAppearances must not be used if PDF is signed if( m_bIsPDF_A1 -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS || ( m_nSignatureObject != -1 ) #endif ) @@ -5226,7 +5227,7 @@ bool PDFWriterImpl::emitCatalog() return true; } -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS bool PDFWriterImpl::emitSignature() { @@ -5301,7 +5302,7 @@ bool PDFWriterImpl::emitSignature() return true; } -#if !defined(ANDROID) && !defined(IOS) && !defined(_WIN32) +#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32) namespace { #if 0 @@ -6137,7 +6138,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime* time, #endif } // anonymous namespace -#endif // !defined(ANDROID) && !defined(IOS) && !defined(_WIN32) +#endif // !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32) #ifdef _WIN32 @@ -7269,7 +7270,7 @@ bool PDFWriterImpl::finalizeSignature() #endif } -#else // defined(ANDROID) || defined(IOS) +#else // defined(ANDROID) || !HAVE_FEATURE_NSS bool PDFWriter::Sign(PDFSignContext& /*rContext*/) { // Not implemented. @@ -8054,7 +8055,7 @@ bool PDFWriterImpl::emit() // needed for widget tab order sortWidgets(); -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS if( m_aContext.SignPDF ) { // sign the document @@ -8070,7 +8071,7 @@ bool PDFWriterImpl::emit() // emit catalog CHECK_RETURN( emitCatalog() ); -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS if (m_nSignatureObject != -1) // if document is signed, emit sigdict { if( !emitSignature() ) @@ -8084,7 +8085,7 @@ bool PDFWriterImpl::emit() // emit trailer CHECK_RETURN( emitTrailer() ); -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS if (m_nSignatureObject != -1) // finalize the signature { if( !finalizeSignature() ) @@ -12994,7 +12995,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa createDefaultEditAppearance( rNewWidget, rEdit ); } -#if !defined(ANDROID) && !defined(IOS) +#if !defined(ANDROID) && HAVE_FEATURE_NSS else if( rControl.getType() == PDFWriter::Signature) { sigHidden = true; |