summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-30 08:40:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-30 08:59:59 +0000
commit3bc5df7f32501075149e4b41f6e98ea8dd2cfcbd (patch)
tree6e7f5d288cf65935b3ed1f0b88200d32d2f016f0 /io
parent2e528df76b168a221c6d251d9b076bce5ba051a3 (diff)
UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526 Reviewed-on: https://gerrit.libreoffice.org/19682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'io')
-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.cxx6
4 files changed, 14 insertions, 16 deletions
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index a06b4d565ff8..657bc570d139 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -164,21 +164,21 @@ sal_Int32 ODataStreamTest::test(
Reference < XInterface > x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.Pipe" ));
+ "com.sun.star.io.Pipe" );
Reference < XInputStream > rPipeInput( x , UNO_QUERY );
Reference < XOutputStream > rPipeOutput( x , UNO_QUERY );
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.DataInputStream") );
+ "com.sun.star.io.DataInputStream" );
rInput = Reference < XDataInputStream > ( x , UNO_QUERY);
rSink = Reference< XActiveDataSink > ( x , UNO_QUERY );
}
else if ( !rSource.is() )
{
x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.DataOutputStream" ) );
+ "com.sun.star.io.DataOutputStream" );
rOutput = Reference< XDataOutputStream > ( x , UNO_QUERY );
rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
}
@@ -724,13 +724,13 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
Reference < XInterface > x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.Pipe" ) );
+ "com.sun.star.io.Pipe" );
Reference <XInputStream > rPipeInput( x , UNO_QUERY );
Reference <XOutputStream > rPipeOutput( x , UNO_QUERY );
x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.MarkableInputStream" ) );
+ "com.sun.star.io.MarkableInputStream" );
Reference <XInputStream > markableInput( x , UNO_QUERY );
Reference <XActiveDataSink> markableSink( x , UNO_QUERY );
@@ -750,13 +750,13 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.ObjectInputStream" ));
+ "com.sun.star.io.ObjectInputStream" );
rInput = Reference < XObjectInputStream > ( x , UNO_QUERY );
rSink = Reference < XActiveDataSink > ( x , UNO_QUERY );
}
else if ( !rSource.is() ) {
x = m_rFactory->createInstance(
- OUString( "com.sun.star.io.ObjectOutputStream" ));
+ "com.sun.star.io.ObjectOutputStream" );
rOutput = Reference <XObjectOutputStream > ( x , UNO_QUERY );
rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
}
@@ -924,7 +924,7 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream >
{
Reference < XInterface > x = m_rFactory->createInstance(
- OUString( "test.com.sun.star.io.PersistTest"));
+ "test.com.sun.star.io.PersistTest");
Reference< XPersistObject > persistRef( x , UNO_QUERY );
ERROR_ASSERT( persistRef.is() , "couldn't instantiate PersistTest object" );
diff --git a/io/test/stm/pumptest.cxx b/io/test/stm/pumptest.cxx
index c4b83d5c653e..465cf908ce20 100644
--- a/io/test/stm/pumptest.cxx
+++ b/io/test/stm/pumptest.cxx
@@ -311,7 +311,7 @@ private:
Reference< XOutputStream > createPipe()
{
Reference< XOutputStream > rOut( m_rSmgr->createInstance(
- OUString("com.sun.star.io.Pipe")),UNO_QUERY);
+ "com.sun.star.io.Pipe"),UNO_QUERY);
return rOut;
}
};
@@ -403,9 +403,9 @@ void OPumpTest::testWrongUsage( const Reference< XInterface > &r )
Reference< XActiveDataControl > rControl( r, UNO_QUERY );
Reference< XInputStream > rIn( m_rSmgr->createInstance(
- OUString("com.sun.star.io.DataInputStream")),UNO_QUERY);
+ "com.sun.star.io.DataInputStream"),UNO_QUERY);
Reference< XOutputStream > rOut( m_rSmgr->createInstance(
- OUString("com.sun.star.io.DataOutputStream")),UNO_QUERY);
+ "com.sun.star.io.DataOutputStream"),UNO_QUERY);
rSink->setInputStream( rIn );
rSource->setOutputStream( rOut );
diff --git a/io/test/testcomponent.cxx b/io/test/testcomponent.cxx
index f5b626f9de2c..58b4f6876a68 100644
--- a/io/test/testcomponent.cxx
+++ b/io/test/testcomponent.cxx
@@ -60,7 +60,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
- OUString("com.sun.star.registry.ImplementationRegistration") );
+ "com.sun.star.registry.ImplementationRegistration" );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index 2e60af472d2d..ae42cf5f1c62 100644
--- a/io/test/testconnection.cxx
+++ b/io/test/testconnection.cxx
@@ -185,12 +185,10 @@ int SAL_CALL main( int argc, char * argv[] )
OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() );
Reference < XAcceptor > rAcceptor(
- xMgr->createInstance(
- OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
+ xMgr->createInstance( "com.sun.star.connection.Acceptor" ) , UNO_QUERY );
Reference < XAcceptor > rAcceptorPipe(
- xMgr->createInstance(
- OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
+ xMgr->createInstance( "com.sun.star.connection.Acceptor" ) , UNO_QUERY );
Reference < XConnector > rConnector(
xMgr->createInstance("com.sun.star.connection.Connector") , UNO_QUERY );