From fb741b5e1e6aeaee74cf14af4f1cc152f0ab0952 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Oct 2012 10:13:18 +0200 Subject: 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 --- unotools/source/config/accelcfg.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/accelcfg.cxx b/unotools/source/config/accelcfg.cxx index e3f121ca142f..9c48b7f5e06e 100644 --- a/unotools/source/config/accelcfg.cxx +++ b/unotools/source/config/accelcfg.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -88,16 +89,12 @@ SvtAcceleratorConfig_Impl::SvtAcceleratorConfig_Impl( Reference< XInputStream >& bool SvtAcceleratorConfig_Impl::Commit( Reference< XOutputStream >& rOutputStream ) { - Reference< XDocumentHandler > xWriter; + Reference< XWriter > xWriter = Writer::create( ::comphelper::getProcessComponentContext() ); - xWriter = Reference< XDocumentHandler >( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString("com.sun.star.xml.sax.Writer")), UNO_QUERY) ; - - Reference< ::com::sun::star::io::XActiveDataSource> xDataSource( xWriter , UNO_QUERY ); - xDataSource->setOutputStream( rOutputStream ); + xWriter->setOutputStream( rOutputStream ); try { - OWriteAccelatorDocumentHandler aWriteHandler( aList, xWriter ); + OWriteAccelatorDocumentHandler aWriteHandler( aList, Reference(xWriter, UNO_QUERY_THROW) ); aWriteHandler.WriteAcceleratorDocument(); rOutputStream->flush(); return true; -- cgit /cib/libreoffice-6-4'>distro/cib/libreoffice-6-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author