diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-05-28 22:34:10 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-03 21:46:40 +0200 |
commit | c818e23df3f608f247da0d4722d102a03725c1cf (patch) | |
tree | 6b1db5077346c051bebaab72271da2502c017db8 /oox | |
parent | 9c5e2c65ae5b99ea9fab43881117a1473fd073df (diff) |
Import polynomial and moving average for OOXML.
Change-Id: Ie6501ed3b3431e187f8f0b83654e84438566ccd5
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 35 | ||||
-rw-r--r-- | oox/source/token/properties.txt | 6 |
2 files changed, 33 insertions, 8 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 9ef1f3fdd559..a02e52abf35f 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -407,19 +407,40 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat OUString aServiceName; switch( mrModel.mnTypeId ) { - case XML_exp: aServiceName = "com.sun.star.chart2.ExponentialRegressionCurve"; break; - case XML_linear: aServiceName = "com.sun.star.chart2.LinearRegressionCurve"; break; - case XML_log: aServiceName = "com.sun.star.chart2.LogarithmicRegressionCurve"; break; - case XML_movingAvg: /* #i66819# moving average trendlines not supported */ break; - case XML_poly: /* #i20819# polynomial trendlines not supported */ break; - case XML_power: aServiceName = "com.sun.star.chart2.PotentialRegressionCurve"; break; - default: OSL_FAIL( "TrendlineConverter::convertFromModel - unknown trendline type" ); + case XML_exp: + aServiceName = "com.sun.star.chart2.ExponentialRegressionCurve"; + break; + case XML_linear: + aServiceName = "com.sun.star.chart2.LinearRegressionCurve"; + break; + case XML_log: + aServiceName = "com.sun.star.chart2.LogarithmicRegressionCurve"; + break; + case XML_movingAvg: + aServiceName = "com.sun.star.chart2.MovingAverageRegressionCurve"; + break; + case XML_poly: + aServiceName = "com.sun.star.chart2.PolynomialRegressionCurve"; + break; + case XML_power: + aServiceName = "com.sun.star.chart2.PotentialRegressionCurve"; + break; + default: + OSL_FAIL( "TrendlineConverter::convertFromModel - unknown trendline type" ); } if( !aServiceName.isEmpty() ) { Reference< XRegressionCurve > xRegCurve( createInstance( aServiceName ), UNO_QUERY_THROW ); PropertySet aPropSet( xRegCurve ); + aPropSet.setProperty( PROP_PolynomialDegree, mrModel.mnOrder ); + aPropSet.setProperty( PROP_MovingAveragePeriod, mrModel.mnPeriod ); + + if (mrModel.mfForward.has()) + aPropSet.setProperty( PROP_ExtrapolateForward, mrModel.mfForward.get() ); + if (mrModel.mfBackward.has()) + aPropSet.setProperty( PROP_ExtrapolateBackward, mrModel.mfBackward.get() ); + // trendline formatting getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_TRENDLINE ); diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index bd8f5ee39ebb..e292d144cc42 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -147,6 +147,8 @@ ErrorTitle Expansion ExternalDocLinks ExternalLinks +ExtrapolateForward +ExtrapolateBackward FileFormat FillBitmapMode FillBitmapName @@ -304,6 +306,7 @@ MoveProtect MultiLine MultiPageValue MultiSelection +MovingAveragePeriod Name NamedRanges NegativeError @@ -338,9 +341,10 @@ Path PercentageNumberFormat PersistName Perspective +PolygonKind +PolynomialDegree PolyPolygon PolyPolygonBezier -PolygonKind Position PositionBottom PositionLeft |