summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/UnoApi_offapi.mk10
-rw-r--r--offapi/com/sun/star/chart2/ExponentialScaling.idl7
-rw-r--r--offapi/com/sun/star/chart2/LinearScaling.idl7
-rw-r--r--offapi/com/sun/star/chart2/LogarithmicScaling.idl7
-rw-r--r--offapi/com/sun/star/chart2/PowerScaling.idl7
-rw-r--r--offapi/com/sun/star/chart2/Scaling.idl7
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx13
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx10
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
10 files changed, 30 insertions, 42 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 796fff58503d..46055c9fdf81 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -80,10 +80,15 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2,\
CartesianCoordinateSystem2d \
CartesianCoordinateSystem3d \
+ ExponentialScaling \
FormattedString \
+ LogarithmicScaling \
+ LinearScaling \
PolarCoordinateSystem2d \
PolarCoordinateSystem3d \
+ PowerScaling \
RegressionEquation \
+ Scaling \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2/data,\
DatabaseDataProvider \
@@ -622,17 +627,12 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/chart2,
DataSeries \
Diagram \
ErrorBar \
- ExponentialScaling \
GridProperties \
Legend \
- LinearScaling \
- LogarithmicScaling \
LogicTargetModel \
- PowerScaling \
PropertyPool \
RegressionCurve \
RegressionCurveEquation \
- Scaling \
StandardDiagramCreationParameters \
Title \
))
diff --git a/offapi/com/sun/star/chart2/ExponentialScaling.idl b/offapi/com/sun/star/chart2/ExponentialScaling.idl
index b22bef2dc8fe..edd74063646e 100644
--- a/offapi/com/sun/star/chart2/ExponentialScaling.idl
+++ b/offapi/com/sun/star/chart2/ExponentialScaling.idl
@@ -19,7 +19,7 @@
#ifndef com_sun_star_chart2_ExponentialScaling_idl
#define com_sun_star_chart2_ExponentialScaling_idl
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
module com { module sun { module star { module chart2 {
@@ -31,10 +31,7 @@ module com { module sun { module star { module chart2 {
<p>If not mentioned explicitly, the base for the power function is
10.0</p>
*/
-service ExponentialScaling
-{
- service Scaling;
-};
+service ExponentialScaling : com::sun::star::chart2::XScaling;
}; }; }; };
diff --git a/offapi/com/sun/star/chart2/LinearScaling.idl b/offapi/com/sun/star/chart2/LinearScaling.idl
index 4867ded98b28..2c2e04d12fab 100644
--- a/offapi/com/sun/star/chart2/LinearScaling.idl
+++ b/offapi/com/sun/star/chart2/LinearScaling.idl
@@ -19,7 +19,7 @@
#ifndef com_sun_star_chart2_LinearScaling_idl
#define com_sun_star_chart2_LinearScaling_idl
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
module com { module sun { module star { module chart2 {
@@ -32,10 +32,7 @@ module com { module sun { module star { module chart2 {
and <em>t</em> is 0.0, which means the transformation is an
identical mapping.</p>
*/
-service LinearScaling
-{
- service Scaling;
-};
+service LinearScaling : com::sun::star::chart2::XScaling;
}; }; }; };
diff --git a/offapi/com/sun/star/chart2/LogarithmicScaling.idl b/offapi/com/sun/star/chart2/LogarithmicScaling.idl
index 55c871dde2f2..6be520793a0e 100644
--- a/offapi/com/sun/star/chart2/LogarithmicScaling.idl
+++ b/offapi/com/sun/star/chart2/LogarithmicScaling.idl
@@ -19,7 +19,7 @@
#ifndef com_sun_star_chart2_LogarithmicScaling_idl
#define com_sun_star_chart2_LogarithmicScaling_idl
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
module com { module sun { module star { module chart2 {
@@ -30,10 +30,7 @@ module com { module sun { module star { module chart2 {
<p>If not mentioned explicitly, the base for the logarithm is
10.0</p>
*/
-service LogarithmicScaling
-{
- service Scaling;
-};
+service LogarithmicScaling : com::sun::star::chart2::XScaling;
}; }; }; };
diff --git a/offapi/com/sun/star/chart2/PowerScaling.idl b/offapi/com/sun/star/chart2/PowerScaling.idl
index 1685e120c3f5..3f8111b267df 100644
--- a/offapi/com/sun/star/chart2/PowerScaling.idl
+++ b/offapi/com/sun/star/chart2/PowerScaling.idl
@@ -19,7 +19,7 @@
#ifndef com_sun_star_chart2_PowerScaling_idl
#define com_sun_star_chart2_PowerScaling_idl
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
module com { module sun { module star { module chart2 {
@@ -31,10 +31,7 @@ module com { module sun { module star { module chart2 {
<p>If not mentioned explicitly, the exponent for the power
function is 10.0</p>
*/
-service PowerScaling
-{
- service Scaling;
-};
+service PowerScaling : com::sun::star::chart2::XScaling;
}; }; }; };
diff --git a/offapi/com/sun/star/chart2/Scaling.idl b/offapi/com/sun/star/chart2/Scaling.idl
index d7cd705dc34d..e68c52314a08 100644
--- a/offapi/com/sun/star/chart2/Scaling.idl
+++ b/offapi/com/sun/star/chart2/Scaling.idl
@@ -27,12 +27,7 @@ module com { module sun { module star { module chart2 {
/** stateless service
*/
-service Scaling
-{
- /** required interface
- */
- interface com::sun::star::chart2::XScaling;
-};
+service Scaling : com::sun::star::chart2::XScaling;
}; }; }; };
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 );
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 2df9da410f56..fa7df367a109 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -2750,7 +2750,7 @@ XclExpChValueRange::XclExpChValueRange( const XclExpChRoot& rRoot ) :
void XclExpChValueRange::Convert( const ScaleData& rScaleData )
{
// scaling algorithm
- bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == SERVICE_CHART2_LOGSCALING;
+ bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == "com.sun.star.chart2.LogarithmicScaling";
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE, bLogScale );
// min/max
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index e73b0da7fdff..e07d1d4cd1bd 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -43,6 +43,8 @@
#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/LogarithmicScaling.hpp>
+#include <com/sun/star/chart2/LinearScaling.hpp>
#include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
#include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -2982,7 +2984,7 @@ void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleDat
/* Chart2 requires axis type CATEGORY for automatic category/date axis
(even if it is a date axis currently). */
rScaleData.AxisType = rScaleData.AutoDateAxis ? cssc2::AxisType::CATEGORY : cssc2::AxisType::DATE;
- rScaleData.Scaling.set( ScfApiHelper::CreateInstance( SERVICE_CHART2_LINEARSCALING ), UNO_QUERY );
+ rScaleData.Scaling = css::chart2::LinearScaling::create( comphelper::getProcessComponentContext() );
/* Min/max values depend on base time unit, they specify the number of
days, months, or years starting from null date. */
lclConvertTimeValue( GetRoot(), rScaleData.Minimum, maDateData.mnMinDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN ), maDateData.mnBaseUnit );
@@ -3066,8 +3068,10 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
{
// scaling algorithm
bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE );
- OUString aScalingService = bLogScale ? OUString( SERVICE_CHART2_LOGSCALING ) : OUString( SERVICE_CHART2_LINEARSCALING );
- rScaleData.Scaling.set( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY );
+ if( bLogScale )
+ rScaleData.Scaling = css::chart2::LogarithmicScaling::create( comphelper::getProcessComponentContext() );
+ else
+ rScaleData.Scaling = css::chart2::LinearScaling::create( comphelper::getProcessComponentContext() );
// min/max
lclSetExpValueOrClearAny( rScaleData.Minimum, maData.mfMin, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 5ea9a7e54518..2c3a594ed9c7 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -56,9 +56,7 @@ class XclRoot;
#define SERVICE_CHART2_EXPREGCURVE "com.sun.star.chart2.ExponentialRegressionCurve"
#define SERVICE_CHART2_LEGEND "com.sun.star.chart2.Legend"
#define SERVICE_CHART2_LINEARREGCURVE "com.sun.star.chart2.LinearRegressionCurve"
-#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_POTREGCURVE "com.sun.star.chart2.PotentialRegressionCurve"
#define SERVICE_CHART2_TITLE "com.sun.star.chart2.Title"