diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2011-05-16 22:09:46 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2011-05-16 22:09:46 +0200 |
commit | dca0391318ca9a88ef89ce89da7588732a47f43b (patch) | |
tree | 40d7d1874ea8128434bf2c674ed8663503bd4a50 /chart2/source | |
parent | 080f1432c76bc235aa9d084b6a3b69711ab07dd6 (diff) |
WaE - add explicit casting (decimal-types → integer types)
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/axes/ScaleAutomatism.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/axes/Tickmarks_Dates.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 4eb1a92d21c0..f2ad9b27939b 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -619,7 +619,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet { TimeInterval aTimeInterval; aScale.TimeIncrement.MajorTimeInterval >>= aTimeInterval; - aTimeInterval.Number = static_cast<double>(fValue); + aTimeInterval.Number = static_cast<sal_Int32>(fValue); aScale.TimeIncrement.MajorTimeInterval = uno::makeAny( aTimeInterval ); bSetScale = true; } diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index c188fec09a0c..36258acd74e4 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -714,7 +714,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( } } rExplicitIncrement.MajorTimeInterval.Number = nNumer; - nMainIncrementCount = nDayCount/(nNumer*nDaysPerInterval); + nMainIncrementCount = static_cast<long>(nDayCount/(nNumer*nDaysPerInterval)); } //choose minor time interval: diff --git a/chart2/source/view/axes/Tickmarks_Dates.cxx b/chart2/source/view/axes/Tickmarks_Dates.cxx index b5177fe307b8..fa466b755824 100644 --- a/chart2/source/view/axes/Tickmarks_Dates.cxx +++ b/chart2/source/view/axes/Tickmarks_Dates.cxx @@ -82,8 +82,8 @@ void DateTickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& r Date aNull(m_aScale.NullDate); - Date aDate = aNull + ::rtl::math::approxFloor(m_aScale.Minimum); - Date aMaxDate = aNull + ::rtl::math::approxFloor(m_aScale.Maximum); + Date aDate = aNull + static_cast<long>(::rtl::math::approxFloor(m_aScale.Minimum)); + Date aMaxDate = aNull + static_cast<long>(::rtl::math::approxFloor(m_aScale.Maximum)); uno::Reference< chart2::XScaling > xScaling(m_aScale.Scaling); uno::Reference< chart2::XScaling > xInverseScaling(m_xInverseScaling); @@ -125,7 +125,7 @@ void DateTickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& r } //create minor date tickinfos - aDate = aNull + ::rtl::math::approxFloor(m_aScale.Minimum); + aDate = aNull + static_cast<long>(::rtl::math::approxFloor(m_aScale.Minimum)); while( aDate<= aMaxDate ) { if( bShifted && aDate==aMaxDate ) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 5592a75b3939..7a128669c921 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1189,11 +1189,11 @@ long VSeriesPlotter::calculateTimeResolutionOnXAxis() aNullDate = m_apNumberFormatterWrapper->getNullDate(); if( aIt!=aEnd ) { - Date aPrevious(aNullDate); aPrevious+=rtl::math::approxFloor(aIt->fValue); + Date aPrevious(aNullDate); aPrevious+=static_cast<long>(rtl::math::approxFloor(aIt->fValue)); ++aIt; for(;aIt!=aEnd;++aIt) { - Date aCurrent(aNullDate); aCurrent+=rtl::math::approxFloor(aIt->fValue); + Date aCurrent(aNullDate); aCurrent+=static_cast<long>(rtl::math::approxFloor(aIt->fValue)); if( ::com::sun::star::chart::TimeUnit::YEAR == nRet ) { if( DateHelper::IsInSameYear( aPrevious, aCurrent ) ) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 5835233ec8ca..0c074aea367a 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -898,8 +898,8 @@ void VLegend::createShapes( RelativeSize aRelativeSize; if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize)) { - aLegendSize.Width = ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ); - aLegendSize.Height = ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ); + aLegendSize.Width = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width )); + aLegendSize.Height = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height )); } else eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH; |