diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-28 13:50:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:04 +0200 |
commit | 278379697d82e4b4a3204e82fcdababebe2340f3 (patch) | |
tree | ee847794cdd14bbb11e11c5d2269213cdb2719aa /editeng/source/xml | |
parent | 9b07288138228af56e58f50dc6ba50865b52fdfb (diff) |
fdo#46808, Adapt io::Pipe UNO service to new style
Create a merged XPipe interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: I682633c6252aab503eb2469c9bd2ba771f10bc4b
Diffstat (limited to 'editeng/source/xml')
-rw-r--r-- | editeng/source/xml/xmltxtimp.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 91d3224f174b..2604ab818b0a 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -26,6 +26,7 @@ * ************************************************************************/ +#include <com/sun/star/io/Pipe.hpp> #include <com/sun/star/io/XActiveDataControl.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/xml/sax/XParser.hpp> @@ -199,12 +200,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r break; } - uno::Reference< XInterface > xPipe( xServiceFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ) ); - if( !xPipe.is() ) - { - OSL_FAIL( "XMLReader::Read: com.sun.star.io.Pipe service missing" ); - break; - } + uno::Reference< XInterface > xPipe( Pipe::create(comphelper::ComponentContext(xServiceFactory).getUNOContext()), UNO_QUERY ); // connect pipe's output stream to the data source xSource->setOutputStream( uno::Reference< io::XOutputStream >::query( xPipe ) ); |