summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-08-18 12:15:12 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-08-18 12:15:12 +0000
commit42e0dea44ec23a95dd93d445c163dc3dec163bda (patch)
tree92ed4cfb4f998c1b2752306613e4758259b53fc0
parenta42be178fd68becc9bdfe78387259f44914e4963 (diff)
INTEGRATION: CWS cmcfixes48 (1.11.22); FILE MERGED
2008/08/01 13:54:32 cmc 1.11.22.1: #i92247# remove duplication of object code, link only the single library to libxmlsec1, and update some stuff to new api
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx58
-rw-r--r--xmlsecurity/source/helper/xsecctl.hxx20
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx7
-rw-r--r--xmlsecurity/source/xmlsec/makefile.mk3
4 files changed, 18 insertions, 70 deletions
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index d19942b17..028867b9a 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xsecctl.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -65,8 +65,9 @@ const sal_Int8 XML_MAXDIGITSCOUNT_DATETIME = 6;
/* string for package protocol */
#define PACKAGEPROTOCOL "vnd.sun.star.Package:"
-XSecController::XSecController( )
- :m_nNextSecurityId(1),
+XSecController::XSecController( const cssu::Reference<cssu::XComponentContext>& rxCtx )
+ :mxCtx(rxCtx),
+ m_nNextSecurityId(1),
m_bIsSAXEventKeeperConnected(false),
m_nStatusOfSecurityComponents(UNINITIALIZED),
m_bIsSAXEventKeeperSticky(false),
@@ -360,9 +361,11 @@ void XSecController::createXSecComponent( )
m_xXMLSignature = NULL;
m_xXMLDocumentWrapper = NULL;
m_xSAXEventKeeper = NULL;
+
+ cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
m_xXMLSignature = cssu::Reference< cssxc::XXMLSignature >(
- mxMSF->createInstance( sXMLSignature ),
+ xMCF->createInstanceWithContext( sXMLSignature, mxCtx ),
cssu::UNO_QUERY );
bool bSuccess = (0!=m_xXMLSignature.is());
@@ -372,7 +375,7 @@ void XSecController::createXSecComponent( )
*/
{
m_xXMLDocumentWrapper = cssu::Reference< cssxw::XXMLDocumentWrapper >(
- mxMSF->createInstance( sXMLDocument ),
+ xMCF->createInstanceWithContext( sXMLDocument, mxCtx ),
cssu::UNO_QUERY );
}
@@ -383,7 +386,7 @@ void XSecController::createXSecComponent( )
*/
{
m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >(
- mxMSF->createInstance( sSAXEventKeeper ),
+ xMCF->createInstanceWithContext( sSAXEventKeeper, mxCtx ),
cssu::UNO_QUERY );
}
@@ -769,49 +772,6 @@ sal_Int32 XSecController::getFastPropertyIndex(sal_Int32 nHandle) const
* public methods
*/
-void XSecController::setFactory( const cssu::Reference<cssl::XMultiServiceFactory>& rxMSF)
-/****** XSecController/setFactory *********************************************
- *
- * NAME
- * setFactory -- configures the service factory component.
- *
- * SYNOPSIS
- * setFactory( rxMSF );
- *
- * FUNCTION
- * See NAME.
- *
- * INPUTS
- * rxMSF - the service factory component
- *
- * RESULT
- * empty
- *
- * HISTORY
- * 05.01.2004 - implemented
- *
- * AUTHOR
- * Michael Mi
- * Email: michael.mi@sun.com
- ******************************************************************************/
-{
- mxMSF = rxMSF;
-}
-
-#if 0
-void XSecController::setSignatureCreationResultListener(
- const cssu::Reference< cssxc::sax::XSignatureCreationResultListener >& xSignatureCreationResultListener)
-{
- m_xSignatureCreationResultListener = xSignatureCreationResultListener;
-}
-
-void XSecController::setSignatureVerifyResultListener(
- const cssu::Reference< cssxc::sax::XSignatureVerifyResultListener >& xSignatureVerifyResultListener)
-{
- m_xSignatureVerifyResultListener = xSignatureVerifyResultListener;
-}
-#endif
-
sal_Int32 XSecController::getNewSecurityId( )
{
sal_Int32 nId = m_nNextSecurityId;
diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx
index f2131d0a2..99b27a37e 100644
--- a/xmlsecurity/source/helper/xsecctl.hxx
+++ b/xmlsecurity/source/helper/xsecctl.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xsecctl.hxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -33,6 +33,7 @@
#include <xmlsecurity/sigstruct.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -192,8 +193,7 @@ class XSecController : public cppu::WeakImplHelper4
friend class XSecParser;
private:
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory> mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext> mxCtx;
/*
* used to buffer SAX events
@@ -428,21 +428,9 @@ private:
sal_Int32 nSecurityId );
public:
- XSecController();
+ XSecController(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& rxCtx);
~XSecController();
- /*
- * Common methods
- */
- void setFactory( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory>& rxMSF);
-#if 0
- void setSignatureCreationResultListener( const com::sun::star::uno::Reference<
- com::sun::star::xml::crypto::sax::XSignatureCreationResultListener >& xSignatureCreationResultListener);
- void setSignatureVerifyResultListener( const com::sun::star::uno::Reference<
- com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener >& xSignatureVerifyResultListener);
-#endif
-
sal_Int32 getNewSecurityId( );
void startMission( const com::sun::star::uno::Reference<
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index d9c240f8e..56913ba15 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xsecsign.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -86,9 +86,10 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
/*
* create a SignatureCreator
*/
+ cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
- mxMSF->createInstance(
- rtl::OUString::createFromAscii(SIGNATURECREATOR_COMPONENT)),
+ xMCF->createInstanceWithContext(
+ rtl::OUString::createFromAscii(SIGNATURECREATOR_COMPONENT), mxCtx),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/xmlsec/makefile.mk b/xmlsecurity/source/xmlsec/makefile.mk
index d8479aa6b..a989c1939 100644
--- a/xmlsecurity/source/xmlsec/makefile.mk
+++ b/xmlsecurity/source/xmlsec/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.11 $
+# $Revision: 1.12 $
#
# This file is part of OpenOffice.org.
#
@@ -57,7 +57,6 @@ CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
# --- Files --------------------------------------------------------
SLOFILES = \
- $(SLO)$/baseencoding.obj \
$(SLO)$/biginteger.obj \
$(SLO)$/certvalidity.obj \
$(SLO)$/saxhelper.obj \