diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-09 14:03:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-05-13 09:38:03 +0200 |
commit | 088e86b865062dd4cc5ba0c85c6068dea62238db (patch) | |
tree | 3f4ba85335bae3349bf4852245400b35b36d7ea0 /sc | |
parent | 5d1ad167294878789e644452f23ef883af93fe87 (diff) |
fdo#46808, Convert some chart2 services to new style
The services already existed, they just needed IDL files
Change-Id: Ia7bdae932c5fb4b47d23afd2bb0756ecc9cbf6f7
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 32 | ||||
-rw-r--r-- | sc/source/filter/inc/xlchart.hxx | 4 |
2 files changed, 17 insertions, 19 deletions
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 50d36d26c7fa..e73b0da7fdff 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -37,7 +37,14 @@ #include <com/sun/star/chart/TimeUnit.hpp> #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart/XDiagramPositioning.hpp> +#include <com/sun/star/chart/DataLabelPlacement.hpp> +#include <com/sun/star/chart/ErrorBarStyle.hpp> +#include <com/sun/star/chart/MissingValueTreatment.hpp> +#include <com/sun/star/chart2/CartesianCoordinateSystem2d.hpp> +#include <com/sun/star/chart2/CartesianCoordinateSystem3d.hpp> #include <com/sun/star/chart2/FormattedString.hpp> +#include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp> +#include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> @@ -45,9 +52,6 @@ #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/chart2/XTitled.hpp> -#include <com/sun/star/chart2/data/XDataProvider.hpp> -#include <com/sun/star/chart2/data/XDataReceiver.hpp> -#include <com/sun/star/chart2/data/XDataSink.hpp> #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp> @@ -57,10 +61,10 @@ #include <com/sun/star/chart2/TickmarkStyle.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> #include <com/sun/star/chart2/RelativeSize.hpp> +#include <com/sun/star/chart2/data/XDataProvider.hpp> +#include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include <com/sun/star/chart2/data/XDataSink.hpp> #include <com/sun/star/chart2/data/LabeledDataSequence.hpp> -#include <com/sun/star/chart/DataLabelPlacement.hpp> -#include <com/sun/star/chart/ErrorBarStyle.hpp> -#include <com/sun/star/chart/MissingValueTreatment.hpp> #include <sfx2/objsh.hxx> #include <svx/svdpage.hxx> @@ -2316,26 +2320,24 @@ bool XclImpChType::HasCategoryLabels() const Reference< XCoordinateSystem > XclImpChType::CreateCoordSystem( bool b3dChart ) const { - // service name - OUString aCoordSysService; + // create the coordinate system object + Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); + Reference< XCoordinateSystem > xCoordSystem; if( maTypeInfo.mbPolarCoordSystem ) { if( b3dChart ) - aCoordSysService = SERVICE_CHART2_POLARCOORDSYS3D; + xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext); else - aCoordSysService = SERVICE_CHART2_POLARCOORDSYS2D; + xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext); } else { if( b3dChart ) - aCoordSysService = SERVICE_CHART2_CARTESIANCOORDSYS3D; + xCoordSystem = css::chart2::CartesianCoordinateSystem3d::create(xContext); else - aCoordSysService = SERVICE_CHART2_CARTESIANCOORDSYS2D; + xCoordSystem = css::chart2::CartesianCoordinateSystem2d::create(xContext); } - // create the coordinate system object - Reference< XCoordinateSystem > xCoordSystem( ScfApiHelper::CreateInstance( aCoordSysService ), UNO_QUERY ); - // swap X and Y axis if( maTypeInfo.mbSwappedAxesSet ) { diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 9743bee767ce..5ea9a7e54518 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -49,8 +49,6 @@ class XclRoot; #define SERVICE_DRAWING_HATCHTABLE "com.sun.star.drawing.HatchTable" #define SERVICE_CHART2_AXIS "com.sun.star.chart2.Axis" -#define SERVICE_CHART2_CARTESIANCOORDSYS2D "com.sun.star.chart2.CartesianCoordinateSystem2d" -#define SERVICE_CHART2_CARTESIANCOORDSYS3D "com.sun.star.chart2.CartesianCoordinateSystem3d" #define SERVICE_CHART2_DATAPROVIDER "com.sun.star.chart2.data.DataProvider" #define SERVICE_CHART2_DATASERIES "com.sun.star.chart2.DataSeries" #define SERVICE_CHART2_DIAGRAM "com.sun.star.chart2.Diagram" @@ -61,8 +59,6 @@ class XclRoot; #define SERVICE_CHART2_LINEARSCALING "com.sun.star.chart2.LinearScaling" #define SERVICE_CHART2_LOGREGCURVE "com.sun.star.chart2.LogarithmicRegressionCurve" #define SERVICE_CHART2_LOGSCALING "com.sun.star.chart2.LogarithmicScaling" -#define SERVICE_CHART2_POLARCOORDSYS2D "com.sun.star.chart2.PolarCoordinateSystem2d" -#define SERVICE_CHART2_POLARCOORDSYS3D "com.sun.star.chart2.PolarCoordinateSystem3d" #define SERVICE_CHART2_POTREGCURVE "com.sun.star.chart2.PotentialRegressionCurve" #define SERVICE_CHART2_TITLE "com.sun.star.chart2.Title" |