summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-22 17:19:12 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-06-22 17:38:50 +0200
commit9a6542d6ef25ccaf78ea26e02693a6c0299b3765 (patch)
treea62007979e1371a4f811c72565df6bffda73ab68 /framework
parent694dd2cf2a109f233df5011d64defcd4254f9975 (diff)
use generic names rather than specific algorithm names when scaling
The Lanczos scaling is of very good quality, but it's rather slow, which can be very noticeable with large images, so it's not a very good default for everything. And in general, it's not good to refer to a specific algorithm when all one usually wants is fast/default/best. Some of these changes are a bit of a guess between default/best, but the general logic is that best should be used only for images that won't be large or where the possible waiting does not matter. Conflicts: svtools/source/graphic/grfmgr2.cxx Change-Id: I53765507ecb7ed167890f6dd05e73fe53ffd0231
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx6
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 844f109af0ce..f284d77688a4 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1358,13 +1358,13 @@ void AddonsOptions_Impl::ReadImageFromURL( ImageSize nImageSize, const ::rtl::OU
if ( aBmpSize != aNoScaleSize )
{
BitmapEx aNoScaleBmp( aBitmapEx );
- aNoScaleBmp.Scale( aNoScaleSize, BMP_SCALE_LANCZOS );
+ aNoScaleBmp.Scale( aNoScaleSize, BMP_SCALE_BEST );
}
else
aImageNoScale = Image( aBitmapEx );
if ( aBmpSize != aSize )
- aBitmapEx.Scale( aSize, BMP_SCALE_LANCZOS );
+ aBitmapEx.Scale( aSize, BMP_SCALE_BEST );
aImage = Image( aBitmapEx );
}
@@ -1512,7 +1512,7 @@ sal_Bool AddonsOptions_Impl::CreateImageFromSequence( Image& rImage, sal_Bool bB
// Scale bitmap to fit the correct size for the menu/toolbar. Use best quality
if ( aBitmapEx.GetSizePixel() != aSize )
- aBitmapEx.Scale( aSize, BMP_SCALE_LANCZOS );
+ aBitmapEx.Scale( aSize, BMP_SCALE_BEST );
if( !aBitmapEx.IsTransparent() )
{
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index a1a494ab4177..3d47d4c4d2c8 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -214,7 +214,7 @@ sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, con
{
::Size aNoScaleSize( aBmpSize.Width(), aSize.Height() );
if ( aBmpSize != aNoScaleSize )
- aBitmapEx.Scale( aNoScaleSize, BMP_SCALE_LANCZOS );
+ aBitmapEx.Scale( aNoScaleSize, BMP_SCALE_BEST );
aImage = Image( aBitmapEx );
return sal_True;
}