Commits

Anonymous committed 4747e3b

vcl115: #i114666# fix some warnings (thanks pjanik!)

  • Participants
  • Parent commits b7d8e38

Comments (0)

Files changed (1)

svtools/source/filter.vcl/filter/exportdialog.cxx

 			}
 		}
 	}
-	return awt::Size( aShapesRange.getWidth(), aShapesRange.getHeight() );
+	return awt::Size( static_cast<sal_Int32>(aShapesRange.getWidth()), static_cast<sal_Int32>(aShapesRange.getHeight()) );
 }
 
 void ExportDialog::GetGraphicSource()
 		if ( fXRatio > 1.0 )
 		{
 			aSize.Width() =  maSize.Width > aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width();
-			aSize.Width() /= fXRatio;
+			aSize.Width() /= static_cast<long int>(fXRatio);
 		}
 		else
 		{
 			aSize.Width() =  maSize.Width < aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width();
-			aSize.Width() /= fXRatio;
+			aSize.Width() /= static_cast<long int>(fXRatio);
 		}
 
 		if ( fYRatio > 1.0 )
 		{
 			aSize.Height() =  maSize.Height > aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height();
-			aSize.Height() /= fYRatio;
+			aSize.Height() /= static_cast<long int>(fYRatio);
 		}
 		else
 		{
 			aSize.Height() =  maSize.Height < aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height();
-			aSize.Height() /= fYRatio;
+			aSize.Height() /= static_cast<long int>(fYRatio);
 		}
 
 		if ( aSize.Width() < maSize.Width )
 		Bitmap aCroppedBitmap( maBitmap );
 		aCroppedBitmap.Crop( Rectangle( aPos, aSize ) );
 		aSize = aCroppedBitmap.GetSizePixel();
-		aSize = Size( aSize.Width() * fXRatio, aSize.Height() * fYRatio );
+		aSize = Size( static_cast<long int>(aSize.Width() * fXRatio), static_cast<long int>(aSize.Height() * fYRatio) );
 		aCroppedBitmap.Scale( aSize );
 
 		if ( aSize.Width() > aFixedBitmapSize.Width() )
 		case 0 : nResolution = maResolution.Width / 100; break;		// pixels / cm
 		case 2 : nResolution = maResolution.Width; break;			// pixels / meter
 		default:
-		case 1 : nResolution = maResolution.Width * 0.0254; break;	// pixels / inch
+		case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break;	// pixels / inch
 	}
 	maNfResolution.SetValue( nResolution );