summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-08-15 09:12:17 +0200
committerJan Holesovsky <kendy@suse.cz>2011-08-15 13:11:53 +0200
commitfc3d82ad7acaa63e852d1d4ee39324e96ecd8810 (patch)
treee4012eccd95d847ab6503e9553d8dc1fa6c39534 /vcl
parentRemove unused mnBits from ValueSetItem. (diff)
downloadcore-fc3d82ad7acaa63e852d1d4ee39324e96ecd8810.tar.gz
core-fc3d82ad7acaa63e852d1d4ee39324e96ecd8810.zip
callcatcher: Remove unused Button methods.
mpBitmapEx member is unused after this too, remove.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/button.hxx8
-rw-r--r--vcl/source/control/button.cxx95
2 files changed, 3 insertions, 100 deletions
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 9bf72f8a45d2..32227345fb89 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -74,8 +74,6 @@ protected:
Button( WindowType nType );
public:
- Button( Window* pParent, WinBits nStyle = 0 );
- Button( Window* pParent, const ResId& rResId );
~Button();
virtual void Click();
@@ -92,16 +90,10 @@ public:
void SetImageAlign( ImageAlign eAlign );
ImageAlign GetImageAlign() const;
- sal_Bool SetModeBitmap( const BitmapEx& rBitmap );
- BitmapEx GetModeBitmap( ) const;
-
void EnableImageDisplay( sal_Bool bEnable );
- sal_Bool IsImageDisplayEnabled();
void EnableTextDisplay( sal_Bool bEnable );
- sal_Bool IsTextDisplayEnabled();
void SetFocusRect( const Rectangle& rFocusRect );
- const Rectangle& GetFocusRect() const;
void SetSmallSymbol (bool bSmall=true);
bool IsSmallSymbol () const;
};
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c65758b913c1..103c9a51f383 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -79,7 +79,6 @@ public:
sal_Bool mbSmallSymbol;
Image maImage;
- BitmapEx* mpBitmapEx;
ImageAlign meImageAlign;
SymbolAlign meSymbolAlign;
@@ -94,7 +93,6 @@ ImplCommonButtonData::ImplCommonButtonData()
mnButtonState = 0;
mbSmallSymbol = sal_False;
- mpBitmapEx = NULL;
meImageAlign = IMAGEALIGN_TOP;
meSymbolAlign = SYMBOLALIGN_LEFT;
}
@@ -102,7 +100,6 @@ ImplCommonButtonData::ImplCommonButtonData()
// -----------------------------------------------------------------------
ImplCommonButtonData::~ImplCommonButtonData()
{
- delete mpBitmapEx;
}
// =======================================================================
@@ -115,30 +112,6 @@ Button::Button( WindowType nType ) :
// -----------------------------------------------------------------------
-Button::Button( Window* pParent, WinBits nStyle ) :
- Control( WINDOW_BUTTON )
-{
- mpButtonData = new ImplCommonButtonData;
- ImplInit( pParent, nStyle, NULL );
-}
-
-// -----------------------------------------------------------------------
-
-Button::Button( Window* pParent, const ResId& rResId ) :
- Control( WINDOW_BUTTON )
-{
- rResId.SetRT( RSC_BUTTON );
- mpButtonData = new ImplCommonButtonData;
- WinBits nStyle = ImplInitRes( rResId );
- ImplInit( pParent, nStyle, NULL );
- ImplLoadRes( rResId );
-
- if ( !(nStyle & WB_HIDE) )
- Show();
-}
-
-// -----------------------------------------------------------------------
-
Button::~Button()
{
delete mpButtonData;
@@ -209,9 +182,6 @@ sal_Bool Button::SetModeImage( const Image& rImage )
{
if ( rImage != mpButtonData->maImage )
{
- delete mpButtonData->mpBitmapEx;
-
- mpButtonData->mpBitmapEx = NULL;
mpButtonData->maImage = rImage;
StateChanged( STATE_CHANGE_DATA );
@@ -248,41 +218,13 @@ ImageAlign Button::GetImageAlign() const
}
// -----------------------------------------------------------------------
-sal_Bool Button::SetModeBitmap( const BitmapEx& rBitmap )
-{
- if ( SetModeImage( rBitmap ) )
- {
- if ( !mpButtonData->mpBitmapEx )
- mpButtonData->mpBitmapEx = new BitmapEx( rBitmap );
- return sal_True;
- }
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-BitmapEx Button::GetModeBitmap( ) const
-{
- BitmapEx aBmp;
- if ( mpButtonData->mpBitmapEx )
- aBmp = *( mpButtonData->mpBitmapEx );
-
- return aBmp;
-}
-
-// -----------------------------------------------------------------------
void Button::SetFocusRect( const Rectangle& rFocusRect )
{
ImplSetFocusRect( rFocusRect );
}
// -----------------------------------------------------------------------
-const Rectangle& Button::GetFocusRect() const
-{
- return ImplGetFocusRect();
-}
-
-// -----------------------------------------------------------------------
const Rectangle& Button::ImplGetSymbolRect() const
{
@@ -377,16 +319,6 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
// check for HC mode ( image only! )
Image *pImage = &(mpButtonData->maImage);
- BitmapEx *pBitmapEx = mpButtonData->mpBitmapEx;
-
- if ( pBitmapEx && ( pDev->GetOutDevType() == OUTDEV_PRINTER ) )
- {
- // Die Groesse richtet sich nach dem Bildschirm, soll auf
- // dem Drucker genau so aussehen...
- MapMode aMap100thMM( MAP_100TH_MM );
- aImageSize = PixelToLogic( aImageSize, aMap100thMM );
- aImageSize = pDev->LogicToPixel( aImageSize, aMap100thMM );
- }
Size aTextSize;
Size aSymbolSize;
@@ -592,19 +524,10 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
- if ( pBitmapEx && ( pDev->GetOutDevType() == OUTDEV_PRINTER ) )
- {
- // Fuer die BitmapEx ueberlegt sich KA noch, wie man die disablete
- // Darstellung hinbekommt...
- pBitmapEx->Draw( pDev, aImagePos, aImageSize /*, nStyle*/ );
- }
+ if ( IsZoom() )
+ pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle );
else
- {
- if ( IsZoom() )
- pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle );
- else
- pDev->DrawImage( aImagePos, *pImage, nStyle );
- }
+ pDev->DrawImage( aImagePos, *pImage, nStyle );
if ( bDrawText )
{
@@ -689,12 +612,6 @@ void Button::EnableImageDisplay( sal_Bool bEnable )
}
// -----------------------------------------------------------------------
-sal_Bool Button::IsImageDisplayEnabled()
-{
- return (mpButtonData->mnButtonState & BUTTON_DRAW_NOIMAGE) == 0;
-}
-
-// -----------------------------------------------------------------------
void Button::EnableTextDisplay( sal_Bool bEnable )
{
if( bEnable )
@@ -704,12 +621,6 @@ void Button::EnableTextDisplay( sal_Bool bEnable )
}
// -----------------------------------------------------------------------
-sal_Bool Button::IsTextDisplayEnabled()
-{
- return (mpButtonData->mnButtonState & BUTTON_DRAW_NOTEXT) == 0;
-}
-
-// -----------------------------------------------------------------------
void Button::SetSmallSymbol (bool small)
{
ImplSetSmallSymbol (small);