From f9a14f3d021d78bded54cde0462669ea10d7c546 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 21 Jun 2017 21:32:38 +0200 Subject: gpg4libre: fix build for windows and mac Change-Id: I3e36b22cefba4c6195bcf8b85b3f7a2cc101b845 --- xmlsecurity/source/helper/xsecctl.cxx | 6 +++++- xmlsecurity/source/xmlsec/xsec_xmlsec.cxx | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'xmlsecurity/source') diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 0df6c08f29ef..795745fe851b 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -22,7 +22,9 @@ #include "documentsignaturehelper.hxx" #include "framework/saxeventkeeperimpl.hxx" #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" -#include "gpg/xmlsignature_gpgimpl.hxx" +#if !defined(MACOSX) && !defined(WNT) +# include "gpg/xmlsignature_gpgimpl.hxx" +#endif #include #include @@ -125,10 +127,12 @@ void XSecController::createXSecComponent( ) cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); +#if !defined(MACOSX) && !defined(WNT) uno::Reference< lang::XServiceInfo > xServiceInfo( m_xSecurityContext, cssu::UNO_QUERY ); if (xServiceInfo->getImplementationName() == "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl") m_xXMLSignature.set(new XMLSignature_GpgImpl()); else // xmlsec or mscrypt +#endif m_xXMLSignature.set(xMCF->createInstanceWithContext("com.sun.star.xml.crypto.XMLSignature", mxCtx), cssu::UNO_QUERY); bool bSuccess = m_xXMLSignature.is(); diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx index da1ecf905d4a..b480b90a9235 100644 --- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx +++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx @@ -26,7 +26,10 @@ #include "xmlsec/xmlelementwrapper_xmlsecimpl.hxx" #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" #include "xsec_xmlsec.hxx" -#include "gpg/xmlsignature_gpgimpl.hxx" + +#if !defined(MACOSX) && !defined(WNT) +# include "gpg/xmlsignature_gpgimpl.hxx" +#endif using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -41,11 +44,14 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_ Reference< XInterface > xFactory ; if( pImplName != nullptr ) { +#if !defined(MACOSX) && !defined(WNT) if( XMLSignature_GpgImpl::impl_getImplementationName().equalsAscii( pImplName ) ) { xFactory = XMLSignature_GpgImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ; } - else if( XMLElementWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) ) + else +#endif + if( XMLElementWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) ) { xFactory = cppu::createSingleComponentFactory( XMLElementWrapper_XmlSecImpl_createInstance, -- cgit