tdf#125444 Percentage as custom chart label
Support importing ooxml charts with a field of type "PERCENTAGE" as custom label. Change-Id: Ie8931f77e3b6199d98635422d11d776e675f6e5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86067 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
This commit is contained in:
@@ -528,6 +528,11 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
|
||||
aTextList[i] = DataSeriesHelper::getDataSeriesLabel( xSeries, aRole );
|
||||
break;
|
||||
}
|
||||
case DataPointCustomLabelFieldType_PERCENTAGE:
|
||||
{
|
||||
aTextList[i] = getLabelTextForValue( rDataSeries, nPointIndex, fValue, true );
|
||||
break;
|
||||
}
|
||||
case DataPointCustomLabelFieldType_CELLREF:
|
||||
{
|
||||
// TODO: for now doesn't show placeholder
|
||||
|
||||
@@ -23,11 +23,12 @@ enum DataPointCustomLabelFieldType
|
||||
SERIESNAME,
|
||||
CATEGORYNAME,
|
||||
CELLREF,
|
||||
NEWLINE
|
||||
NEWLINE,
|
||||
PERCENTAGE
|
||||
};
|
||||
|
||||
}; }; }; };
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
||||
@@ -245,6 +245,8 @@ DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( const OUString& r
|
||||
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME;
|
||||
else if (rField == "CELLREF")
|
||||
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF;
|
||||
else if (rField == "PERCENTAGE")
|
||||
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE;
|
||||
else
|
||||
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user