summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-17 14:34:07 +0200
committerNoel Grandin <noel@peralex.com>2013-05-21 08:24:00 +0200
commitf2bc5c6229e8e72feb3dd887b6d509e52d666c0c (patch)
treefa7991a2f6add8d6ec35a589b316b47cede1811e /oox
parentdfc49e043bf2efa7c07b8f89af1f64de2e7f7b0e (diff)
fdo#46808, Convert various chart2:*Scaling services to new style
Change-Id: I93294be4c822160e609ae6aab552edd64478e34b
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 4da69a8bbdff..1f725d641b4b 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -27,6 +27,8 @@
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/TickmarkStyle.hpp>
+#include <com/sun/star/chart2/LinearScaling.hpp>
+#include <com/sun/star/chart2/LogarithmicScaling.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XCoordinateSystem.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
@@ -34,6 +36,7 @@
#include "oox/drawingml/chart/titleconverter.hxx"
#include "oox/drawingml/chart/typegroupconverter.hxx"
#include "oox/drawingml/lineproperties.hxx"
+#include "comphelper/processfactory.hxx"
namespace oox {
namespace drawingml {
@@ -219,7 +222,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
if( mrModel.mnTypeId == C_TOKEN( dateAx ) )
{
// scaling algorithm
- aScaleData.Scaling.set( createInstance( "com.sun.star.chart2.LinearScaling" ), UNO_QUERY );
+ aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
// min/max
lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );
@@ -249,10 +252,10 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
{
// scaling algorithm
bool bLogScale = lclIsLogarithmicScale( mrModel );
- OUString aScalingService = bLogScale ?
- OUString( "com.sun.star.chart2.LogarithmicScaling" ) :
- OUString( "com.sun.star.chart2.LinearScaling" );
- aScaleData.Scaling.set( createInstance( aScalingService ), UNO_QUERY );
+ if( bLogScale )
+ aScaleData.Scaling = LogarithmicScaling::create( comphelper::getProcessComponentContext() );
+ else
+ aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
// min/max
lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );