fdo#46808, Convert XMLSignatureTemplate service to new style

Change-Id: I80530f84ad5a86eccc794f9ddd14f939d093a20d
This commit is contained in:
Noel Grandin 2013-06-05 11:56:40 +02:00
parent 73e686725e
commit 6a12e13870
3 changed files with 4 additions and 15 deletions

View File

@ -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 \

View File

@ -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 ;
} ; } ; } ; } ; } ;

View File

@ -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 );