diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 14:20:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:05 +0200 |
commit | d110a0125251119d71f466b62b5250eae4be5f88 (patch) | |
tree | cafb25722368f63c15198dc2014ba86d48c885b7 /bridges | |
parent | 278379697d82e4b4a3204e82fcdababebe2340f3 (diff) |
Some clean up of previous commit
Change-Id: I6507b731665eb3d98a8fbf3d445f6c85e6d49258
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/test/testoffice.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx index e5b3df5a3632..9b90bbe9ec01 100644 --- a/bridges/test/testoffice.cxx +++ b/bridges/test/testoffice.cxx @@ -38,8 +38,7 @@ #include <com/sun/star/bridge/XBridgeFactory.hpp> #include <com/sun/star/uno/XNamingService.hpp> -#include <com/sun/star/io/XInputStream.hpp> -#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/Pipe.hpp> #include <com/sun/star/text/XTextDocument.hpp> @@ -84,23 +83,20 @@ void mygetchar() void testPipe( const Reference < XMultiServiceFactory > & rSmgr ) { - Reference < XOutputStream > rOut( Pipe::create(comphelper::ComponentContext(rSmgr).getUNOContext()), UNO_QUERY_THROW ); - - OSL_ASSERT( rOut.is() ); + Reference < XPipe > rPipe( Pipe::create(comphelper::ComponentContext(rSmgr).getUNOContext()), UNO_QUERY_THROW ); { Sequence < sal_Int8 > seq( 10 ); seq.getArray()[0] = 42; - rOut->writeBytes( seq ); + rPipe->writeBytes( seq ); } { Sequence < sal_Int8 > seq; - Reference < XInputStream > rIn( rOut , UNO_QUERY ); - if( ! ( rIn->available() == 10) ) + if( ! ( rPipe->available() == 10) ) printf( "wrong bytes available\n" ); - if( ! ( rIn->readBytes( seq , 10 ) == 10 ) ) + if( ! ( rPipe->readBytes( seq , 10 ) == 10 ) ) printf( "wrong bytes read\n" ); if( ! ( 42 == seq.getArray()[0] ) ) printf( "wrong element in sequence\n" ); |