diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-10 10:13:18 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-22 17:01:11 +0200 |
commit | fb741b5e1e6aeaee74cf14af4f1cc152f0ab0952 (patch) | |
tree | 24864ba5addb12799a508ce4718868026519f057 /basic/source/uno/dlgcont.cxx | |
parent | 9cabab002b1180650236f3d1f5fd32dfdd4bf79a (diff) |
fdo#46808, Adapt xml::sax::XWriter UNO service to new style
Create a merged XWriter interface for the service.
The xml.sax.Writer service already existed, it just did not have
an IDL file.
Change-Id: I4e6d3f3c68f9282a55fc7aa19778f97632fd8ad5
Diffstat (limited to 'basic/source/uno/dlgcont.cxx')
-rw-r--r-- | basic/source/uno/dlgcont.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index b9ad7f19ecce..1d77d41ed59e 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/embed/ElementModes.hpp> @@ -125,20 +126,9 @@ bool writeOasis2OOoLibraryElement( Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext); - Reference< xml::sax::XExtendedDocumentHandler > xWriter( - xSMgr->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.xml.sax.Writer" ) ), - xContext ), - UNO_QUERY ); - - Reference< io::XActiveDataSource > xSource( xWriter, UNO_QUERY ); - xSource->setOutputStream( xOutput ); + Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext); - if ( !xWriter.is() ) - { - return sal_False; - } + xWriter->setOutputStream( xOutput ); Sequence<Any> aArgs( 1 ); aArgs[0] <<= xWriter; |