diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-08 08:59:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-08 10:01:43 +0000 |
commit | c52fbc04a9df0f2d894f11ef229d86dcf33edc7b (patch) | |
tree | 68dc41d7def52e8db4b96b64f79ce24e876c4712 /cui | |
parent | 881a93d3ab969454d52de1af95004ff3fbd5918f (diff) |
callcatcher: some unused methods
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 56 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 2 |
2 files changed, 0 insertions, 58 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5103e299c9e7..0fae48f193b8 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -5697,60 +5697,4 @@ SvxIconChangeDialog::SvxIconChangeDialog( aLineEditDescription.SetText(aMessage); } -BitmapEx SvxIconSelectorDialog::AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize) -{ - Point aEmptyPoint(0,0); - double imgposX = 0; - double imgposY = 0; - BitmapEx aRet = aBitmap; - double imgOldWidth = aRet.GetSizePixel().Width(); - double imgOldHeight =aRet.GetSizePixel().Height(); - - Size aScaledSize; - if (imgOldWidth >= aStandardSize || imgOldHeight >= aStandardSize) - { - sal_Int32 imgNewWidth = 0; - sal_Int32 imgNewHeight = 0; - - if (imgOldWidth >= imgOldHeight) - { - imgNewWidth = aStandardSize; - imgNewHeight = sal_Int32(imgOldHeight / (imgOldWidth / aStandardSize) + 0.5); - imgposX = 0; - imgposY = (aStandardSize - (imgOldHeight / (imgOldWidth / aStandardSize) + 0.5)) / 2 + 0.5; - } - else - { - imgNewHeight = aStandardSize; - imgNewWidth = sal_Int32(imgOldWidth / (imgOldHeight / aStandardSize) + 0.5); - imgposY = 0; - imgposX = (aStandardSize - (imgOldWidth / (imgOldHeight / aStandardSize) + 0.5)) / 2 + 0.5; - } - - aScaledSize = Size( imgNewWidth, imgNewHeight ); - aRet.Scale( aScaledSize, BMP_SCALE_INTERPOLATE ); - } - else - { - imgposX = (aStandardSize - imgOldWidth) / 2 + 0.5; - imgposY = (aStandardSize - imgOldHeight) / 2 + 0.5; - } - - Size aStdSize( aStandardSize, aStandardSize ); - Rectangle aRect(aEmptyPoint, aStdSize ); - - VirtualDevice aVirDevice( *Application::GetDefaultDevice(), 0, 1 ); - aVirDevice.SetOutputSizePixel( aStdSize ); - aVirDevice.SetFillColor( COL_TRANSPARENT ); - aVirDevice.SetLineColor( COL_TRANSPARENT ); - - //draw a rect into virDevice - aVirDevice.DrawRect( aRect ); - Point aPointPixel( (long)imgposX, (long)imgposY ); - aVirDevice.DrawBitmapEx( aPointPixel, aRet ); - aRet = aVirDevice.GetBitmapEx( aEmptyPoint, aStdSize ); - - return aRet; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 9bb95b62eafe..037a68c8ca7f 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -764,8 +764,6 @@ private: void ImportGraphics( const com::sun::star::uno::Sequence< rtl::OUString >& aURLs ); - BitmapEx AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize); - public: SvxIconSelectorDialog( |