summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-10 10:13:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-22 17:01:11 +0200
commitfb741b5e1e6aeaee74cf14af4f1cc152f0ab0952 (patch)
tree24864ba5addb12799a508ce4718868026519f057 /chart2
parent9cabab002b1180650236f3d1f5fd32dfdd4bf79a (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 'chart2')
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx8
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx3
2 files changed, 5 insertions, 6 deletions
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 5f72dde8dcf5..10a565a7338e 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -38,6 +38,7 @@
#include <sot/storage.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -590,10 +591,7 @@ sal_Int32 XMLFilter::impl_Export(
if( ! xServiceFactory.is())
return ERRCODE_SFX_GENERAL;
- uno::Reference< io::XActiveDataSource > xSaxWriter( xServiceFactory->createInstance(
- C2U("com.sun.star.xml.sax.Writer")), uno::UNO_QUERY );
- if ( !xSaxWriter.is() )
- return ERRCODE_SFX_GENERAL;
+ uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(m_xContext);
bool bOasis = true;
isOasisFormat( rMediaDescriptor, bOasis );
@@ -716,7 +714,7 @@ sal_Int32 XMLFilter::impl_ExportStream(
const OUString & rStreamName,
const OUString & rServiceName,
const Reference< embed::XStorage > & xStorage,
- const uno::Reference< io::XActiveDataSource >& xActiveDataSource,
+ const uno::Reference< xml::sax::XWriter >& xActiveDataSource,
const Reference< lang::XMultiServiceFactory >& xServiceFactory,
const Sequence< uno::Any > & rFilterProperties )
{
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
index 984e894cf337..98500446a2c2 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/xml/sax/XWriter.hpp>
#include <osl/mutex.hxx>
// for APPHELPER_... macros
@@ -138,7 +139,7 @@ private:
const ::com::sun::star::uno::Reference<
::com::sun::star::embed::XStorage > & xStorage,
const ::com::sun::star::uno::Reference<
- ::com::sun::star::io::XActiveDataSource >& xActiveDataSource,
+ ::com::sun::star::xml::sax::XWriter >& xActiveDataSource,
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > & xFactory,
const ::com::sun::star::uno::Sequence<