diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-30 00:45:57 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-01-17 13:39:58 +0100 |
commit | 7e011f03a8af07bddc868cf476c13f9fd87d1eb6 (patch) | |
tree | 0c7d701483cf981470ec15a8c795138b614341c8 /oox | |
parent | cd66b523ca1c08e5641423d80f62efb27d68c2f7 (diff) |
tdf#121282, tdf#121279, set text properties also on complex data labels
Change-Id: I2304b6050b786b6e4a9a8a968d7a4846d9da8be8
Reviewed-on: https://gerrit.libreoffice.org/64306
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 6a04b9298ae993881d20fc4b5aa91516d4df6695)
Reviewed-on: https://gerrit.libreoffice.org/64309
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 5c380a7fe3b3399002aabdc980842ce46a50d012)
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 4d5f2dadfe59..b59860bbdc0f 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -124,6 +124,14 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( return xLabeledSeq; } +void convertTextProperty(PropertySet& rPropSet, ObjectFormatter& rFormatter, + DataLabelModelBase::TextBodyRef xTextProps) +{ + rFormatter.convertTextFormatting( rPropSet, xTextProps, OBJECTTYPE_DATALABEL ); + ObjectFormatter::convertTextRotation( rPropSet, xTextProps, false ); + ObjectFormatter::convertTextWrap( rPropSet, xTextProps ); +} + void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatter, const DataLabelModelBase& rDataLabel, const TypeGroupConverter& rTypeGroup, bool bDataSeriesLabel, bool bMSO2007Doc, const PropertySet* pSeriesPropSet ) @@ -171,10 +179,7 @@ void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatt rFormatter.convertNumberFormat( rPropSet, rDataLabel.maNumberFormat, false, bShowPercent ); // data label text formatting (frame formatting not supported by Chart2) - rFormatter.convertTextFormatting( rPropSet, rDataLabel.mxTextProp, OBJECTTYPE_DATALABEL ); - ObjectFormatter::convertTextRotation( rPropSet, rDataLabel.mxTextProp, false ); - ObjectFormatter::convertTextWrap( rPropSet, rDataLabel.mxTextProp ); - + 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() ) @@ -338,6 +343,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat } aPropSet.setProperty( PROP_CustomLabelFields, makeAny( aSequence ) ); + convertTextProperty(aPropSet, getFormatter(), mrModel.mxText->mxTextBody); } } catch( Exception& ) |