diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 03:25:03 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 06:44:32 +0200 |
commit | 1478d2c37e57db1ee869f8ca5573b7dc7c7d6a51 (patch) | |
tree | 354afca25402041c1477dc1c89941f135a85d67a /oox | |
parent | 0791b8f1d35f2795ff87e21d04395b3ec8bd831d (diff) |
fix TypeGroup MSO 2007 vs OOXML default values
Change-Id: I0d01e5b8d5f284ee3049debaf9fba0012dae005d
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/drawingml/chart/typegroupmodel.hxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/chart/plotareacontext.cxx | 17 | ||||
-rw-r--r-- | oox/source/drawingml/chart/typegroupcontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/chart/typegroupmodel.cxx | 14 |
4 files changed, 18 insertions, 17 deletions
diff --git a/oox/inc/drawingml/chart/typegroupmodel.hxx b/oox/inc/drawingml/chart/typegroupmodel.hxx index 72d5586c3395..ea40faa83a1c 100644 --- a/oox/inc/drawingml/chart/typegroupmodel.hxx +++ b/oox/inc/drawingml/chart/typegroupmodel.hxx @@ -77,7 +77,7 @@ struct TypeGroupModel bool mbVaryColors; /// True = different automatic colors for each point. bool mbWireframe; /// True = wireframe surface chart, false = filled surface chart. - explicit TypeGroupModel( sal_Int32 nTypeId ); + explicit TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc ); ~TypeGroupModel(); }; diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx index 53cb1ae9c9ee..acbe4f12d0e3 100644 --- a/oox/source/drawingml/chart/plotareacontext.cxx +++ b/oox/source/drawingml/chart/plotareacontext.cxx @@ -146,6 +146,7 @@ PlotAreaContext::~PlotAreaContext() ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const AttributeList& ) { + bool bMSO2007Doc = getFilter().isMSO2007Document(); switch( getCurrentElement() ) { case C_TOKEN( plotArea ): @@ -153,28 +154,28 @@ ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( area3DChart ): case C_TOKEN( areaChart ): - return new AreaTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new AreaTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( bar3DChart ): case C_TOKEN( barChart ): - return new BarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new BarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( bubbleChart ): - return new BubbleTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new BubbleTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( line3DChart ): case C_TOKEN( lineChart ): case C_TOKEN( stockChart ): - return new LineTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new LineTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( doughnutChart ): case C_TOKEN( ofPieChart ): case C_TOKEN( pie3DChart ): case C_TOKEN( pieChart ): - return new PieTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new PieTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( radarChart ): - return new RadarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new RadarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( scatterChart ): - return new ScatterTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new ScatterTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( surface3DChart ): case C_TOKEN( surfaceChart ): - return new SurfaceTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) ); + return new SurfaceTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) ); case C_TOKEN( catAx ): return new CatAxisContext( *this, mrModel.maAxes.create( nElement ) ); diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx index ae3f4477770b..63546f953f0b 100644 --- a/oox/source/drawingml/chart/typegroupcontext.cxx +++ b/oox/source/drawingml/chart/typegroupcontext.cxx @@ -227,7 +227,7 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con case C_TOKEN( upDownBars ): return new UpDownBarsContext( *this, mrModel.mxUpDownBars.create() ); case C_TOKEN( varyColors ): - mrModel.mbVaryColors = rAttribs.getBool( XML_val, bMSO2007Doc ); + mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); return 0; } return 0; diff --git a/oox/source/drawingml/chart/typegroupmodel.cxx b/oox/source/drawingml/chart/typegroupmodel.cxx index f27f6dac9341..e8b3d11f5218 100644 --- a/oox/source/drawingml/chart/typegroupmodel.cxx +++ b/oox/source/drawingml/chart/typegroupmodel.cxx @@ -33,7 +33,7 @@ UpDownBarsModel::~UpDownBarsModel() { } -TypeGroupModel::TypeGroupModel( sal_Int32 nTypeId ) : +TypeGroupModel::TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc ) : mfSplitPos( 0.0 ), mnBarDir( XML_col ), mnBubbleScale( 100 ), @@ -51,12 +51,12 @@ TypeGroupModel::TypeGroupModel( sal_Int32 nTypeId ) : mnSizeRepresents( XML_area ), mnSplitType( XML_auto ), mnTypeId( nTypeId ), - mbBubble3d( false ), - mbShowMarker( false ), - mbShowNegBubbles( false ), - mbSmooth( false ), - mbVaryColors( false ), - mbWireframe( false ) + mbBubble3d( !bMSO2007Doc ), + mbShowMarker( !bMSO2007Doc ), + mbShowNegBubbles( !bMSO2007Doc ), + mbSmooth( !bMSO2007Doc ), + mbVaryColors( !bMSO2007Doc ), + mbWireframe( !bMSO2007Doc ) { } |