summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-20 06:21:17 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-21 06:45:26 +0200
commit4c3cfe60ac05d5404e3f2a92fff7af2d2f38628a (patch)
tree47d5141591f3c93c138d5face9968c287f41ad16 /oox/source/drawingml
parent5fa0adf25cfcb71129e05e7218cde46874306c15 (diff)
MSO 2007 vs OOXML default values
includes: fix data label delete element handling According to the xsd: <xsd:choice> <xsd:element name="delete" type="CT_Boolean" minOccurs="1" maxOccurs="1"/> <xsd:group ref="Group_DLbl" minOccurs="1" maxOccurs="1"/> </xsd:choice> which is just insane. Therefore as soon as we hit a non-delete element we assume that the entry is not deleted. Change-Id: Ifa8a59fef200250b931dcb1559d4866cb26bd98f
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/chart/plotareacontext.cxx3
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx3
-rw-r--r--oox/source/drawingml/chart/seriescontext.cxx48
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx6
-rw-r--r--oox/source/drawingml/chart/seriesmodel.cxx38
-rw-r--r--oox/source/drawingml/chart/typegroupcontext.cxx30
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx1
7 files changed, 70 insertions, 59 deletions
diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx
index acbe4f12d0e3..f50deb1e2025 100644
--- a/oox/source/drawingml/chart/plotareacontext.cxx
+++ b/oox/source/drawingml/chart/plotareacontext.cxx
@@ -87,6 +87,7 @@ WallFloorContext::~WallFloorContext()
ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() )
{
case C_TOKEN( backWall ):
@@ -95,7 +96,7 @@ ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const A
switch( nElement )
{
case C_TOKEN( pictureOptions ):
- return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() );
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
case C_TOKEN( spPr ):
return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
}
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index bc054ce8767f..f8ea9fe6032d 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -272,6 +272,7 @@ WallFloorConverter::~WallFloorConverter()
void WallFloorConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, ObjectType eObjType )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
if( rxDiagram.is() )
{
PropertySet aPropSet;
@@ -282,7 +283,7 @@ void WallFloorConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
default: OSL_FAIL( "WallFloorConverter::convertFromModel - invalid object type" );
}
if( aPropSet.is() )
- getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(), eObjType );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), eObjType );
}
}
diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx
index aa179fb60233..dc8d10f4cc5e 100644
--- a/oox/source/drawingml/chart/seriescontext.cxx
+++ b/oox/source/drawingml/chart/seriescontext.cxx
@@ -97,6 +97,7 @@ DataLabelContext::~DataLabelContext()
ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
+ mrModel.mbDeleted = false;
if( isRootElement() ) switch( nElement )
{
case C_TOKEN( idx ):
@@ -127,11 +128,12 @@ DataLabelsContext::~DataLabelsContext()
ContextHandlerRef DataLabelsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
+ mrModel.mbDeleted = false;
bool bMSO2007Doc = getFilter().isMSO2007Document();
if( isRootElement() ) switch( nElement )
{
case C_TOKEN( dLbl ):
- return new DataLabelContext( *this, mrModel.maPointLabels.create() );
+ return new DataLabelContext( *this, mrModel.maPointLabels.create(bMSO2007Doc) );
case C_TOKEN( leaderLines ):
return new ShapePrWrapperContext( *this, mrModel.mxLeaderLines.create() );
case C_TOKEN( showLeaderLines ):
@@ -333,7 +335,7 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A
case C_TOKEN( marker ):
return this;
case C_TOKEN( pictureOptions ):
- return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() );
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
case C_TOKEN( spPr ):
return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
}
@@ -413,6 +415,7 @@ AreaSeriesContext::~AreaSeriesContext()
ContextHandlerRef AreaSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() )
{
case C_TOKEN( ser ):
@@ -423,11 +426,11 @@ ContextHandlerRef AreaSeriesContext::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( trendline ):
- return new TrendlineContext( *this, mrModel.maTrendlines.create() );
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
case C_TOKEN( val ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
}
@@ -456,21 +459,21 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A
case C_TOKEN( cat ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
case C_TOKEN( invertIfNegative ):
mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( pictureOptions ):
- return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() );
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
case C_TOKEN( shape ):
mrModel.monShape = rAttribs.getToken( bMSO2007Doc ? XML_val : XML_box );
return 0;
case C_TOKEN( trendline ):
- return new TrendlineContext( *this, mrModel.maTrendlines.create() );
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
case C_TOKEN( val ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
}
@@ -502,16 +505,16 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons
case C_TOKEN( bubbleSize ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::POINTS ) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
case C_TOKEN( invertIfNegative ):
mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( trendline ):
- return new TrendlineContext( *this, mrModel.maTrendlines.create() );
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
case C_TOKEN( xVal ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( yVal ):
@@ -542,9 +545,9 @@ ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( cat ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
case C_TOKEN( marker ):
@@ -553,7 +556,7 @@ ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const
mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( trendline ):
- return new TrendlineContext( *this, mrModel.maTrendlines.create() );
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
case C_TOKEN( val ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
}
@@ -573,6 +576,7 @@ PieSeriesContext::~PieSeriesContext()
ContextHandlerRef PieSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() )
{
case C_TOKEN( ser ):
@@ -581,9 +585,9 @@ ContextHandlerRef PieSeriesContext::onCreateContext( sal_Int32 nElement, const A
case C_TOKEN( cat ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( explosion ):
mrModel.mnExplosion = rAttribs.getInteger( XML_val, 0 );
return 0;
@@ -615,9 +619,9 @@ ContextHandlerRef RadarSeriesContext::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( cat ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( marker ):
return this;
case C_TOKEN( smooth ):
@@ -649,9 +653,9 @@ ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, con
switch( nElement )
{
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dPt ):
- return new DataPointContext( *this, mrModel.maPoints.create() );
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
case C_TOKEN( errBars ):
return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
case C_TOKEN( marker ):
@@ -660,7 +664,7 @@ ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, con
mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( trendline ):
- return new TrendlineContext( *this, mrModel.maTrendlines.create() );
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
case C_TOKEN( xVal ):
return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
case C_TOKEN( yVal ):
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index b5ccede3228a..38c265aa42a7 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -510,6 +510,7 @@ DataPointConverter::~DataPointConverter()
void DataPointConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries,
const TypeGroupConverter& rTypeGroup, const SeriesModel& rSeries )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
try
{
PropertySet aPropSet( rxDataSeries->getDataPointByIndex( mrModel.mnIndex ) );
@@ -527,7 +528,7 @@ void DataPointConverter::convertFromModel( const Reference< XDataSeries >& rxDat
if( mrModel.mxShapeProp.is() )
{
if( rTypeGroup.getTypeInfo().mbPictureOptions )
- getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(), rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
else
getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
}
@@ -631,8 +632,9 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
// series formatting
ObjectFormatter& rFormatter = getFormatter();
ObjectType eObjType = rTypeGroup.getSeriesObjectType();
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
if( rTypeInfo.mbPictureOptions )
- rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(), eObjType, mrModel.mnIndex );
+ rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), eObjType, mrModel.mnIndex );
else
rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, eObjType, mrModel.mnIndex );
diff --git a/oox/source/drawingml/chart/seriesmodel.cxx b/oox/source/drawingml/chart/seriesmodel.cxx
index 79ec3cf752cd..f6a4140d7314 100644
--- a/oox/source/drawingml/chart/seriesmodel.cxx
+++ b/oox/source/drawingml/chart/seriesmodel.cxx
@@ -24,8 +24,8 @@ namespace oox {
namespace drawingml {
namespace chart {
-DataLabelModelBase::DataLabelModelBase() :
- mbDeleted( false )
+DataLabelModelBase::DataLabelModelBase(bool bMSO2007Doc) :
+ mbDeleted( !bMSO2007Doc )
{
}
@@ -33,7 +33,8 @@ DataLabelModelBase::~DataLabelModelBase()
{
}
-DataLabelModel::DataLabelModel() :
+DataLabelModel::DataLabelModel(bool bMSO2007Doc) :
+ DataLabelModelBase(bMSO2007Doc),
mnIndex( -1 )
{
}
@@ -42,8 +43,9 @@ DataLabelModel::~DataLabelModel()
{
}
-DataLabelsModel::DataLabelsModel() :
- mbShowLeaderLines( false )
+DataLabelsModel::DataLabelsModel(bool bMSO2007Doc) :
+ DataLabelModelBase(bMSO2007Doc),
+ mbShowLeaderLines( !bMSO2007Doc )
{
}
@@ -51,12 +53,12 @@ DataLabelsModel::~DataLabelsModel()
{
}
-PictureOptionsModel::PictureOptionsModel() :
+PictureOptionsModel::PictureOptionsModel(bool bMSO2007Doc) :
mfStackUnit( 1.0 ),
mnPictureFormat( XML_stretch ),
- mbApplyToFront( false ),
- mbApplyToSides( false ),
- mbApplyToEnd( false )
+ mbApplyToFront( !bMSO2007Doc ),
+ mbApplyToSides( !bMSO2007Doc ),
+ mbApplyToEnd( !bMSO2007Doc )
{
}
@@ -85,12 +87,12 @@ TrendlineLabelModel::~TrendlineLabelModel()
{
}
-TrendlineModel::TrendlineModel() :
+TrendlineModel::TrendlineModel(bool bMSO2007Doc) :
mnOrder( 2 ),
mnPeriod( 2 ),
mnTypeId( XML_linear ),
- mbDispEquation( false ),
- mbDispRSquared( false )
+ mbDispEquation( !bMSO2007Doc ),
+ mbDispRSquared( !bMSO2007Doc )
{
}
@@ -98,9 +100,9 @@ TrendlineModel::~TrendlineModel()
{
}
-DataPointModel::DataPointModel() :
+DataPointModel::DataPointModel(bool bMSO2007Doc) :
mnIndex( -1 ),
- mbInvertNeg( false )
+ mbInvertNeg( !bMSO2007Doc )
{
}
@@ -108,15 +110,15 @@ DataPointModel::~DataPointModel()
{
}
-SeriesModel::SeriesModel() :
+SeriesModel::SeriesModel(bool bMSO2007Doc) :
mnExplosion( 0 ),
mnIndex( -1 ),
mnMarkerSize( 5 ),
mnMarkerSymbol( XML_auto ),
mnOrder( -1 ),
- mbBubble3d( false ),
- mbInvertNeg( false ),
- mbSmooth( false )
+ mbBubble3d( !bMSO2007Doc ),
+ mbInvertNeg( !bMSO2007Doc ),
+ mbSmooth( !bMSO2007Doc )
{
}
diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx
index b3fa86a60b17..b55ad96c9b0d 100644
--- a/oox/source/drawingml/chart/typegroupcontext.cxx
+++ b/oox/source/drawingml/chart/typegroupcontext.cxx
@@ -76,7 +76,7 @@ ContextHandlerRef AreaTypeGroupContext::onCreateContext( sal_Int32 nElement, con
mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dropLines ):
return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() );
case C_TOKEN( gapDepth ):
@@ -86,7 +86,7 @@ ContextHandlerRef AreaTypeGroupContext::onCreateContext( sal_Int32 nElement, con
mrModel.mnGrouping = rAttribs.getToken( XML_val, XML_standard );
return 0;
case C_TOKEN( ser ):
- return new AreaSeriesContext( *this, mrModel.maSeries.create() );
+ return new AreaSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( varyColors ):
mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
@@ -115,7 +115,7 @@ ContextHandlerRef BarTypeGroupContext::onCreateContext( sal_Int32 nElement, cons
mrModel.mnBarDir = rAttribs.getToken( XML_val, XML_col );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( gapDepth ):
mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 );
return 0;
@@ -130,7 +130,7 @@ ContextHandlerRef BarTypeGroupContext::onCreateContext( sal_Int32 nElement, cons
mrModel.mnOverlap = rAttribs.getInteger( XML_val, 0 );
return 0;
case C_TOKEN( ser ):
- return new BarSeriesContext( *this, mrModel.maSeries.create() );
+ return new BarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( serLines ):
return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() );
case C_TOKEN( shape ):
@@ -167,9 +167,9 @@ ContextHandlerRef BubbleTypeGroupContext::onCreateContext( sal_Int32 nElement, c
mrModel.mnBubbleScale = rAttribs.getInteger( XML_val, 100 );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( ser ):
- return new BubbleSeriesContext( *this, mrModel.maSeries.create() );
+ return new BubbleSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( showNegBubbles ):
mrModel.mbShowNegBubbles = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
@@ -201,7 +201,7 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con
mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( dropLines ):
return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() );
case C_TOKEN( gapDepth ):
@@ -216,7 +216,7 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con
mrModel.mbShowMarker = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( ser ):
- return new LineSeriesContext( *this, mrModel.maSeries.create() );
+ return new LineSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( smooth ):
mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
@@ -244,7 +244,7 @@ ContextHandlerRef PieTypeGroupContext::onCreateContext( sal_Int32 nElement, cons
if( isRootElement() ) switch( nElement )
{
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( firstSliceAng ):
mrModel.mnFirstAngle = rAttribs.getInteger( XML_val, 0 );
return 0;
@@ -261,7 +261,7 @@ ContextHandlerRef PieTypeGroupContext::onCreateContext( sal_Int32 nElement, cons
mrModel.mnSecondPieSize = rAttribs.getInteger( XML_val, 75 );
return 0;
case C_TOKEN( ser ):
- return new PieSeriesContext( *this, mrModel.maSeries.create() );
+ return new PieSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( serLines ):
return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() );
case C_TOKEN( splitPos ):
@@ -295,12 +295,12 @@ ContextHandlerRef RadarTypeGroupContext::onCreateContext( sal_Int32 nElement, co
mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( radarStyle ):
mrModel.mnRadarStyle = rAttribs.getToken( XML_val, XML_standard );
return 0;
case C_TOKEN( ser ):
- return new RadarSeriesContext( *this, mrModel.maSeries.create() );
+ return new RadarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( varyColors ):
mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
@@ -326,12 +326,12 @@ ContextHandlerRef ScatterTypeGroupContext::onCreateContext( sal_Int32 nElement,
mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
return 0;
case C_TOKEN( dLbls ):
- return new DataLabelsContext( *this, mrModel.mxLabels.create() );
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
case C_TOKEN( scatterStyle ):
mrModel.mnScatterStyle = rAttribs.getInteger( XML_val, XML_marker );
return 0;
case C_TOKEN( ser ):
- return new ScatterSeriesContext( *this, mrModel.maSeries.create() );
+ return new ScatterSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( varyColors ):
mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
@@ -357,7 +357,7 @@ ContextHandlerRef SurfaceTypeGroupContext::onCreateContext( sal_Int32 nElement,
mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
return 0;
case C_TOKEN( ser ):
- return new SurfaceSeriesContext( *this, mrModel.maSeries.create() );
+ return new SurfaceSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
case C_TOKEN( wireframe ):
mrModel.mbWireframe = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index ba65b1f68ecb..f2f69349eb94 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -265,6 +265,7 @@ Reference< XCoordinateSystem > TypeGroupConverter::createCoordinateSystem()
Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence()
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
sal_Int32 nMaxValues = 0;
Reference< XLabeledDataSequence > xLabeledSeq;
/* Find first existing category sequence. The bahaviour of Excel 2007 is