diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/drawingml/chart/typegroupmodel.hxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/chart/plotareaconverter.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/chart/typegroupconverter.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/chart/typegroupmodel.cxx | 3 |
4 files changed, 7 insertions, 3 deletions
diff --git a/oox/inc/drawingml/chart/typegroupmodel.hxx b/oox/inc/drawingml/chart/typegroupmodel.hxx index 031ecddf54aa..0803bf4e7a82 100644 --- a/oox/inc/drawingml/chart/typegroupmodel.hxx +++ b/oox/inc/drawingml/chart/typegroupmodel.hxx @@ -76,6 +76,7 @@ struct TypeGroupModel bool mbSmooth; /// True = smooth lines in line charts. bool mbVaryColors; /// True = different automatic colors for each point. bool mbWireframe; /// True = wireframe surface chart, false = filled surface chart. + bool mbCatAxisVisible; /// True = Category axis is visible. explicit TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc ); ~TypeGroupModel(); diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 8afdfda365ea..24ab5f0bfd3e 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -420,6 +420,8 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) for (auto const& axesSet : aAxesSets) { + if( !axesSet->maAxes.empty() && mrModel.maTypeGroups.size() > sal::static_int_cast<sal_uInt32>(nAxesSetIdx) ) + mrModel.maTypeGroups[nAxesSetIdx]->mbCatAxisVisible = !axesSet->maAxes[0]->mbDeleted; AxesSetConverter aAxesSetConv(*this, *axesSet); aAxesSetConv.convertFromModel( xDiagram, rView3DModel, nAxesSetIdx, bSupportsVaryColorsByPoint ); if(nAxesSetIdx == nStartAxesSetIdx) diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx index ea02d5ca548b..1b6b20865a48 100644 --- a/oox/source/drawingml/chart/typegroupconverter.cxx +++ b/oox/source/drawingml/chart/typegroupconverter.cxx @@ -272,7 +272,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence() first series, even if it was empty. */ for (auto const& elem : mrModel.maSeries) { - if( elem->maSources.has( SeriesModel::CATEGORIES ) ) + if( elem->maSources.has( SeriesModel::CATEGORIES ) && mrModel.mbCatAxisVisible) { SeriesConverter aSeriesConv(*this, *elem); xLabeledSeq = aSeriesConv.createCategorySequence( "categories" ); @@ -287,7 +287,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence() } } /* n#839727 Create Category Sequence when none are found */ - if( !xLabeledSeq.is() && !mrModel.maSeries.empty() ) { + if( !xLabeledSeq.is() && !mrModel.maSeries.empty() && mrModel.mbCatAxisVisible) { if( nMaxValues < 0 ) nMaxValues = 2; SeriesModel &aModel = *mrModel.maSeries.get(0); diff --git a/oox/source/drawingml/chart/typegroupmodel.cxx b/oox/source/drawingml/chart/typegroupmodel.cxx index f9a692c8a39b..aae01ed0f58e 100644 --- a/oox/source/drawingml/chart/typegroupmodel.cxx +++ b/oox/source/drawingml/chart/typegroupmodel.cxx @@ -56,7 +56,8 @@ TypeGroupModel::TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc ) : mbShowNegBubbles( !bMSO2007Doc ), mbSmooth( !bMSO2007Doc ), mbVaryColors( !bMSO2007Doc ), - mbWireframe( !bMSO2007Doc ) + mbWireframe( !bMSO2007Doc ), + mbCatAxisVisible( !bMSO2007Doc ) { } |