diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 2afda7ffa7c8..bd284073bf44 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -452,6 +452,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xforms,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/crypto,\ NSSInitializer \ SEInitializer \ + XMLEncryptionTemplate \ XMLSignatureTemplate \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/dom,\ @@ -1584,7 +1585,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml,\ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/crypto,\ SecurityEnvironment \ XMLEncryption \ - XMLEncryptionTemplate \ XMLSecurityContext \ XMLSignature \ )) diff --git a/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl b/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl index efbe9b03ee8c..67b5605e3118 100644 --- a/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl +++ b/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl @@ -24,20 +24,14 @@ #ifndef __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_ #define __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_ -#include -#include #include -#include module com { module sun { module star { module xml { module crypto { /** * Service of XMLEncryptionTemplate */ -service XMLEncryptionTemplate { - interface com::sun::star::xml::crypto::XXMLEncryptionTemplate ; - interface com::sun::star::lang::XInitialization ; -} ; +service XMLEncryptionTemplate : com::sun::star::xml::crypto::XXMLEncryptionTemplate; } ; } ; } ; } ; } ; diff --git a/xmlsecurity/source/framework/encryptionengine.cxx b/xmlsecurity/source/framework/encryptionengine.cxx index e0c8fc356b10..47078acbcbf6 100644 --- a/xmlsecurity/source/framework/encryptionengine.cxx +++ b/xmlsecurity/source/framework/encryptionengine.cxx @@ -19,7 +19,7 @@ #include "encryptionengine.hxx" -#include +#include #include #include @@ -27,8 +27,6 @@ using namespace com::sun::star::uno; namespace cssxc = com::sun::star::xml::crypto; namespace cssxw = com::sun::star::xml::wrapper; -#define ENCRYPTION_TEMPLATE "com.sun.star.xml.crypto.XMLEncryptionTemplate" - EncryptionEngine::EncryptionEngine( const Reference & xContext) :m_xContext(xContext), m_nIdOfBlocker(-1) { @@ -112,11 +110,8 @@ void EncryptionEngine::tryToPerform( ) { if (checkReady()) { - const OUString sEncryptionTemplate ( ENCRYPTION_TEMPLATE ); - Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate( - m_xContext->getServiceManager()->createInstanceWithContext( sEncryptionTemplate, m_xContext ), UNO_QUERY ); - - OSL_ASSERT( xEncryptionTemplate.is() ); + Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate = + cssxc::XMLEncryptionTemplate::create( m_xContext ); Reference< cssxw::XXMLElementWrapper > xXMLElement = m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC );