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
commit352f58eb95d39f58af09f940eb8f42c7af22c1fe (patch)
treeddf2637d8774f9461609019c005972ddb1edbdf3
parent5cbdf5aa254ae54fd31579e10b2405db09878220 (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 9c806aaf7959..159227d43fcc 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),
@@ -361,8 +362,10 @@ void XSecController::createXSecComponent( )
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 1bffe5cbcf02..344d41bc01ad 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 fdbc937e63d2..2c2883cedda1 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 d8479aa6bcda..a989c19396cf 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 \