summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-05 13:26:24 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 13:32:17 +0200
commit9e8ff13eb2405f7e3dcb4f90cb38e9e4b1da2bd5 (patch)
treeea4cd1922080d73b82a5b4bd4796d6190430f3fa /xmlsecurity
parent281296330735158d6265e0b146b5d5301f6e610e (diff)
use uno::Reference::set method instead of assignment
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx4
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx6
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx6
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx2
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/xsec_nss.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx2
-rw-r--r--xmlsecurity/workben/signaturetest.cxx2
11 files changed, 16 insertions, 19 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 1b01baa62bfa..9ce81d68984d 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -210,7 +210,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
{
Reference< io::XStream > xStream;
if ( xSignStream.is() )
- xStream = Reference< io::XStream >( xSignStream, UNO_QUERY );
+ xStream.set( xSignStream, UNO_QUERY );
return ImplViewSignatures( rxStorage, xStream, eMode, bReadOnly );
}
@@ -269,7 +269,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
{
aStreamHelper = DocumentSignatureHelper::OpenSignatureStream( rxStorage, embed::ElementModes::READ, eMode );
if ( aStreamHelper.xSignatureStream.is() )
- xInputStream = Reference< io::XInputStream >( aStreamHelper.xSignatureStream, UNO_QUERY );
+ xInputStream.set( aStreamHelper.xSignatureStream, UNO_QUERY );
}
if ( !xInputStream.is() )
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ba2c30c622cf..a1e0ce5e2c2a 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -780,7 +780,7 @@ SignatureStreamHelper DigitalSignaturesDialog::ImplOpenSignatureStream(
if (nStreamOpenMode & css::embed::ElementModes::TRUNCATE)
{
//We write always into a new temporary stream.
- mxTempSignatureStream = Reference < css::io::XStream >(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW);
+ mxTempSignatureStream.set(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW);
aHelper.xSignatureStream = mxTempSignatureStream;
}
else
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 666063aea839..69a5ecd9188b 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -1341,10 +1341,8 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >&
OSL_ASSERT(aArguments.getLength() == 1);
aArguments[0] >>= m_xXMLDocument;
- m_xDocumentHandler = cssu::Reference< cssxs::XDocumentHandler >(
- m_xXMLDocument, cssu::UNO_QUERY );
- m_xCompressedDocumentHandler = cssu::Reference< cssxcsax::XCompressedDocumentHandler >(
- m_xXMLDocument, cssu::UNO_QUERY );
+ m_xDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY );
+ m_xCompressedDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY );
m_pRootBufferNode = new BufferNode(m_xXMLDocument->getCurrentElement());
m_pCurrentBufferNode = m_pRootBufferNode;
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 774645f5975d..666b67bc013d 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -148,7 +148,7 @@ void XSecController::createXSecComponent( )
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- m_xXMLSignature = cssu::Reference< cssxc::XXMLSignature >(
+ m_xXMLSignature.set(
xMCF->createInstanceWithContext( sXMLSignature, mxCtx ),
cssu::UNO_QUERY );
@@ -158,7 +158,7 @@ void XSecController::createXSecComponent( )
* XMLSignature created successfully.
*/
{
- m_xXMLDocumentWrapper = cssu::Reference< cssxw::XXMLDocumentWrapper >(
+ m_xXMLDocumentWrapper.set(
xMCF->createInstanceWithContext( sXMLDocument, mxCtx ),
cssu::UNO_QUERY );
}
@@ -169,7 +169,7 @@ void XSecController::createXSecComponent( )
* XMLDocumentWrapper created successfully.
*/
{
- m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >(
+ m_xSAXEventKeeper.set(
xMCF->createInstanceWithContext( sSAXEventKeeper, mxCtx ),
cssu::UNO_QUERY );
}
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index e37836ffd58c..c1a7b091e122 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -74,7 +74,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
* create a SignatureCreator
*/
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
+ xReferenceResolvedListener.set(
xMCF->createInstanceWithContext(SIGNATURECREATOR_COMPONENT, mxCtx),
cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 86663896dea6..325279f5da95 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -60,7 +60,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
* create a SignatureVerifier
*/
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
+ xReferenceResolvedListener.set(
xMCF->createInstanceWithContext(SIGNATUREVERIFIER_COMPONENT, mxCtx),
cssu::UNO_QUERY);
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
index 3af07cfbbfa3..ece35be08141 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
@@ -54,7 +54,7 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p
} else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
xFactory = XMLEncryption_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
} else if( SEInitializer_MSCryptImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
SEInitializer_MSCryptImpl_createInstance, SEInitializer_MSCryptImpl_getSupportedServiceNames() ) );
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index a61ebd6e17eb..71a3b870ea9b 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -193,8 +193,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
uno::Reference<uno::XInterface> xInstance = rxContext->getServiceManager()->createInstanceWithContext("com.sun.star.mozilla.MozillaBootstrap", rxContext);
OSL_ENSURE( xInstance.is(), "failed to create instance" );
- uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap
- = uno::Reference<mozilla::XMozillaBootstrap>(xInstance,uno::UNO_QUERY);
+ uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap(xInstance,uno::UNO_QUERY);
OSL_ENSURE( xMozillaBootstrap.is(), "failed to create instance" );
if (xMozillaBootstrap.is())
diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
index f26f18a1a353..35e8aa00615f 100644
--- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
@@ -50,7 +50,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
#ifdef XMLSEC_CRYPTO_NSS
if( SEInitializer_NssImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
{
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
SEInitializer_NssImpl_createInstance, SEInitializer_NssImpl_getSupportedServiceNames() ) );
@@ -74,7 +74,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
#else
if( ONSSInitializer_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
{
- xFactory = Reference< XSingleServiceFactory >( createSingleFactory(
+ xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
ONSSInitializer_createInstance, ONSSInitializer_getSupportedServiceNames() ) );
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 55bcaba0399a..f61dbfeeceba 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -214,7 +214,7 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement(
******************************************************************************/
{
SvXMLAttributeList* pAttributeList = new SvXMLAttributeList();
- cssu::Reference < cssxs::XAttributeList > xAttrList = cssu::Reference< cssxs::XAttributeList > (pAttributeList);
+ cssu::Reference < cssxs::XAttributeList > xAttrList(pAttributeList);
xmlNsPtr pNsDef = pNode->nsDef;
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index d16e9468f489..42ac155f0cab 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -77,7 +77,7 @@ void Main();
return -1;
}
- xMSF = uno::Reference< lang::XMultiServiceFactory >(xCtx->getServiceManager(), uno::UNO_QUERY );
+ xMSF.set(xCtx->getServiceManager(), uno::UNO_QUERY );
if ( !xMSF.is() )
{