chartpositioning: #i86609# add trendline label converter class

This commit is contained in:
Daniel Rentz 2009-12-03 14:22:57 +01:00
parent 0cd4e15a40
commit 71b8656b0c
2 changed files with 31 additions and 2 deletions

View file

@ -104,6 +104,18 @@ private:
// ============================================================================
class TrendlineLabelConverter : public ConverterBase< TrendlineLabelModel >
{
public:
explicit TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel );
virtual ~TrendlineLabelConverter();
/** Converts the OOXML trendline label. */
void convertFromModel( PropertySet& rPropSet );
};
// ============================================================================
class TrendlineConverter : public ConverterBase< TrendlineModel >
{
public:

View file

@ -348,6 +348,23 @@ Reference< XLabeledDataSequence > ErrorBarConverter::createLabeledDataSequence(
// ============================================================================
TrendlineLabelConverter::TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel ) :
ConverterBase< TrendlineLabelModel >( rParent, rModel )
{
}
TrendlineLabelConverter::~TrendlineLabelConverter()
{
}
void TrendlineLabelConverter::convertFromModel( PropertySet& rPropSet )
{
// formatting
getFormatter().convertFormatting( rPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_TRENDLINELABEL );
}
// ============================================================================
TrendlineConverter::TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel ) :
ConverterBase< TrendlineModel >( rParent, rModel )
{
@ -389,8 +406,8 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat
// #i83100# formatting of the equation text box
if( mrModel.mbDispEquation || mrModel.mbDispRSquared )
{
TrendlineLabelModel& rLabel = mrModel.mxLabel.getOrCreate();
getFormatter().convertFormatting( aLabelProp, rLabel.mxShapeProp, rLabel.mxTextProp, OBJECTTYPE_TRENDLINELABEL );
TrendlineLabelConverter aLabelConv( *this, mrModel.mxLabel.getOrCreate() );
aLabelConv.convertFromModel( aLabelProp );
}
// unsupported: #i5085# manual trendline size