diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-05 11:56:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-05 14:48:20 +0200 |
commit | 6a12e13870f15df93d2627f1538f7c64ca46e9e5 (patch) | |
tree | 724896fa1467ec3b9b1a6244ca03d0c0957d6903 | |
parent | 73e686725e734c2bb576aefa2bb514d7b5f9a13c (diff) |
fdo#46808, Convert XMLSignatureTemplate service to new style
Change-Id: I80530f84ad5a86eccc794f9ddd14f939d093a20d
-rw-r--r-- | offapi/UnoApi_offapi.mk | 2 | ||||
-rw-r--r-- | offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl | 8 | ||||
-rw-r--r-- | xmlsecurity/source/framework/signatureengine.cxx | 9 |
3 files changed, 4 insertions, 15 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 90b05ef81e40..2afda7ffa7c8 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 \ + XMLSignatureTemplate \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/dom,\ DocumentBuilder \ @@ -1586,7 +1587,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/cry XMLEncryptionTemplate \ XMLSecurityContext \ XMLSignature \ - XMLSignatureTemplate \ )) $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/crypto/sax,\ Decryptor \ diff --git a/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl b/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl index 08752cec62e5..6789af9a3592 100644 --- a/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl +++ b/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl @@ -24,20 +24,14 @@ #ifndef __com_sun_star_xml_crypto_xmlsignaturetemplate_idl_ #define __com_sun_star_xml_crypto_xmlsignaturetemplate_idl_ -#include <com/sun/star/uno/XInterface.idl> -#include <com/sun/star/uno/Exception.idl> #include <com/sun/star/xml/crypto/XXMLSignatureTemplate.idl> -#include <com/sun/star/lang/XInitialization.idl> module com { module sun { module star { module xml { module crypto { /** * Service of XMLSignatureTemplate */ -service XMLSignatureTemplate { - interface com::sun::star::xml::crypto::XXMLSignatureTemplate ; - interface com::sun::star::lang::XInitialization ; -} ; +service XMLSignatureTemplate : com::sun::star::xml::crypto::XXMLSignatureTemplate ; } ; } ; } ; } ; } ; diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx index e3b462879e9d..e289b24a44cc 100644 --- a/xmlsecurity/source/framework/signatureengine.cxx +++ b/xmlsecurity/source/framework/signatureengine.cxx @@ -19,7 +19,7 @@ #include "signatureengine.hxx" -#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp> +#include <com/sun/star/xml/crypto/XMLSignatureTemplate.hpp> #include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -29,8 +29,6 @@ namespace cssl = com::sun::star::lang; namespace cssxc = com::sun::star::xml::crypto; namespace cssxw = com::sun::star::xml::wrapper; -#define SIGNATURE_TEMPLATE "com.sun.star.xml.crypto.XMLSignatureTemplate" - SignatureEngine::SignatureEngine( const Reference<XComponentContext> & xContext) : m_xContext(xContext), m_nTotalReferenceNumber(-1) { @@ -114,11 +112,8 @@ void SignatureEngine::tryToPerform( ) { if (checkReady()) { - const OUString ouSignatureTemplate ( SIGNATURE_TEMPLATE ); cssu::Reference < cssxc::XXMLSignatureTemplate > - xSignatureTemplate( m_xContext->getServiceManager()->createInstanceWithContext( ouSignatureTemplate, m_xContext ), cssu::UNO_QUERY ); - - OSL_ASSERT( xSignatureTemplate.is() ); + xSignatureTemplate = cssxc::XMLSignatureTemplate::create( m_xContext ); cssu::Reference< cssxw::XXMLElementWrapper > xXMLElement = m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC ); |