Some clean up of previous commit
Change-Id: I6507b731665eb3d98a8fbf3d445f6c85e6d49258
This commit is contained in:
@@ -1358,7 +1358,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
|
||||
// write into pipe:
|
||||
Reference<packages::manifest::XManifestWriter> xManifestWriter( xMSF->createInstance
|
||||
( DEFINE_CONST_UNICODE("com.sun.star.packages.manifest.ManifestWriter") ), UNO_QUERY );
|
||||
Reference<io::XOutputStream> xPipe( io::Pipe::create(comphelper::ComponentContext(xMSF).getUNOContext()), UNO_QUERY );
|
||||
Reference<io::XOutputStream> xPipe( io::Pipe::create(comphelper::ComponentContext(xMSF).getUNOContext()), UNO_QUERY_THROW );
|
||||
xManifestWriter->writeManifestSequence(
|
||||
xPipe, Sequence< Sequence<beans::PropertyValue> >(
|
||||
&manifest[ 0 ], manifest.size() ) );
|
||||
|
@@ -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" );
|
||||
|
@@ -43,10 +43,8 @@
|
||||
|
||||
CSerializationAppXML::CSerializationAppXML()
|
||||
: m_aFactory(comphelper::getProcessServiceFactory())
|
||||
, m_aPipe(CSS::io::Pipe::create(comphelper::getProcessComponentContext()), CSS::uno::UNO_QUERY_THROW)
|
||||
{
|
||||
OSL_ENSURE(m_aPipe.is(), "cannot create Pipe");
|
||||
}
|
||||
, m_aPipe(CSS::io::Pipe::create(comphelper::getProcessComponentContext()))
|
||||
{}
|
||||
|
||||
CSS::uno::Reference< CSS::io::XInputStream >
|
||||
CSerializationAppXML::getInputStream()
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#ifndef __SERIALIZATION_APP_XML_HXX
|
||||
#define __SERIALIZATION_APP_XML_HXX
|
||||
|
||||
#include <com/sun/star/io/XOutputStream.hpp>
|
||||
#include <com/sun/star/io/XPipe.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
|
||||
#include "serialization.hxx"
|
||||
@@ -39,7 +39,7 @@ class CSerializationAppXML : public CSerialization
|
||||
{
|
||||
private:
|
||||
CSS::uno::Reference< CSS::lang::XMultiServiceFactory > m_aFactory;
|
||||
CSS::uno::Reference< CSS::io::XOutputStream > m_aPipe;
|
||||
CSS::uno::Reference< CSS::io::XPipe > m_aPipe;
|
||||
|
||||
void serialize_node(const CSS::uno::Reference< CSS::xml::dom::XNode >& aNode);
|
||||
void serialize_nodeset();
|
||||
|
@@ -50,7 +50,7 @@ using namespace CSS::xml::dom;
|
||||
|
||||
CSerializationURLEncoded::CSerializationURLEncoded()
|
||||
: m_aFactory(comphelper::getProcessServiceFactory())
|
||||
, m_aPipe(Pipe::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW)
|
||||
, m_aPipe(Pipe::create(comphelper::getProcessComponentContext()))
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,8 +21,7 @@
|
||||
#define __SERIALIZATION_URLENCODED_HXX
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/io/XInputStream.hpp>
|
||||
#include <com/sun/star/io/XOutputStream.hpp>
|
||||
#include <com/sun/star/io/XPipe.hpp>
|
||||
|
||||
#include <rtl/strbuf.hxx>
|
||||
|
||||
@@ -32,7 +31,7 @@ class CSerializationURLEncoded : public CSerialization
|
||||
{
|
||||
private:
|
||||
CSS::uno::Reference< CSS::lang::XMultiServiceFactory > m_aFactory;
|
||||
CSS::uno::Reference< CSS::io::XOutputStream > m_aPipe;
|
||||
CSS::uno::Reference< CSS::io::XPipe > m_aPipe;
|
||||
|
||||
sal_Bool is_unreserved(sal_Char);
|
||||
void encode_and_append(const rtl::OUString& aString, rtl::OStringBuffer& aBuffer);
|
||||
|
@@ -326,9 +326,9 @@ $(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/io,\
|
||||
XObjectInputStream \
|
||||
XObjectOutputStream \
|
||||
XOutputStream \
|
||||
XPipe \
|
||||
XPersist \
|
||||
XPersistObject \
|
||||
XPipe \
|
||||
XSeekable \
|
||||
XSeekableInputStream \
|
||||
XSequenceOutputStream \
|
||||
|
Reference in New Issue
Block a user