[Libreoffice-commits] core.git: desktop/source vcl/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 24 08:13:17 UTC 2017
desktop/source/lib/lokclipboard.hxx | 2 +-
vcl/source/gdi/pdfwriter_impl.cxx | 30 ++++++++++++------------------
2 files changed, 13 insertions(+), 19 deletions(-)
New commits:
commit ad5bf6b72c89caf0ed7110e4a84e2d6bf1807a24
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 24 08:04:31 2017 +0100
vcl: clean up ANDROID ifdefs in pdfwriter_impl
HAVE_FEATURE_NSS is already 0 on Android, so an "&& !defined(ANDROID)"
is redundant.
Change-Id: I275ed71d9ebdb56878d980a23c4480e41b28bd6b
Reviewed-on: https://gerrit.libreoffice.org/35614
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/desktop/source/lib/lokclipboard.hxx b/desktop/source/lib/lokclipboard.hxx
index 000b96147a6e..11c676500043 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -24,7 +24,7 @@ public:
css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL getContents() override;
void SAL_CALL setContents(const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
- const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner) override;
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner) override;
OUString SAL_CALL getName() override;
};
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 597b6996d6fe..f9e26a785c5b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -83,7 +83,7 @@
#include "pdfwriter_impl.hxx"
-#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
+#if HAVE_FEATURE_NSS && !defined(_WIN32)
// NSS headers for PDF signing
#include "nss.h"
#include "cert.h"
@@ -121,7 +121,7 @@ using namespace::com::sun::star;
static bool g_bDebugDisableCompression = getenv("VCL_DEBUG_DISABLE_PDFCOMPRESSION");
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if 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.
@@ -5283,7 +5283,7 @@ bool PDFWriterImpl::emitCatalog()
}
aLine.append( "\n]" );
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
if (m_nSignatureObject != -1)
aLine.append( "/SigFlags 3");
#endif
@@ -5293,7 +5293,7 @@ bool PDFWriterImpl::emitCatalog()
aLine.append( " 0 R" );
// NeedAppearances must not be used if PDF is signed
if( m_bIsPDF_A1
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
|| ( m_nSignatureObject != -1 )
#endif
)
@@ -5324,7 +5324,7 @@ bool PDFWriterImpl::emitCatalog()
return true;
}
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
bool PDFWriterImpl::emitSignature()
{
@@ -5399,12 +5399,9 @@ bool PDFWriterImpl::emitSignature()
return true;
}
-#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
+#if HAVE_FEATURE_NSS && !defined(_WIN32)
namespace {
-#if 0
-}
-#endif
char *PDFSigningPKCS7PasswordCallback(PK11SlotInfo * /*slot*/, PRBool /*retry*/, void *arg)
{
@@ -6230,12 +6227,9 @@ NSSCMSMessage *CreateCMSMessage(PRTime* time,
return result;
}
-#if 0
-{
-#endif
} // anonymous namespace
-#endif // !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
+#endif // HAVE_FEATURE_NSS && !defined(_WIN32)
#ifdef _WIN32
@@ -7371,7 +7365,7 @@ bool PDFWriterImpl::finalizeSignature()
#endif
}
-#else // defined(ANDROID) || !HAVE_FEATURE_NSS
+#else // !HAVE_FEATURE_NSS
bool PDFWriter::Sign(PDFSignContext& /*rContext*/)
{
// Not implemented.
@@ -8129,7 +8123,7 @@ bool PDFWriterImpl::emit()
// needed for widget tab order
sortWidgets();
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
if( m_aContext.SignPDF )
{
// sign the document
@@ -8145,7 +8139,7 @@ bool PDFWriterImpl::emit()
// emit catalog
CHECK_RETURN( emitCatalog() );
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
if (m_nSignatureObject != -1) // if document is signed, emit sigdict
{
if( !emitSignature() )
@@ -8159,7 +8153,7 @@ bool PDFWriterImpl::emit()
// emit trailer
CHECK_RETURN( emitTrailer() );
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
if (m_nSignatureObject != -1) // finalize the signature
{
if( !finalizeSignature() )
@@ -13319,7 +13313,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
createDefaultEditAppearance( rNewWidget, rEdit );
}
-#if !defined(ANDROID) && HAVE_FEATURE_NSS
+#if HAVE_FEATURE_NSS
else if( rControl.getType() == PDFWriter::Signature)
{
sigHidden = true;
More information about the Libreoffice-commits
mailing list