diff options
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 8fd572d98faf..01e1d72562c5 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -182,8 +182,12 @@ void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatt convertTextProperty(rPropSet, rFormatter, rDataLabel.mxTextProp); // data label separator (do not overwrite series separator, if no explicit point separator is present) - if( bDataSeriesLabel || rDataLabel.moaSeparator.has() ) + // Set the data label separator to "new line" if the value is shown as percentage with a category name, + // just like in MS-Office. In any other case the default separator will be a semicolon. + if( bShowPercent && !bShowValue && ( bDataSeriesLabel || rDataLabel.moaSeparator.has() ) ) rPropSet.setProperty( PROP_LabelSeparator, rDataLabel.moaSeparator.get( "\n" ) ); + else if( bDataSeriesLabel || rDataLabel.moaSeparator.has() ) + rPropSet.setProperty( PROP_LabelSeparator, rDataLabel.moaSeparator.get( "; " ) ); // data label placement (do not overwrite series placement, if no explicit point placement is present) if( bDataSeriesLabel || rDataLabel.monLabelPos.has() ) |