From 6d34f1cd928ad444cf9941bd8bc01652c84b67d4 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 30 Mar 2014 00:19:41 +0100 Subject: adapt smooth import to OOXML and not to MSO 2007 Change-Id: Id1dc62a89e2858f81dc9b6eb8a5f3d9996ba85ec --- oox/source/drawingml/chart/seriescontext.cxx | 15 +++++++++------ oox/source/drawingml/chart/typegroupcontext.cxx | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx index 4bf61e53d36e..fde29520cb1e 100644 --- a/oox/source/drawingml/chart/seriescontext.cxx +++ b/oox/source/drawingml/chart/seriescontext.cxx @@ -582,8 +582,9 @@ ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const case C_TOKEN( marker ): return this; case C_TOKEN( smooth ): - // default is 'false', not 'true' as specified - mrModel.mbSmooth = rAttribs.getBool( XML_val, false ); + // TODO: fix for MSO 2007 behavior + // MSO 2007 writes false by default and not true + mrModel.mbSmooth = rAttribs.getBool( XML_val, true ); return 0; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create() ); @@ -657,8 +658,9 @@ ContextHandlerRef RadarSeriesContext::onCreateContext( sal_Int32 nElement, const case C_TOKEN( marker ): return this; case C_TOKEN( smooth ): - // default is 'false', not 'true' as specified - mrModel.mbSmooth = rAttribs.getBool( XML_val, false ); + // TODO: fix for MSO 2007 behavior + // MSO 2007 writes false by default and not true + mrModel.mbSmooth = rAttribs.getBool( XML_val, true ); return 0; case C_TOKEN( val ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) ); @@ -695,8 +697,9 @@ ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, con case C_TOKEN( marker ): return this; case C_TOKEN( smooth ): - // default is 'false', not 'true' as specified - mrModel.mbSmooth = rAttribs.getBool( XML_val, false ); + // TODO: fix for MSO 2007 behavior + // MSO 2007 writes false by default and not true + mrModel.mbSmooth = rAttribs.getBool( XML_val, true ); return 0; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create() ); diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx index 8b7b7fbbc8bf..22107e97ffd7 100644 --- a/oox/source/drawingml/chart/typegroupcontext.cxx +++ b/oox/source/drawingml/chart/typegroupcontext.cxx @@ -232,8 +232,9 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con case C_TOKEN( ser ): return new LineSeriesContext( *this, mrModel.maSeries.create() ); case C_TOKEN( smooth ): - // default is 'false', not 'true' as specified - mrModel.mbSmooth = rAttribs.getBool( XML_val, false ); + // TODO: fix for MSO 2007 behavior + // MSO 2007 writes false by default and not true + mrModel.mbSmooth = rAttribs.getBool( XML_val, true ); return 0; case C_TOKEN( upDownBars ): return new UpDownBarsContext( *this, mrModel.mxUpDownBars.create() ); -- cgit