diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/DataSeriesProperties.cxx | 7 | ||||
-rw-r--r-- | chart2/source/model/main/DataSeriesProperties.hxx | 3 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 3 |
4 files changed, 12 insertions, 3 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index f9b2651a922c..754768880054 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -2373,7 +2373,7 @@ void Chart2ExportTest::testLeaderLines() xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1"); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "0"); } void Chart2ExportTest::testNumberFormatExportPPTX() diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx index 5d0cb777e151..d85d264753c1 100644 --- a/chart2/source/model/main/DataSeriesProperties.cxx +++ b/chart2/source/model/main/DataSeriesProperties.cxx @@ -69,6 +69,12 @@ void DataSeriesProperties::AddPropertiesToVector( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID ); + rOutProperties.emplace_back( "ShowCustomLeaderLines", + PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, + cppu::UnoType<sal_Bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); + // add properties of service DataPointProperties DataPointProperties::AddPropertiesToVector( rOutProperties ); } @@ -80,6 +86,7 @@ void DataSeriesProperties::AddDefaultsToMap( PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_VARY_COLORS_BY_POINT, false ); PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATASERIES_ATTACHED_AXIS_INDEX, 0 ); PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_SHOW_LEGEND_ENTRY, true ); + PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, true ); // PROP_DATASERIES_ATTRIBUTED_DATA_POINTS has no default diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx index e20602baf45f..6bc058201466 100644 --- a/chart2/source/model/main/DataSeriesProperties.hxx +++ b/chart2/source/model/main/DataSeriesProperties.hxx @@ -35,7 +35,8 @@ namespace chart::DataSeriesProperties PROP_DATASERIES_VARY_COLORS_BY_POINT, PROP_DATASERIES_ATTACHED_AXIS_INDEX, PROP_DATASERIES_SHOW_LEGEND_ENTRY, - PROP_DATASERIES_DELETED_LEGEND_ENTRIES + PROP_DATASERIES_DELETED_LEGEND_ENTRIES, + PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES }; void AddPropertiesToVector( diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 14b322e8f587..8f7dcbb59a1d 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -702,7 +702,8 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re if( aRelPos.X != -1 ) { xTextShape->setPosition(aRelPos); - if( !m_xChartTypeModel->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( !m_xChartTypeModel->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) && + rDataSeries.getPropertiesOfSeries()->getPropertyValue( "ShowCustomLeaderLines" ).get<sal_Bool>()) { sal_Int32 nX1 = rScreenPosition2D.X; sal_Int32 nY1 = rScreenPosition2D.Y; |