summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-08 10:48:42 +0200
committerNoel Grandin <noel@peralex.com>2013-01-15 09:56:01 +0200
commitf6c759a6e5ead55b857e5d4898aa423b7616e816 (patch)
tree793c94be22721662151e26cedb2faff94f6c18e2 /oox
parent2fe852386c9450014f84910b0a282d684f40b56a (diff)
fdo#46808, Adapt chart2::data::LabeledDataSequence UNO service to new style
Change-Id: I98bfbc8e143b9ad9d486f97380186fde9b4423ec
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/chart/converterbase.hxx2
-rw-r--r--oox/source/drawingml/chart/converterbase.cxx6
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx3
3 files changed, 10 insertions, 1 deletions
diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx
index 7d71441abd67..8ee81d40a678 100644
--- a/oox/inc/oox/drawingml/chart/converterbase.hxx
+++ b/oox/inc/oox/drawingml/chart/converterbase.hxx
@@ -68,6 +68,8 @@ public:
/** Creates an instance for the passed service name, using the process service factory. */
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
createInstance( const ::rtl::OUString& rServiceName ) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ getComponentContext() const;
protected:
/** Returns the filter object of the imported/exported document. */
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index e8714b9c19e3..65d813d307c2 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -33,6 +33,7 @@
#include "basegfx/numeric/ftools.hxx"
#include "oox/core/xmlfilterbase.hxx"
#include "oox/drawingml/theme.hxx"
+#include <comphelper/processfactory.hxx>
namespace oox {
namespace drawingml {
@@ -240,6 +241,11 @@ Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceN
return xInt;
}
+Reference< XComponentContext > ConverterRoot::getComponentContext() const
+{
+ return comphelper::getComponentContext(mxData->mrFilter.getServiceFactory());
+}
+
XmlFilterBase& ConverterRoot::getFilter() const
{
return mxData->mrFilter;
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index adfe078c0766..3cc38d018926 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
#include <basegfx/numeric/ftools.hxx>
#include "oox/drawingml/chart/datasourceconverter.hxx"
#include "oox/drawingml/chart/seriesmodel.hxx"
@@ -83,7 +84,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
Reference< XLabeledDataSequence > xLabeledSeq;
if( xValueSeq.is() || xTitleSeq.is() )
{
- xLabeledSeq.set( rParent.createInstance( "com.sun.star.chart2.data.LabeledDataSequence" ), UNO_QUERY );
+ xLabeledSeq.set( LabeledDataSequence::create(rParent.getComponentContext()), UNO_QUERY );
if( xLabeledSeq.is() )
{
xLabeledSeq->setValues( xValueSeq );