Kaydet (Commit) 6a04b929 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst d8d231f9
......@@ -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& )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment