summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/chart/seriesconverter.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-09-30 13:51:36 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-09-30 13:51:36 +0000
commit07cabd8e634679ff59db4d72eacdfb514feb3cd1 (patch)
tree41b064504b537ff35a017aad8373870ae2cc1738 /oox/source/drawingml/chart/seriesconverter.cxx
parenta53f44d8fba07d9f7a79ac594a85b1059f1ae4a6 (diff)
CWS-TOOLING: integrate CWS dr63
Diffstat (limited to 'oox/source/drawingml/chart/seriesconverter.cxx')
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 9ed373e52b74..621108a2d019 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -8,7 +8,7 @@
*
* $RCSfile: seriesconverter.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.4.6.2 $
*
* This file is part of OpenOffice.org.
*
@@ -90,7 +90,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
Reference< XLabeledDataSequence > xLabeledSeq;
if( xValueSeq.is() || xTitleSeq.is() )
{
- xLabeledSeq.set( ConverterRoot::createInstance( CREATE_OUSTRING( "com.sun.star.chart2.data.LabeledDataSequence" ) ), UNO_QUERY );
+ xLabeledSeq.set( rParent.createInstance( CREATE_OUSTRING( "com.sun.star.chart2.data.LabeledDataSequence" ) ), UNO_QUERY );
if( xLabeledSeq.is() )
{
xLabeledSeq->setValues( xValueSeq );
@@ -526,23 +526,27 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
ObjectType eObjType = rTypeGroup.getSeriesObjectType();
rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, eObjType, mrModel.mnIndex );
- // set the property default value used by the Chart2 templates (true for pie/doughnut charts)
- aSeriesProp.setProperty( CREATE_OUSTRING( "VaryColorsByPoint" ), rTypeInfo.meTypeCategory == TYPECATEGORY_PIE );
+ // set the (unused) property default value used by the Chart2 templates (true for pie/doughnut charts)
+ bool bIsPie = rTypeInfo.meTypeCategory == TYPECATEGORY_PIE;
+ aSeriesProp.setProperty( CREATE_OUSTRING( "VaryColorsByPoint" ), bIsPie );
+
// own area formatting for every data point (TODO: varying line color not supported)
- if( bVaryColorsByPoint && rTypeGroup.isSeriesFrameFormat() && ObjectFormatter::isAutomaticFill( mrModel.mxShapeProp ) )
+ // #i91271# always set area formatting for every point in pie/doughnut charts to override their automatic point formatting
+ if( bIsPie || (bVaryColorsByPoint && rTypeGroup.isSeriesFrameFormat() && ObjectFormatter::isAutomaticFill( mrModel.mxShapeProp )) )
{
/* Set the series point number as color cycle size at the object
formatter to get correct start-shade/end-tint. TODO: in doughnut
charts, the sizes of the series may vary, need to use the maximum
point count of all series. */
sal_Int32 nOldMax = rFormatter.getMaxSeriesIndex();
- rFormatter.setMaxSeriesIndex( nDataPointCount - 1 );
+ if( bVaryColorsByPoint )
+ rFormatter.setMaxSeriesIndex( nDataPointCount - 1 );
for( sal_Int32 nIndex = 0; nIndex < nDataPointCount; ++nIndex )
{
try
{
PropertySet aPointProp( xDataSeries->getDataPointByIndex( nIndex ) );
- rFormatter.convertAutomaticFill( aPointProp, eObjType, nIndex );
+ rFormatter.convertAutomaticFill( aPointProp, eObjType, bVaryColorsByPoint ? nIndex : mrModel.mnIndex );
}
catch( Exception& )
{