diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2020-09-17 16:49:02 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-10-09 09:24:18 +0200 |
commit | 20da1a5dd37c7edac620566c992d5a53b23a5f12 (patch) | |
tree | c86ca1c4d3617889469ee1cf8ddb7d3d36e07d0c /oox | |
parent | 4777f5a0512655552c8803a7378926ad7c02da71 (diff) |
tdf#134978 Chart OOXML Import: fix pie chart label custom position
Follow-up of commit dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3
(tdf#130032 Chart OOXML Import: fix data label custom position).
Change-Id: Iaaf4ae654ac0c1b4896a53be6034e6c027412df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102981
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 6 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 007c76cf8e1f..416e6c32e638 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -283,10 +283,14 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo(); bool bIsPie = rTypeInfo.meTypeCategory == TYPECATEGORY_PIE; - if( mrModel.mxLayout && !mrModel.mxLayout->mbAutoLayout && !bIsPie ) + if( mrModel.mxLayout && !mrModel.mxLayout->mbAutoLayout ) { RelativePosition aPos(mrModel.mxLayout->mfX, mrModel.mxLayout->mfY, css::drawing::Alignment_TOP_LEFT); aPropSet.setProperty(PROP_CustomLabelPosition, aPos); + sal_Int32 nPlacement = -1; + if (bIsPie && aPropSet.getProperty(nPlacement, PROP_LabelPlacement) + && nPlacement == css::chart::DataLabelPlacement::AVOID_OVERLAP) + aPropSet.setProperty(PROP_LabelPlacement, css::chart::DataLabelPlacement::CUSTOM); } if (mrModel.mxShapeProp) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 0e3cff0d4a95..5b52d312c091 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -3297,6 +3297,7 @@ const char* toOOXMLPlacement( sal_Int32 nPlacement ) case css::chart::DataLabelPlacement::BOTTOM: return "b"; case css::chart::DataLabelPlacement::LEFT: return "l"; case css::chart::DataLabelPlacement::RIGHT: return "r"; + case css::chart::DataLabelPlacement::CUSTOM: case css::chart::DataLabelPlacement::AVOID_OVERLAP: return "bestFit"; default: ; |