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 /sfx2/source/doc/SfxDocumentMetaData.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 'sfx2/source/doc/SfxDocumentMetaData.cxx')
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 0b97c0b8e19a..b530da3571e9 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -45,6 +45,7 @@ #include "com/sun/star/document/XExporter.hpp" #include "com/sun/star/document/XFilter.hpp" #include "com/sun/star/xml/sax/Parser.hpp" +#include "com/sun/star/xml/sax/Writer.hpp" #include "com/sun/star/xml/dom/XDocument.hpp" #include "com/sun/star/xml/dom/XElement.hpp" #include "com/sun/star/xml/dom/DocumentBuilder.hpp" @@ -2003,13 +2004,9 @@ SfxDocumentMetaData::storeToStorage( if (!xOutStream.is()) throw css::uno::RuntimeException(); css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( m_xContext->getServiceManager()); - css::uno::Reference<css::io::XActiveDataSource> xSaxWriter( - xMsf->createInstanceWithContext(::rtl::OUString( - "com.sun.star.xml.sax.Writer"), m_xContext), - css::uno::UNO_QUERY_THROW); + css::uno::Reference<css::xml::sax::XWriter> xSaxWriter( + css::xml::sax::Writer::create(m_xContext)); xSaxWriter->setOutputStream(xOutStream); - css::uno::Reference<css::xml::sax::XDocumentHandler> xDocHandler ( - xSaxWriter, css::uno::UNO_QUERY_THROW); const sal_uInt64 version = SotStorage::GetVersion( xStorage ); // Oasis is also the default (0) @@ -2022,7 +2019,7 @@ SfxDocumentMetaData::storeToStorage( css::uno::Reference<css::beans::XPropertySet> xPropArg = getURLProperties(Medium); css::uno::Sequence< css::uno::Any > args(2); - args[0] <<= xDocHandler; + args[0] <<= xSaxWriter; args[1] <<= xPropArg; css::uno::Reference<css::document::XExporter> xExp( |