Kaydet (Commit) 0446cca0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Improved loplugin:redundantcast, static_cast on arithmetic types: chart2

Change-Id: I21dd484a2d337d16f59d5a747afaee230a1e7c89
üst b6fb8399
...@@ -638,7 +638,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const ...@@ -638,7 +638,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
{ {
OSL_ASSERT( m_apDataBrowserModel.get()); OSL_ASSERT( m_apDataBrowserModel.get());
if( nColumnId > 0 ) if( nColumnId > 0 )
return OUString( m_apDataBrowserModel->getRoleOfColumn( static_cast< sal_Int32 >( nColumnId ) - 1 )); return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 ));
return OUString(); return OUString();
} }
......
...@@ -75,7 +75,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const ...@@ -75,7 +75,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const
OSL_ASSERT(xProperties.is()); OSL_ASSERT(xProperties.is());
if( 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) if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{ {
rItemSet.Put(SvxDoubleItem( aValue, nWhichId )); rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
......
...@@ -208,7 +208,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const ...@@ -208,7 +208,7 @@ void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const
OSL_ASSERT(xProperties.is()); OSL_ASSERT(xProperties.is());
if( 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) if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{ {
rItemSet.Put(SvxDoubleItem( aValue, nWhichId )); rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
......
...@@ -163,8 +163,8 @@ uno::Sequence< sal_Int32 > VCoordinateSystem::getCoordinateSystemResolution( ...@@ -163,8 +163,8 @@ uno::Sequence< sal_Int32 > VCoordinateSystem::getCoordinateSystemResolution(
BaseGFXHelper::HomogenMatrixToB3DHomMatrix( BaseGFXHelper::HomogenMatrixToB3DHomMatrix(
m_aMatrixSceneToScreen ) ) ); m_aMatrixSceneToScreen ) ) );
double fCoosysWidth = static_cast< double >( fabs(aScale.getX()*FIXED_SIZE_FOR_3D_CHART_VOLUME)); double fCoosysWidth = fabs(aScale.getX()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
double fCoosysHeight = static_cast< double >( fabs(aScale.getY()*FIXED_SIZE_FOR_3D_CHART_VOLUME)); double fCoosysHeight = fabs(aScale.getY()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
double fPageWidth = rPageSize.Width; double fPageWidth = rPageSize.Width;
double fPageHeight = rPageSize.Height; double fPageHeight = rPageSize.Height;
......
...@@ -897,7 +897,7 @@ void VLegend::createShapes( ...@@ -897,7 +897,7 @@ void VLegend::createShapes(
double fViewFontSize = lcl_CalcViewFontSize( xLegendProp, rPageSize );//todo double fViewFontSize = lcl_CalcViewFontSize( xLegendProp, rPageSize );//todo
// #i109336# Improve auto positioning in chart // #i109336# Improve auto positioning in chart
sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 ); 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) for (LegendEntryProvider* pLegendEntryProvider : m_aLegendEntryProviderList)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment