summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-06-05 13:03:17 +0200
committerNoel Grandin <noel@peralex.com>2013-06-05 14:48:20 +0200
commit75a87d9bc25c9c74810591bbfa560b0f7184e940 (patch)
treed2befc9ad4084c9e9f5fd38aac9b06a39e9cf506 /xmlsecurity
parent6a12e13870f15df93d2627f1538f7c64ca46e9e5 (diff)
fdo#46808, Convert xml::crypto::XMLEncryptionTemplate to new style
Change-Id: I45bcb3f0f4b9998105d361dbf6a98d8f5310da52
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/framework/encryptionengine.cxx11
1 files changed, 3 insertions, 8 deletions
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 <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/lang/XMultiServiceFactory.hpp>
@@ -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<XComponentContext> & 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 );