diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-09 12:07:16 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-03 21:46:42 +0200 |
commit | dd5c0b2db451ff4d6fac7a72770758513583d468 (patch) | |
tree | d37936aeffdb95f8521be0081cb37b2cc08e79d8 /xmloff | |
parent | Little cleanup in ODT regression lines import/export (diff) | |
download | core-dd5c0b2db451ff4d6fac7a72770758513583d468.tar.gz core-dd5c0b2db451ff4d6fac7a72770758513583d468.zip |
Added new regression curve properties as ODT 1.2 extended.
Added:
- regression-extrapolate-forward
- regression-extrapolate-backward
- regression-max-degree
- regression-min-degree
- regression-moving-type
- regression-period
- regression-force-intercept
- regression-intercept-value
Not all of these are yet filled as they are not yet implemented.
Change-Id: I7ac39c0df5b8b7fb7be6b32d301e33a7f49f2960
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMap.hxx | 11 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 11 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 13 |
4 files changed, 29 insertions, 9 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 0f48024b7872..fb2a52266319 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -183,7 +183,18 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = MAP_ENTRY( "ShowNegativeError", CHART, XML_ERROR_LOWER_INDICATOR, XML_TYPE_BOOL), MAP_ENTRY( "ErrorBarStyle", CHART, XML_ERROR_CATEGORY, XML_SCH_TYPE_ERROR_BAR_STYLE ), MAP_ENTRY( "PercentageError", CHART, XML_ERROR_PERCENTAGE, XML_TYPE_DOUBLE ), + + // regression curve properties MAP_SPECIAL( "RegressionType", CHART, XML_REGRESSION_TYPE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ), + + MAP_ENTRY_ODF_EXT( "PolynomialDegree", CHART, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ), + MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", CHART, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ), + MAP_ENTRY_ODF_EXT( "MovingAverageType", CHART, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ), + MAP_ENTRY_ODF_EXT( "ExtrapolateForward", CHART, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ), + MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", CHART, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ), + MAP_ENTRY_ODF_EXT( "ForceIntercept", CHART, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ), + MAP_ENTRY_ODF_EXT( "InterceptValue", CHART, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ), + MAP_SPECIAL_ODF12( "ErrorBarRangePositive", CHART, XML_ERROR_UPPER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only MAP_SPECIAL_ODF12( "ErrorBarRangeNegative", CHART, XML_ERROR_LOWER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index a58524d42100..7f766ff95ed6 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -227,12 +227,10 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram, sal_Bool bExportContent ); + void exportRegressionCurve( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > & xSeries, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProp, - const ::com::sun::star::awt::Size & rPageSize, + const com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeries>& xSeries, + const com::sun::star::awt::Size& rPageSize, sal_Bool bExportContent ); void exportErrorBar ( @@ -2887,7 +2885,7 @@ void SchXMLExportHelper_Impl::exportSeries( if( xPropSet.is() && mxExpPropMapper.is() ) { - exportRegressionCurve( aSeriesSeq[nSeriesIdx], xPropSet, rPageSize, bExportContent ); + exportRegressionCurve( aSeriesSeq[nSeriesIdx], rPageSize, bExportContent ); } exportErrorBar( xPropSet,false, bExportContent ); // X ErrorBar @@ -2909,7 +2907,6 @@ void SchXMLExportHelper_Impl::exportSeries( void SchXMLExportHelper_Impl::exportRegressionCurve( const Reference< chart2::XDataSeries >& xSeries, - const Reference< beans::XPropertySet >& xSeriesProp, const awt::Size& rPageSize, sal_Bool bExportContent ) { diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 9ea3ae77ab58..e01a8ae14b88 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -905,6 +905,8 @@ void SchXMLSeries2Context::setStylesToRegressionCurves( { Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); Reference< chart2::XRegressionCurve > xRegCurve( xMSF->createInstance( aServiceName ), uno::UNO_QUERY_THROW ); + Reference< chart2::XRegressionCurveContainer > xRegCurveCont( iStyle->m_xSeries, uno::UNO_QUERY_THROW ); + if( xRegCurve.is()) { Reference< beans::XPropertySet > xCurveProperties( xRegCurve, uno::UNO_QUERY ); @@ -913,7 +915,6 @@ void SchXMLSeries2Context::setStylesToRegressionCurves( xRegCurve->setEquationProperties( iStyle->m_xEquationProperties ); } - Reference< chart2::XRegressionCurveContainer > xRegCurveCont( iStyle->m_xSeries, uno::UNO_QUERY_THROW ); xRegCurveCont->addRegressionCurve( xRegCurve ); } } diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 4448f5920c8d..5004a4cf0e46 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1488,7 +1488,6 @@ namespace xmloff { namespace token { TOKEN( "region-right", XML_REGION_RIGHT ), TOKEN( "register-true", XML_REGISTER_TRUE ), TOKEN( "register-truth-ref-style-name", XML_REGISTER_TRUTH_REF_STYLE_NAME ), - TOKEN( "regression-type", XML_REGRESSION_TYPE ), TOKEN( "rejected", XML_REJECTED ), TOKEN( "rejecting-change-id", XML_REJECTING_CHANGE_ID ), TOKEN( "rejection", XML_REJECTION ), @@ -2159,7 +2158,19 @@ namespace xmloff { namespace token { TOKEN( "marked-invalid", XML_MARKED_INVALID ), + // Regression curve & properties TOKEN( "regression-curve", XML_REGRESSION_CURVE ), + TOKEN( "regression-type", XML_REGRESSION_TYPE ), + // Extended regression curve properties - ODF 1.2 extended + TOKEN( "regression-extrapolate-forward", XML_REGRESSION_EXTRAPOLATE_FORWARD ), + TOKEN( "regression-extrapolate-backward", XML_REGRESSION_EXTRAPOLATE_BACKWARD ), + TOKEN( "regression-max-degree", XML_REGRESSION_MAX_DEGREE ), + TOKEN( "regression-min-degree", XML_REGRESSION_MIN_DEGREE ), + TOKEN( "regression-moving-type", XML_REGRESSION_MOVING_TYPE ), + TOKEN( "regression-period", XML_REGRESSION_PERIOD ), + TOKEN( "regression-force-intercept", XML_REGRESSION_FORCE_INTERCEPT ), + TOKEN( "regression-intercept-value", XML_REGRESSION_INTERCEPT_VALUE ), + TOKEN( "error-indicator", XML_ERROR_INDICATOR ), TOKEN( "table-type", XML_TABLE_TYPE ), |