Kaydet (Commit) 4cd9b2fb authored tarafından Caolán McNamara's avatar Caolán McNamara

WaE: doubles truncated to floats

Change-Id: I42b67cc0670f3d0990708fb299243098c1aa972b
üst 2b168fec
......@@ -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)
......
......@@ -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 ) );
......
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