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 /svx/source/xml/xmlxtexp.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 'svx/source/xml/xmlxtexp.cxx')
-rw-r--r-- | svx/source/xml/xmlxtexp.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index a2f8322b1763..794d61d9291e 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -28,7 +28,7 @@ #include <tools/urlobj.hxx> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> #include <com/sun/star/drawing/LineDash.hpp> @@ -237,18 +237,14 @@ bool SvxXMLXTableExportComponent::save( try { uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); + uno::Reference< uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); if( !xServiceFactory.is() ) { OSL_FAIL( "got no service manager" ); return false; } - uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) ); - if( !xWriter.is() ) - { - OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" ); - return false; - } + uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext ); uno::Reference < io::XStream > xStream; uno::Reference < io::XOutputStream > xOut; |