summaryrefslogtreecommitdiff
path: root/cui/source/customize/cfg.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-08 08:59:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-08 10:01:43 +0000
commitc52fbc04a9df0f2d894f11ef229d86dcf33edc7b (patch)
tree68dc41d7def52e8db4b96b64f79ce24e876c4712 /cui/source/customize/cfg.cxx
parent881a93d3ab969454d52de1af95004ff3fbd5918f (diff)
callcatcher: some unused methods
Diffstat (limited to 'cui/source/customize/cfg.cxx')
-rw-r--r--cui/source/customize/cfg.cxx56
1 files changed, 0 insertions, 56 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: */