summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 10:41:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:44:55 +0100
commit2dbd02b576f28224204ac962f6ce20fde6687093 (patch)
tree28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3 /chart2
parent48314f25241e014a634dd5371543b90137ffd2bc (diff)
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx2
-rw-r--r--chart2/qa/extras/chart2import.cxx2
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx2
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx8
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx8
-rw-r--r--chart2/source/view/main/ChartView.cxx2
7 files changed, 14 insertions, 14 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index fbbfdaa45277..e34f81a96daa 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1858,7 +1858,7 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
// Second series
- xDataSeries = uno::Reference<chart2::XDataSeries>(getDataSeriesFromDoc(xChartDoc, 0, 1));
+ xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index d0906b1c9164..e76090acd83d 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -1527,7 +1527,7 @@ void Chart2ImportTest::testTdf115107_2()
CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
// Second series
- xDataSeries = uno::Reference<chart2::XDataSeries>(getDataSeriesFromDoc(xChartDoc, 0, 1));
+ xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index 7cc51f8e478a..ed7b615917dc 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -69,7 +69,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
}
else if(eObjectType==OBJECTTYPE_LEGEND)
{
- xObjectProp->setPropertyValue( "AnchorPosition", uno::Any(LegendPosition(LegendPosition_CUSTOM)));
+ xObjectProp->setPropertyValue( "AnchorPosition", uno::Any(LegendPosition_CUSTOM));
xObjectProp->setPropertyValue( "Expansion", uno::Any(css::chart::ChartLegendExpansion_CUSTOM));
chart2::RelativePosition aRelativePosition;
chart2::RelativeSize aRelativeSize;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 02ea81e98232..238e4f21b514 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -930,8 +930,8 @@ void AreaChart::createShapes()
{
if(eAlignment==LABEL_ALIGN_CENTER || m_nDimension == 3 )
nOffset = 0;
- aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
- .transformSceneToScreenPosition( aScenePosition3D ) );
+ aScreenPosition2D = LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
+ .transformSceneToScreenPosition( aScenePosition3D );
}
createDataLabel( m_xTextTarget, *pSeries, nIndex
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index fb41194f0906..56bfb451e2b2 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -619,16 +619,16 @@ void NetChart::createShapes()
if( pPolarPosHelper )
{
PolarLabelPositionHelper aPolarLabelPositionHelper(pPolarPosHelper,m_nDimension,m_xLogicTarget,m_pShapeFactory);
- aScreenPosition2D = awt::Point( aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
- eAlignment, fLogicX, fLogicY, fLogicZ, nOffset ));
+ aScreenPosition2D = aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
+ eAlignment, fLogicX, fLogicY, fLogicZ, nOffset );
}
}
else
{
if(eAlignment==LABEL_ALIGN_CENTER )
nOffset = 0;
- aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
- .transformSceneToScreenPosition( aScenePosition3D ) );
+ aScreenPosition2D = LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
+ .transformSceneToScreenPosition( aScenePosition3D );
}
createDataLabel( m_xTextTarget, *pSeries, nIndex
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 2a72cfbd57dd..4f3c095a2afe 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -126,11 +126,11 @@ void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
//do not change aspect ratio
awt::Size aAspectRatio( static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionX*FIXED_SIZE_FOR_3D_CHART_VOLUME),
static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionY*FIXED_SIZE_FOR_3D_CHART_VOLUME ));
- m_aCurrentSizeWithoutAxes = awt::Size( ShapeFactory::calculateNewSizeRespectingAspectRatio(
- rAvailableSize, aAspectRatio ) );
+ m_aCurrentSizeWithoutAxes = ShapeFactory::calculateNewSizeRespectingAspectRatio(
+ rAvailableSize, aAspectRatio );
//center diagram position
- m_aCurrentPosWithoutAxes = awt::Point( ShapeFactory::calculateTopLeftPositionToCenterObject(
- rPos, rAvailableSize, m_aCurrentSizeWithoutAxes ) );
+ m_aCurrentPosWithoutAxes = ShapeFactory::calculateTopLeftPositionToCenterObject(
+ rPos, rAvailableSize, m_aCurrentSizeWithoutAxes );
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 02ad8a90720c..9a7a67c85881 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1621,7 +1621,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
{
m_bPointsWereSkipped = false;
- aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) );
+ aConsumedOuterRect = ShapeFactory::getRectangleOfShape(xBoundingShape);
::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() );
if (!rParam.mbUseFixedInnerSize)
aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect );