diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-10 18:31:39 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-10 18:31:39 +0100 |
commit | 3a18c3d97abfb60a09cc6a8bd5dd163fe2cfafa3 (patch) | |
tree | 02ef980b5d6440ebbacf6f8801bea9d27f62b7a5 /io/test/stm | |
parent | 377a56fb1b9825ec5dc71ba9ae81b6e27cfabffb (diff) |
RTL_CONSTASCII_USTRINGPARAM in ure 1
Diffstat (limited to 'io/test/stm')
-rw-r--r-- | io/test/stm/datatest.cxx | 30 | ||||
-rw-r--r-- | io/test/stm/marktest.cxx | 4 | ||||
-rw-r--r-- | io/test/stm/pumptest.cxx | 6 |
3 files changed, 20 insertions, 20 deletions
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index 6b1f5c59e556..d865288d6de3 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -122,7 +122,7 @@ void ODataStreamTest::testInvariant( throw ( IllegalArgumentException, RuntimeException) { - if( OUString::createFromAscii("com.sun.star.io.DataInputStream") == TestName ) { + if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataInputStream")) == TestName ) { Reference < XConnectable > connect( TestObject , UNO_QUERY ); Reference < XActiveDataSink > active( TestObject , UNO_QUERY ); Reference < XInputStream > input( TestObject , UNO_QUERY ); @@ -135,7 +135,7 @@ void ODataStreamTest::testInvariant( } - else if( OUString::createFromAscii("com.sun.star.io.DataInputStream") == TestName ) { + else if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataInputStream")) == TestName ) { Reference < XConnectable > connect( TestObject , UNO_QUERY ); Reference < XActiveDataSource > active( TestObject , UNO_QUERY ); Reference < XOutputStream > output( TestObject , UNO_QUERY ); @@ -153,7 +153,7 @@ void ODataStreamTest::testInvariant( if( info.is() ) { ERROR_ASSERT( info->supportsService( TestName ), "XServiceInfo test failed" ); - ERROR_ASSERT( ! info->supportsService( OUString::createFromAscii("bla bluzb") ) , "XServiceInfo test failed" ); + ERROR_ASSERT( ! info->supportsService( OUString(RTL_CONSTASCII_USTRINGPARAM("bla bluzb")) ) , "XServiceInfo test failed" ); } } @@ -166,8 +166,8 @@ sal_Int32 ODataStreamTest::test( throw ( IllegalArgumentException, RuntimeException) { - if( OUString::createFromAscii("com.sun.star.io.DataInputStream") == TestName || - OUString::createFromAscii("com.sun.star.io.DataOutputStream") == TestName ) { + if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataInputStream")) == TestName || + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataOutputStream")) == TestName ) { try { @@ -292,8 +292,8 @@ void ODataStreamTest::testSimple( const Reference < XDataInputStream > &rInput rOutput->writeHyper( 0x123456789abcdefLL ); ERROR_ASSERT( rInput->readHyper() == 0x123456789abcdefLL , "int64 read/write mismatch" ); - rOutput->writeUTF( OUString::createFromAscii("Live long and prosper !") ); - ERROR_ASSERT( rInput->readUTF() == OUString::createFromAscii("Live long and prosper !") , + rOutput->writeUTF( OUString(RTL_CONSTASCII_USTRINGPARAM("Live long and prosper !")) ); + ERROR_ASSERT( rInput->readUTF() == OUString(RTL_CONSTASCII_USTRINGPARAM("Live long and prosper !")) , "UTF read/write mismatch" ); Sequence<sal_Unicode> wc(0x10001); @@ -706,7 +706,7 @@ void OObjectStreamTest::testInvariant( const OUString& TestName, if( info.is() ) { ERROR_ASSERT( info->supportsService( TestName ), "XServiceInfo test failed" ); - ERROR_ASSERT( ! info->supportsService( OUString::createFromAscii("bla bluzb") ) , "XServiceInfo test failed" ); + ERROR_ASSERT( ! info->supportsService( OUString(RTL_CONSTASCII_USTRINGPARAM("bla bluzb")) ) , "XServiceInfo test failed" ); } } @@ -824,8 +824,8 @@ sal_Bool compareMyPropertySet( Reference< XPropertySet > &r1 , Reference < XProp { sal_Bool b = sal_True; - if( r1->getPropertyValue( OUString::createFromAscii("long") ).getValueType() == getCppuVoidType() || - r2->getPropertyValue( OUString::createFromAscii("long") ).getValueType() == getCppuVoidType() ) { + if( r1->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("long")) ).getValueType() == getCppuVoidType() || + r2->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("long")) ).getValueType() == getCppuVoidType() ) { // one of the objects is not the correct propertyset ! fprintf( stderr, "compareMyPropertySet: 1\n" ); @@ -993,8 +993,8 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > ERROR_ASSERT( compareMyPropertySet( rProp , rPropRead ) , "objects has not been read properly !" ); // destroy selfreferences - rProp->setPropertyValue( OUString::createFromAscii("object"), Any() ); - rPropRead->setPropertyValue( OUString::createFromAscii("object"), Any() ); + rProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("object")), Any() ); + rPropRead->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("object")), Any() ); } { @@ -1005,7 +1005,7 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > // buffering and marks work correctly for( int i = 0 ; i < 2000 ; i ++ ) { - Reference < XInterface > x = m_rFactory->createInstance(OUString::createFromAscii("test.com.sun.star.io.PersistTest")); + Reference < XInterface > x = m_rFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("test.com.sun.star.io.PersistTest"))); Reference< XPersistObject > persistRef( x , UNO_QUERY ); Reference < XPropertySet > rProp( persistRef , UNO_QUERY ); @@ -1040,13 +1040,13 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > any <<= str; rProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("string")) , any ); - x = m_rFactory->createInstance(OUString::createFromAscii("test.com.sun.star.io.PersistTest")); + x = m_rFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("test.com.sun.star.io.PersistTest"))); Reference <XPersistObject > persist2ndRef( x , UNO_QUERY ); // Note : persist2ndRef contains coincident values, but also coincident values must be // saved properly ! any <<= persist2ndRef; - rProp->setPropertyValue( OUString::createFromAscii("object") , any ); + rProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("object")) , any ); // simply test, if markable operations and object operations do not interfere sal_Int32 nMark = markableOut->createMark(); diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx index ecd3ad30366b..dca626a797ba 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -142,7 +142,7 @@ sal_Int32 OMarkableOutputStreamTest::test( } else { - Reference < XInterface > x = m_rFactory->createInstance( OUString::createFromAscii("com.sun.star.io.Pipe")); + Reference < XInterface > x = m_rFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))); Reference< XOutputStream > rPipeOutput( x , UNO_QUERY ); Reference < XInputStream > rPipeInput( x , UNO_QUERY ); @@ -509,7 +509,7 @@ sal_Int32 OMarkableInputStreamTest::test( testInvariant( TestName , TestObject ); } else { - Reference < XInterface > x = m_rFactory->createInstance( OUString::createFromAscii("com.sun.star.io.Pipe")); + Reference < XInterface > x = m_rFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))); Reference< XOutputStream > rPipeOutput( x , UNO_QUERY ); Reference < XInputStream > rPipeInput( x , UNO_QUERY ); diff --git a/io/test/stm/pumptest.cxx b/io/test/stm/pumptest.cxx index e8723375cc26..012df7bec5b2 100644 --- a/io/test/stm/pumptest.cxx +++ b/io/test/stm/pumptest.cxx @@ -323,7 +323,7 @@ private: Reference< XOutputStream > createPipe() { Reference< XOutputStream > rOut( m_rSmgr->createInstance( - OUString::createFromAscii( "com.sun.star.io.Pipe" )),UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))),UNO_QUERY); return rOut; } }; @@ -415,9 +415,9 @@ void OPumpTest::testWrongUsage( const Reference< XInterface > &r ) Reference< XActiveDataControl > rControl( r, UNO_QUERY ); Reference< XInputStream > rIn( m_rSmgr->createInstance( - OUString::createFromAscii( "com.sun.star.io.DataInputStream" )),UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataInputStream"))),UNO_QUERY); Reference< XOutputStream > rOut( m_rSmgr->createInstance( - OUString::createFromAscii( "com.sun.star.io.DataOutputStream" )),UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.DataOutputStream"))),UNO_QUERY); rSink->setInputStream( rIn ); rSource->setOutputStream( rOut ); |