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 /sw/source/filter/xml | |
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 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 9dd317aa7e9f..48f7953c32ed 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -33,7 +33,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/task/XStatusIndicatorFactory.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/document/XExporter.hpp> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/frame/XModule.hpp> @@ -57,6 +57,7 @@ #include <statstr.hrc> #include <rtl/logfile.hxx> +#include <comphelper/componentcontext.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/makesequence.hxx> #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp> @@ -609,13 +610,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent( "SwXMLWriter::WriteThroughComponent" ); // get component - uno::Reference< io::XActiveDataSource > xSaxWriter( - rFactory->createInstance(rtl::OUString("com.sun.star.xml.sax.Writer")), - UNO_QUERY ); - OSL_ENSURE( xSaxWriter.is(), "can't instantiate XML writer" ); - if(!xSaxWriter.is()) - return sal_False; - + uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(comphelper::getComponentContext(rFactory)); RTL_LOGFILE_CONTEXT_TRACE( aFilterLog, "SAX-Writer created" ); // connect XML writer to output stream |