summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-04 14:16:19 +0200
committerNoel Grandin <noel@peralex.com>2015-11-04 14:20:51 +0200
commitfcb8df3bcf551fc3437e6c7c8ddb24dc5a09db02 (patch)
treeb00511c71c3ea467e1f029cfdb80bb6ce72960b5 /io
parent59b072e22b0610abc7ffdbc75873ef5cbba58de7 (diff)
use uno::Reference::set method instead of assignment
Change-Id: I11822c50fa66d038a3d6f38054ab35c2e613f077
Diffstat (limited to 'io')
-rw-r--r--io/source/acceptor/acceptor.cxx3
-rw-r--r--io/source/connector/connector.cxx4
-rw-r--r--io/source/stm/odata.cxx2
-rw-r--r--io/test/stm/datatest.cxx16
-rw-r--r--io/test/stm/pumptest.cxx6
-rw-r--r--io/test/testcomponent.cxx2
-rw-r--r--io/test/testconnection.cxx2
7 files changed, 17 insertions, 18 deletions
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index 43c86cd8bf75..e2b6ffd58d0f 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -210,8 +210,7 @@ namespace io_acceptor
"trying to get service %s\n",
OUStringToOString(
delegatee, RTL_TEXTENCODING_ASCII_US).getStr());
- _xAcceptor = Reference<XAcceptor>(
- _xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY);
+ _xAcceptor.set(_xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY);
if(!_xAcceptor.is())
{
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index e564d3eb5669..25fa3bdc373b 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -94,7 +94,7 @@ namespace stoc_connector
if( pConn->m_pipe.create( aName.pData, osl_Pipe_OPEN, osl::Security() ) )
{
- r = Reference < XConnection > ( static_cast<XConnection *>(pConn) );
+ r.set( static_cast<XConnection *>(pConn) );
}
else
{
@@ -141,7 +141,7 @@ namespace stoc_connector
sizeof( nTcpNoDelay ) , osl_Socket_LevelTcp );
}
pConn->completeConnectionString();
- r = Reference< XConnection > ( static_cast<XConnection *>(pConn) );
+ r.set( static_cast<XConnection *>(pConn) );
}
else
{
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index ee37bcbd655c..c626661cb6ce 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -1310,7 +1310,7 @@ Reference< XPersistObject > OObjectInputStream::readObject() throw (css::io::IO
{
// load the object
Reference< XInterface > x = m_rSMgr->createInstanceWithContext( aName, m_rCxt );
- xLoadedObj = Reference< XPersistObject >( x, UNO_QUERY );
+ xLoadedObj.set( x, UNO_QUERY );
if( xLoadedObj.is() )
{
sal_uInt32 nSize = m_aPersistVector.size();
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index fb2600885364..f98f60276b5a 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -172,15 +172,15 @@ sal_Int32 ODataStreamTest::test(
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
"com.sun.star.io.DataInputStream" );
- rInput = Reference < XDataInputStream > ( x , UNO_QUERY);
- rSink = Reference< XActiveDataSink > ( x , UNO_QUERY );
+ rInput.set( x , UNO_QUERY);
+ rSink.set( x , UNO_QUERY );
}
else if ( !rSource.is() )
{
x = m_rFactory->createInstance(
"com.sun.star.io.DataOutputStream" );
- rOutput = Reference< XDataOutputStream > ( x , UNO_QUERY );
- rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
+ rOutput.set( x , UNO_QUERY );
+ rSource.set( x, UNO_QUERY );
}
OSL_ASSERT( rPipeInput.is() );
@@ -750,14 +750,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
"com.sun.star.io.ObjectInputStream" );
- rInput = Reference < XObjectInputStream > ( x , UNO_QUERY );
- rSink = Reference < XActiveDataSink > ( x , UNO_QUERY );
+ rInput.set( x , UNO_QUERY );
+ rSink.set( x , UNO_QUERY );
}
else if ( !rSource.is() ) {
x = m_rFactory->createInstance(
"com.sun.star.io.ObjectOutputStream" );
- rOutput = Reference <XObjectOutputStream > ( x , UNO_QUERY );
- rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
+ rOutput.set( x , UNO_QUERY );
+ rSource.set( x, UNO_QUERY );
}
OSL_ASSERT( rPipeInput.is() );
diff --git a/io/test/stm/pumptest.cxx b/io/test/stm/pumptest.cxx
index 465cf908ce20..b95d54c286c5 100644
--- a/io/test/stm/pumptest.cxx
+++ b/io/test/stm/pumptest.cxx
@@ -278,16 +278,16 @@ public:
TestCase( const Reference< XMultiServiceFactory > & rSMgr,
const Reference< XInterface > &r ) : m_rSmgr( rSMgr ), m_pTestListener( 0 )
{
- m_rControl = Reference<XActiveDataControl>( r, UNO_QUERY );
+ m_rControl.set( r, UNO_QUERY );
Reference< XActiveDataSource > rSource ( r, UNO_QUERY );
Reference< XActiveDataSink > rSink( r , UNO_QUERY );
- m_rOutSource = Reference< XOutputStream > ( createPipe() );
+ m_rOutSource.set( createPipe() );
rSink->setInputStream(Reference< XInputStream> (m_rOutSource,UNO_QUERY));
Reference< XOutputStream > rOutSink( createPipe() );
- m_rInSink = Reference< XInputStream > ( rOutSink, UNO_QUERY );
+ m_rInSink.set( rOutSink, UNO_QUERY );
rSource->setOutputStream( rOutSink );
m_pTestListener = new TestListener();
diff --git a/io/test/testcomponent.cxx b/io/test/testcomponent.cxx
index 58b4f6876a68..1703526c0605 100644
--- a/io/test/testcomponent.cxx
+++ b/io/test/testcomponent.cxx
@@ -61,7 +61,7 @@ int main (int argc, char **argv)
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
"com.sun.star.registry.ImplementationRegistration" );
- xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
+ xReg.set( x , UNO_QUERY );
}
catch( Exception & ) {
printf( "Couldn't create ImplementationRegistration service\n" );
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index ae42cf5f1c62..38cf44662015 100644
--- a/io/test/testconnection.cxx
+++ b/io/test/testconnection.cxx
@@ -205,7 +205,7 @@ int SAL_CALL main( int argc, char * argv[] )
printf( " Done\n" );
// check, if errornous strings make any problem
- rAcceptor = Reference< XAcceptor > (
+ rAcceptor.set(
xMgr->createInstance("com.sun.star.connection.Acceptor"),
UNO_QUERY );