[Libreoffice-commits] core.git: chart2/source
Stephan Bergmann
sbergman at redhat.com
Thu Jun 29 08:35:44 UTC 2017
chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 2 +-
chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 2 +-
chart2/source/inc/ChartTypeHelper.hxx | 2 +-
chart2/source/model/template/ChartTypeTemplate.cxx | 4 ++--
chart2/source/tools/ChartTypeHelper.cxx | 4 +---
chart2/source/view/charttypes/AreaChart.cxx | 2 +-
chart2/source/view/charttypes/BarChart.cxx | 2 +-
chart2/source/view/charttypes/BubbleChart.cxx | 2 +-
chart2/source/view/charttypes/NetChart.cxx | 2 +-
chart2/source/view/charttypes/PieChart.cxx | 2 +-
chart2/source/view/inc/VDataSeries.hxx | 2 +-
chart2/source/view/main/VDataSeries.cxx | 4 ++--
12 files changed, 14 insertions(+), 16 deletions(-)
New commits:
commit 63a76a0d3d73bebe29a2d17d777d8e8d9e52e224
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 29 10:30:52 2017 +0200
ChartTypeHelper::getSupportedLabelPlacements nDimensionCount was ignored
...ever since the code's integration with
124d934dffd8737db2d4375029c5a8b3880acaec "INTEGRATION: CWS chart17: #i63857#,
#i4039# more flexible placement of data point labels, best fit for pie labels"
Change-Id: I942d7ff128d0b9e42ede371f81860f3c67943879
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 92ad703e036e..6b516b9ced9e 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -230,7 +230,7 @@ DataPointItemConverter::DataPointItemConverter(
bool bFound = false;
bool bAmbiguous = false;
bool bSwapXAndY = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
- m_aAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements( xChartType, DiagramHelper::getDimension( xDiagram ), bSwapXAndY, xSeries );
+ m_aAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements( xChartType, bSwapXAndY, xSeries );
m_bForbidPercentValue = ChartTypeHelper::getAxisType( xChartType, 0 ) != AxisType::CATEGORY;
}
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 3a20a3b9b800..9beb4eb5f072 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -202,7 +202,7 @@ TextLabelItemConverter::TextLabelItemConverter(
bool bFound = false;
bool bAmbiguous = false;
bool bSwapXAndY = DiagramHelper::getVertical(xDiagram, bFound, bAmbiguous);
- maAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements(xChartType, DiagramHelper::getDimension(xDiagram), bSwapXAndY, xSeries);
+ maAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements(xChartType, bSwapXAndY, xSeries);
mbForbidPercentValue = ChartTypeHelper::getAxisType(xChartType, 0) != AxisType::CATEGORY;
}
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index 67b57bf3dd62..bd21130d3689 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -53,7 +53,7 @@ public:
//returns sequence of css::chart::DataLabelPlacement
static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
- const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, bool bSwapXAndY
+ const css::uno::Reference< css::chart2::XChartType >& xChartType, bool bSwapXAndY
, const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
//returns sequence of css::chart::MissingValueTreatment
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 8e9e02dfa2c1..7afedc734ba3 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -400,7 +400,7 @@ void SAL_CALL ChartTypeTemplate::applyStyle(
//ensure valid label placement
{
uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
- getChartTypeForIndex( nChartTypeIndex ), getDimension(), isSwapXAndY(), xSeries ) );
+ getChartTypeForIndex( nChartTypeIndex ), isSwapXAndY(), xSeries ) );
lcl_ensureCorrectLabelPlacement( xSeriesProp, aAvailablePlacements );
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
@@ -489,7 +489,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram
continue;
uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
- xChartType, getDimension(), isSwapXAndY(), xSeries ) );
+ xChartType, isSwapXAndY(), xSeries ) );
if(!aAvailablePlacements.getLength())
continue;
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 4a473bd6214c..11d05e83c642 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -236,11 +236,9 @@ bool ChartTypeHelper::isSupportingBarConnectors(
}
uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const uno::Reference< chart2::XChartType >& xChartType
- , sal_Int32 nDimensionCount, bool bSwapXAndY
+ , bool bSwapXAndY
, const uno::Reference< chart2::XDataSeries >& xSeries )
{
- (void)nDimensionCount;
-
uno::Sequence < sal_Int32 > aRet;
if( !xChartType.is() )
return aRet;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 22bb663d8791..2bedb8a64142 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -931,7 +931,7 @@ void AreaChart::createShapes()
, aScenePosition.PositionY
, aScenePosition.PositionZ+this->getTransformedDepth() );
- sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, m_nDimension, pPosHelper->isSwapXAndY() );
+ sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, pPosHelper->isSwapXAndY() );
switch(nLabelPlacement)
{
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 8273c6ac65b3..1cb6196d5915 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -826,7 +826,7 @@ void BarChart::createShapes()
double fLogicSum = aLogicYSumMap[nAttachedAxisIndex];
LabelAlignment eAlignment(LABEL_ALIGN_CENTER);
- sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nPointIndex, m_xChartTypeModel, m_nDimension, pPosHelper->isSwapXAndY() );
+ sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nPointIndex, m_xChartTypeModel, pPosHelper->isSwapXAndY() );
double fLowerBarDepth = fLogicBarDepth;
double fUpperBarDepth = fLogicBarDepth;
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index c02766421adf..e78738a0e85e 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -338,7 +338,7 @@ void BubbleChart::createShapes()
, aScenePosition.PositionY
, aScenePosition.PositionZ+this->getTransformedDepth() );
- sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, m_nDimension, pPosHelper->isSwapXAndY() );
+ sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, pPosHelper->isSwapXAndY() );
switch(nLabelPlacement)
{
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 648df7e12dde..ba896e3eb4e8 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -619,7 +619,7 @@ void NetChart::createShapes()
, aScenePosition.PositionY
, aScenePosition.PositionZ+this->getTransformedDepth() );
- sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, m_nDimension, pPosHelper->isSwapXAndY() );
+ sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nIndex, m_xChartTypeModel, pPosHelper->isSwapXAndY() );
switch(nLabelPlacement)
{
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 2ab8946f28c4..729cef58edd6 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -274,7 +274,7 @@ void PieChart::createTextLabelShape(
///get the required label placement type. Available placements are
///`AVOID_OVERLAP`, `CENTER`, `OUTSIDE` and `INSIDE`;
sal_Int32 nLabelPlacement = rSeries.getLabelPlacement(
- nPointIndex, m_xChartTypeModel, m_nDimension, m_pPosHelper->isSwapXAndY());
+ nPointIndex, m_xChartTypeModel, m_pPosHelper->isSwapXAndY());
///when the placement is of `AVOID_OVERLAP` type a later rearrangement of
///the label position is allowed; the `createTextLabelShape` treats the
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index f547cb4013ce..1566c642c745 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -107,7 +107,7 @@ public:
sal_Int32 getLabelPlacement(
sal_Int32 nPointIndex, const css::uno::Reference<css::chart2::XChartType>& xChartType,
- sal_Int32 nDimensionCount, bool bSwapXAndY ) const;
+ bool bSwapXAndY ) const;
css::uno::Reference<css::beans::XPropertySet> getPropertiesOfPoint( sal_Int32 index ) const;
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index c6590b4729bf..1c9f6061ef9b 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -620,7 +620,7 @@ sal_Int32 VDataSeries::detectNumberFormatKey( sal_Int32 index ) const
return nRet;
}
-sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, bool bSwapXAndY ) const
+sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Reference< chart2::XChartType >& xChartType, bool bSwapXAndY ) const
{
sal_Int32 nLabelPlacement=0;
try
@@ -632,7 +632,7 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
//ensure that the set label placement is supported by this charttype
uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
- xChartType, nDimensionCount, bSwapXAndY, m_xDataSeries ) );
+ xChartType, bSwapXAndY, m_xDataSeries ) );
for( sal_Int32 nN = 0; nN < aAvailablePlacements.getLength(); nN++ )
if( aAvailablePlacements[nN] == nLabelPlacement )
More information about the Libreoffice-commits
mailing list