Kaydet (Commit) 75a87d9b authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert xml::crypto::XMLEncryptionTemplate to new style

Change-Id: I45bcb3f0f4b9998105d361dbf6a98d8f5310da52
üst 6a12e138
...@@ -452,6 +452,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xforms,\ ...@@ -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,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/crypto,\
NSSInitializer \ NSSInitializer \
SEInitializer \ SEInitializer \
XMLEncryptionTemplate \
XMLSignatureTemplate \ XMLSignatureTemplate \
)) ))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/dom,\ $(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,\ ...@@ -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,\ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/crypto,\
SecurityEnvironment \ SecurityEnvironment \
XMLEncryption \ XMLEncryption \
XMLEncryptionTemplate \
XMLSecurityContext \ XMLSecurityContext \
XMLSignature \ XMLSignature \
)) ))
......
...@@ -24,20 +24,14 @@ ...@@ -24,20 +24,14 @@
#ifndef __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_ #ifndef __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_
#define __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_ #define __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/uno/Exception.idl>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl> #include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl>
#include <com/sun/star/lang/XInitialization.idl>
module com { module sun { module star { module xml { module crypto { module com { module sun { module star { module xml { module crypto {
/** /**
* Service of XMLEncryptionTemplate * Service of XMLEncryptionTemplate
*/ */
service XMLEncryptionTemplate { service XMLEncryptionTemplate : com::sun::star::xml::crypto::XXMLEncryptionTemplate;
interface com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
interface com::sun::star::lang::XInitialization ;
} ;
} ; } ; } ; } ; } ; } ; } ; } ; } ; } ;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "encryptionengine.hxx" #include "encryptionengine.hxx"
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp> #include <com/sun/star/xml/crypto/XMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp> #include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
...@@ -27,8 +27,6 @@ using namespace com::sun::star::uno; ...@@ -27,8 +27,6 @@ using namespace com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto; namespace cssxc = com::sun::star::xml::crypto;
namespace cssxw = com::sun::star::xml::wrapper; namespace cssxw = com::sun::star::xml::wrapper;
#define ENCRYPTION_TEMPLATE "com.sun.star.xml.crypto.XMLEncryptionTemplate"
EncryptionEngine::EncryptionEngine( const Reference<XComponentContext> & xContext) EncryptionEngine::EncryptionEngine( const Reference<XComponentContext> & xContext)
:m_xContext(xContext), m_nIdOfBlocker(-1) :m_xContext(xContext), m_nIdOfBlocker(-1)
{ {
...@@ -112,11 +110,8 @@ void EncryptionEngine::tryToPerform( ) ...@@ -112,11 +110,8 @@ void EncryptionEngine::tryToPerform( )
{ {
if (checkReady()) if (checkReady())
{ {
const OUString sEncryptionTemplate ( ENCRYPTION_TEMPLATE ); Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate =
Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate( cssxc::XMLEncryptionTemplate::create( m_xContext );
m_xContext->getServiceManager()->createInstanceWithContext( sEncryptionTemplate, m_xContext ), UNO_QUERY );
OSL_ASSERT( xEncryptionTemplate.is() );
Reference< cssxw::XXMLElementWrapper > xXMLElement Reference< cssxw::XXMLElementWrapper > xXMLElement
= m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC ); = m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment