summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-06 18:33:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-06 18:33:05 +0200
commit0446cca0b6c4a4b3a9dcdaee957b6ff8aaba3135 (patch)
tree07af0c6d5dc5ae6d26c8662b93ee69e52df54f26 /chart2
parentb6fb8399524fecc9d8714328d65cee5e75027dd7 (diff)
Improved loplugin:redundantcast, static_cast on arithmetic types: chart2
Change-Id: I21dd484a2d337d16f59d5a747afaee230a1e7c89
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx2
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx4
-rw-r--r--chart2/source/view/main/VLegend.cxx2
5 files changed, 6 insertions, 6 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 1661e0aa1365..678f26cab127 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -638,7 +638,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
{
OSL_ASSERT( m_apDataBrowserModel.get());
if( nColumnId > 0 )
- return OUString( m_apDataBrowserModel->getRoleOfColumn( static_cast< sal_Int32 >( nColumnId ) - 1 ));
+ return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 ));
return OUString();
}
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index b220caacce93..ef80018a7bb5 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -75,7 +75,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const
OSL_ASSERT(xProperties.is());
if( xProperties.is() )
{
- double aValue = static_cast<double>(static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue());
+ double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue();
if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{
rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index 472da2f121d6..dc48db2d0fa9 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -208,7 +208,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const
OSL_ASSERT(xProperties.is());
if( xProperties.is() )
{
- double aValue = static_cast<double>(static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue());
+ double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue();
if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{
rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index d9440207c956..0cafa1560f5e 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -163,8 +163,8 @@ uno::Sequence< sal_Int32 > VCoordinateSystem::getCoordinateSystemResolution(
BaseGFXHelper::HomogenMatrixToB3DHomMatrix(
m_aMatrixSceneToScreen ) ) );
- double fCoosysWidth = static_cast< double >( fabs(aScale.getX()*FIXED_SIZE_FOR_3D_CHART_VOLUME));
- double fCoosysHeight = static_cast< double >( fabs(aScale.getY()*FIXED_SIZE_FOR_3D_CHART_VOLUME));
+ double fCoosysWidth = fabs(aScale.getX()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
+ double fCoosysHeight = fabs(aScale.getY()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
double fPageWidth = rPageSize.Width;
double fPageHeight = rPageSize.Height;
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index e2d9b735cefd..b20fa6e6b075 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -897,7 +897,7 @@ void VLegend::createShapes(
double fViewFontSize = lcl_CalcViewFontSize( xLegendProp, rPageSize );//todo
// #i109336# Improve auto positioning in chart
sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 );
- sal_Int32 nSymbolWidth = static_cast< sal_Int32 >( nSymbolHeight );
+ sal_Int32 nSymbolWidth = nSymbolHeight;
for (LegendEntryProvider* pLegendEntryProvider : m_aLegendEntryProviderList)
{