diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-20 04:59:15 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 06:44:27 +0200 |
commit | 684277ba017622f5b2d1396c915c1aa4cfaf98d5 (patch) | |
tree | 90eb9eaab8c9d114bcea08c52e1fe7681ccf8275 /oox/source/drawingml | |
parent | 1acbe79da41b61f43d86eaadba3ab5e51e65528c (diff) |
fix invertIfNegative MSO 2007 vs OOXML
Change-Id: I54a3eed05702bdfe1e1c625df6463399f38e9180
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/chart/seriescontext.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx index 6cf23a6464e8..5baa458561aa 100644 --- a/oox/source/drawingml/chart/seriescontext.cxx +++ b/oox/source/drawingml/chart/seriescontext.cxx @@ -315,6 +315,7 @@ DataPointContext::~DataPointContext() ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { + bool bMSO2007Doc = getFilter().isMSO2007Document(); switch( getCurrentElement() ) { case C_TOKEN( dPt ): @@ -331,8 +332,7 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); return 0; case C_TOKEN( invertIfNegative ): - // default is 'false', not 'true' as specified (value not derived from series!) - mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false ); + mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); return 0; case C_TOKEN( marker ): return this; @@ -451,6 +451,7 @@ BarSeriesContext::~BarSeriesContext() ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { + bool bMSO2007Doc = getFilter().isMSO2007Document(); switch( getCurrentElement() ) { case C_TOKEN( ser ): @@ -465,8 +466,7 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A case C_TOKEN( errBars ): return new ErrorBarContext( *this, mrModel.maErrorBars.create() ); case C_TOKEN( invertIfNegative ): - // default is 'false', not 'true' as specified - mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false ); + mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); return 0; case C_TOKEN( pictureOptions ): return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() ); @@ -495,6 +495,7 @@ BubbleSeriesContext::~BubbleSeriesContext() ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { + bool bMSO2007Doc = getFilter().isMSO2007Document(); switch( getCurrentElement() ) { case C_TOKEN( ser ): @@ -513,8 +514,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons case C_TOKEN( errBars ): return new ErrorBarContext( *this, mrModel.maErrorBars.create() ); case C_TOKEN( invertIfNegative ): - // default is 'false', not 'true' as specified - mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false ); + mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); return 0; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create() ); |