summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-02 10:22:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-02 11:20:33 +0100
commit4cd9b2fbd39cca3553588ae9f61e674f1416a582 (patch)
treef2ec1db74b53c837104efb332c40dc5e1fa83b0e
parent2b168feccee9c367152e106386101be903e4f1db (diff)
WaE: doubles truncated to floats
Change-Id: I42b67cc0670f3d0990708fb299243098c1aa972b
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx2
-rw-r--r--chart2/source/view/main/VTitle.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index c693a0b58a33..f1194f03a101 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -466,7 +466,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
if( xProps.is() )
xProps->getPropertyValue( C2U( "CharHeight" )) >>= fViewFontSize;
// pt -> 1/100th mm
- fViewFontSize *= (2540.0 / 72.0);
+ fViewFontSize *= (2540.0f / 72.0f);
}
Reference< drawing::XShape > xSymbol;
if(pLabel->ShowLegendSymbol)
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index c6d7754de8c5..bfbecdfcd571 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -248,10 +248,10 @@ void VTitle::createShapes(
float fFontHeight = 0.0;
if ( xShapeProp.is() && ( xShapeProp->getPropertyValue( C2U( "CharHeight" ) ) >>= fFontHeight ) )
{
- fFontHeight *= ( 2540. / 72. ); // pt -> 1/100 mm
- float fXFraction = 0.18;
+ fFontHeight *= ( 2540.0f / 72.0f ); // pt -> 1/100 mm
+ float fXFraction = 0.18f;
sal_Int32 nXDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * fXFraction ) );
- float fYFraction = 0.30;
+ float fYFraction = 0.30f;
sal_Int32 nYDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * fYFraction ) );
xShapeProp->setPropertyValue( C2U( "TextLeftDistance" ), uno::makeAny( nXDistance ) );
xShapeProp->setPropertyValue( C2U( "TextRightDistance" ), uno::makeAny( nXDistance ) );