summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorIngrid Halama <iha@openoffice.org>2011-03-14 18:02:00 +0100
committerIngrid Halama <iha@openoffice.org>2011-03-14 18:02:00 +0100
commitffd2c7b2b15f46b00fc802a49a27a971a9dee2d4 (patch)
tree8f25f292e2d849c400d8e8bfff93b17118a3e7bc /chart2
parent47b3e51e5d5351e8036a53e6deb555509fecf9e1 (diff)
calc66: #i117358# Compiler Warning Errors
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx2
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx2
-rw-r--r--chart2/source/view/axes/Tickmarks_Dates.cxx6
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx4
-rw-r--r--chart2/source/view/main/VLegend.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 95f7d45bc27f..bce22df7eb58 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -618,7 +618,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 075ad16347c2..e97635ae1578 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -693,7 +693,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
if(nNumer<=0)
nNumer=1;
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 1077591dfce8..d8402e45f1f4 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1194,11 +1194,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 33e1d1f26aa4..e7c681d80781 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -918,8 +918,8 @@ void VLegend::createShapes(
RelativeSize aRelativeSize;
if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize))
{
- aLegendSize.Width = aRelativeSize.Primary * rPageSize.Width;
- aLegendSize.Height = aRelativeSize.Secondary * rPageSize.Height;
+ aLegendSize.Width = static_cast<sal_Int32>( ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ) ); //i117185
+ aLegendSize.Height = static_cast<sal_Int32>( ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ) ); //i117185
}
else
eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH;