Kaydet (Commit) 684277ba authored tarafından Markus Mohrhard's avatar Markus Mohrhard

fix invertIfNegative MSO 2007 vs OOXML

Change-Id: I54a3eed05702bdfe1e1c625df6463399f38e9180
üst 1acbe79d
...@@ -315,6 +315,7 @@ DataPointContext::~DataPointContext() ...@@ -315,6 +315,7 @@ DataPointContext::~DataPointContext()
ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{ {
bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() ) switch( getCurrentElement() )
{ {
case C_TOKEN( dPt ): case C_TOKEN( dPt ):
...@@ -331,8 +332,7 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A ...@@ -331,8 +332,7 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A
mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 );
return 0; return 0;
case C_TOKEN( invertIfNegative ): case C_TOKEN( invertIfNegative ):
// default is 'false', not 'true' as specified (value not derived from series!) mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false );
return 0; return 0;
case C_TOKEN( marker ): case C_TOKEN( marker ):
return this; return this;
...@@ -451,6 +451,7 @@ BarSeriesContext::~BarSeriesContext() ...@@ -451,6 +451,7 @@ BarSeriesContext::~BarSeriesContext()
ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{ {
bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() ) switch( getCurrentElement() )
{ {
case C_TOKEN( ser ): case C_TOKEN( ser ):
...@@ -465,8 +466,7 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A ...@@ -465,8 +466,7 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A
case C_TOKEN( errBars ): case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create() ); return new ErrorBarContext( *this, mrModel.maErrorBars.create() );
case C_TOKEN( invertIfNegative ): case C_TOKEN( invertIfNegative ):
// default is 'false', not 'true' as specified mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false );
return 0; return 0;
case C_TOKEN( pictureOptions ): case C_TOKEN( pictureOptions ):
return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() ); return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() );
...@@ -495,6 +495,7 @@ BubbleSeriesContext::~BubbleSeriesContext() ...@@ -495,6 +495,7 @@ BubbleSeriesContext::~BubbleSeriesContext()
ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{ {
bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() ) switch( getCurrentElement() )
{ {
case C_TOKEN( ser ): case C_TOKEN( ser ):
...@@ -513,8 +514,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons ...@@ -513,8 +514,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons
case C_TOKEN( errBars ): case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create() ); return new ErrorBarContext( *this, mrModel.maErrorBars.create() );
case C_TOKEN( invertIfNegative ): case C_TOKEN( invertIfNegative ):
// default is 'false', not 'true' as specified mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
mrModel.mbInvertNeg = rAttribs.getBool( XML_val, false );
return 0; return 0;
case C_TOKEN( trendline ): case C_TOKEN( trendline ):
return new TrendlineContext( *this, mrModel.maTrendlines.create() ); return new TrendlineContext( *this, mrModel.maTrendlines.create() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment