summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-31 14:58:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-05 16:43:14 +0100
commit1dedb15b17a8e8bf04f248809ef48db663034254 (patch)
treee8fc086787fb7506046b8a7756a24b76e2f4bde3 /xmlsecurity/source/helper
parent4c49af256a456af48f0b29262c0b23aa1f6a9cd5 (diff)
fdo#46808, Adapt xml::crypto::SEInitializer UNO service to new style
Also create an NSSInitializer service IDL and split it's interfaces out from SEInitializer. It looks like this was the intention all along, but someone took a shortcut. Change-Id: I53ac1cb5d38b78b6718fe22c9666eae1f194a3b7
Diffstat (limited to 'xmlsecurity/source/helper')
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 163e5f600f37..ca9ef0662171 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -37,13 +37,11 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
+#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <tools/date.hxx>
#include <tools/time.hxx>
-/* SEInitializer component */
-#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
-
#define TAG_DOCUMENTSIGNATURES "document-signatures"
#define NS_DOCUMENTSIGNATURES "http://openoffice.org/2004/documentsignatures"
#define NS_DOCUMENTSIGNATURES_ODF_1_2 "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
@@ -68,7 +66,7 @@ bool XMLSignatureHelper::Init()
DBG_ASSERT( !mxSEInitializer.is(), "XMLSignatureHelper::Init - mxSEInitializer already set!" );
DBG_ASSERT( !mxSecurityContext.is(), "XMLSignatureHelper::Init - mxSecurityContext already set!" );
- ImplCreateSEInitializer();
+ mxSEInitializer = com::sun::star::xml::crypto::SEInitializer::create( mxCtx );
if ( mxSEInitializer.is() )
mxSecurityContext = mxSEInitializer->createSecurityContext( ::rtl::OUString() );
@@ -76,14 +74,6 @@ bool XMLSignatureHelper::Init()
return mxSecurityContext.is();
}
-void XMLSignatureHelper::ImplCreateSEInitializer()
-{
- rtl::OUString sSEInitializer( SEINITIALIZER_COMPONENT );
- uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- mxSEInitializer = uno::Reference< com::sun::star::xml::crypto::XSEInitializer > (
- xMCF->createInstanceWithContext( sSEInitializer, mxCtx ), uno::UNO_QUERY );
-}
-
void XMLSignatureHelper::SetStorage(
const Reference < css::embed::XStorage >& rxStorage,
::rtl::OUString sODFVersion)