[Libreoffice-commits] core.git: chart2/source
Kohei Yoshida
kohei.yoshida at collabora.com
Tue Jul 22 07:23:52 PDT 2014
chart2/source/view/charttypes/AreaChart.cxx | 2 +-
chart2/source/view/charttypes/BarChart.cxx | 12 ++++++------
chart2/source/view/charttypes/BubbleChart.cxx | 2 +-
chart2/source/view/charttypes/CandleStickChart.cxx | 8 ++++----
chart2/source/view/charttypes/NetChart.cxx | 2 +-
chart2/source/view/charttypes/PieChart.cxx | 2 +-
chart2/source/view/charttypes/VSeriesPlotter.cxx | 15 +++++++--------
7 files changed, 21 insertions(+), 22 deletions(-)
New commits:
commit d96a5c6770bb7b13814e12de1cc30cc0163e8eb8
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Jul 22 10:16:21 2014 -0400
Remove "this->". Pointless.
Change-Id: I6256c9087eec1f8b9745af6eef23fa59d697f835
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 8febf93..0501736 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -989,7 +989,7 @@ void AreaChart::createShapes()
.transformSceneToScreenPosition( aScenePosition3D ) );
}
- this->createDataLabel( m_xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( m_xTextTarget, **aSeriesIter, nIndex
, fLogicValueForLabeDisplay
, rLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment, nOffset );
}
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 6e9aa3e..c75b1a6 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -843,10 +843,9 @@ void BarChart::createShapes()
}
}
- awt::Point aScreenPosition2D( this->getLabelScreenPositionAndAlignment(
- eAlignment, nLabelPlacement
- , fLogicX, fLowerYValue, fUpperYValue, fLogicZ
- , fLowerBarDepth, fUpperBarDepth, fBaseValue, pPosHelper ));
+ awt::Point aScreenPosition2D = getLabelScreenPositionAndAlignment(
+ eAlignment, nLabelPlacement, fLogicX, fLowerYValue, fUpperYValue, fLogicZ,
+ fLowerBarDepth, fUpperBarDepth, fBaseValue, pPosHelper);
sal_Int32 nOffset = 0;
if(LABEL_ALIGN_CENTER!=eAlignment)
{
@@ -854,8 +853,9 @@ void BarChart::createShapes()
if( m_nDimension == 3 )
nOffset = 260;
}
- this->createDataLabel( xTextTarget, **aSeriesIter, nPointIndex
- , fLogicValueForLabeDisplay, fLogicSum, aScreenPosition2D, eAlignment, nOffset );
+ createDataLabel(
+ xTextTarget, **aSeriesIter, nPointIndex,
+ fLogicValueForLabeDisplay, fLogicSum, aScreenPosition2D, eAlignment, nOffset);
}
}//end iteration through partial points
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index dc1204e..d79d382 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -385,7 +385,7 @@ void BubbleChart::createShapes()
sal_Int32 nOffset = 0;
if(LABEL_ALIGN_CENTER!=eAlignment)
nOffset = 100;//add some spacing //@todo maybe get more intelligent values
- this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fBubbleSize, fBubbleSize, aScreenPosition2D, eAlignment, nOffset );
}
}
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 3c62b26..50e3d2f 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -303,16 +303,16 @@ void CandleStickChart::createShapes()
if( (**aSeriesIter).getDataPointLabelIfLabel(nIndex) )
{
if(isValidPosition(aPosMiddleFirst))
- this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fUnscaledY_First, 1.0, Position3DToAWTPoint(aPosMiddleFirst), LABEL_ALIGN_LEFT_BOTTOM );
if(isValidPosition(aPosMiddleLast))
- this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fUnscaledY_Last, 1.0, Position3DToAWTPoint(aPosMiddleLast), LABEL_ALIGN_RIGHT_TOP );
if(isValidPosition(aPosMiddleMinimum))
- this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fUnscaledY_Min, 1.0, Position3DToAWTPoint(aPosMiddleMinimum), LABEL_ALIGN_BOTTOM );
if(isValidPosition(aPosMiddleMaximum))
- this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fUnscaledY_Max, 1.0, Position3DToAWTPoint(aPosMiddleMaximum), LABEL_ALIGN_TOP );
}
}//next series in x slot (next y slot)
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 314af2e..854fc07 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -678,7 +678,7 @@ void NetChart::createShapes()
.transformSceneToScreenPosition( aScenePosition3D ) );
}
- this->createDataLabel( m_xTextTarget, **aSeriesIter, nIndex
+ createDataLabel( m_xTextTarget, **aSeriesIter, nIndex
, fLogicValueForLabeDisplay
, aLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment, nOffset );
}
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 48940f9..eedc03ed 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -492,7 +492,7 @@ void PieChart::createShapes()
}
double nVal = pSeries->getYValue( nPointIndex );
- aPieLabelInfo.xTextShape = this->createDataLabel( xTextTarget, *pSeries, nPointIndex
+ aPieLabelInfo.xTextShape = createDataLabel( xTextTarget, *pSeries, nPointIndex
, nVal, fLogicYSum, aScreenPosition2D, eAlignment );
uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY );
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 26dfdce..5bd4125 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -435,9 +435,10 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
else if(LABEL_ALIGN_BOTTOM==eAlignment)
aScreenPosition2D.Y += nOffset;
- uno::Reference< drawing::XShapes > xTarget_(
- m_pShapeFactory->createGroup2D( this->getLabelsGroupShape(rDataSeries, xTarget)
- , ObjectIdentifier::createPointCID( rDataSeries.getLabelCID_Stub(),nPointIndex ) ) );
+ uno::Reference< drawing::XShapes > xTarget_ =
+ m_pShapeFactory->createGroup2D(
+ getLabelsGroupShape(rDataSeries, xTarget),
+ ObjectIdentifier::createPointCID( rDataSeries.getLabelCID_Stub(), nPointIndex));
//check whether the label needs to be created and how:
DataPointLabel* pLabel = rDataSeries.getDataPointLabelIfLabel( nPointIndex );
@@ -459,7 +460,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
if(pLabel->ShowLegendSymbol)
{
sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 );
- awt::Size aCurrentRatio = this->getPreferredLegendKeyAspectRatio();
+ awt::Size aCurrentRatio = getPreferredLegendKeyAspectRatio();
sal_Int32 nSymbolWidth = aCurrentRatio.Width;
if( aCurrentRatio.Height > 0 )
{
@@ -508,8 +509,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
if(pLabel->ShowNumber)
{
- OUString aNumber( this->getLabelTextForValue( rDataSeries
- , nPointIndex, fValue, false /*bAsPercentage*/ ) );
+ OUString aNumber = getLabelTextForValue(rDataSeries, nPointIndex, fValue, false);
if( !aNumber.isEmpty() )
{
if(!aText.isEmpty())
@@ -527,8 +527,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
if( fValue < 0 )
fValue*=-1.0;
- OUString aPercentage( this->getLabelTextForValue( rDataSeries
- , nPointIndex, fValue, true /*bAsPercentage*/ ) );
+ OUString aPercentage = getLabelTextForValue(rDataSeries, nPointIndex, fValue, true);
if( !aPercentage.isEmpty() )
{
if(!aText.isEmpty())
More information about the Libreoffice-commits
mailing list