Kaydet (Commit) fc3d82ad authored tarafından Jan Holesovsky's avatar Jan Holesovsky

callcatcher: Remove unused Button methods.

mpBitmapEx member is unused after this too, remove.
üst d17cc35e
...@@ -14,13 +14,6 @@ BitmapPalette::IsGreyPalette() const ...@@ -14,13 +14,6 @@ BitmapPalette::IsGreyPalette() const
BreakPointList::clear() BreakPointList::clear()
BreakPointList::push_back(BreakPoint*) BreakPointList::push_back(BreakPoint*)
BufferNode::childAt(int) const BufferNode::childAt(int) const
Button::Button(Window*, ResId const&)
Button::Button(Window*, long)
Button::GetFocusRect() const
Button::GetModeBitmap() const
Button::IsImageDisplayEnabled()
Button::IsTextDisplayEnabled()
Button::SetModeBitmap(BitmapEx const&)
ButtonDialog::AddButton(PushButton*, unsigned short, unsigned short, long) ButtonDialog::AddButton(PushButton*, unsigned short, unsigned short, long)
ButtonDialog::ButtonDialog(Window*, ResId const&) ButtonDialog::ButtonDialog(Window*, ResId const&)
ButtonDialog::GetButtonHelpId(unsigned short) const ButtonDialog::GetButtonHelpId(unsigned short) const
......
...@@ -74,8 +74,6 @@ protected: ...@@ -74,8 +74,6 @@ protected:
Button( WindowType nType ); Button( WindowType nType );
public: public:
Button( Window* pParent, WinBits nStyle = 0 );
Button( Window* pParent, const ResId& rResId );
~Button(); ~Button();
virtual void Click(); virtual void Click();
...@@ -92,16 +90,10 @@ public: ...@@ -92,16 +90,10 @@ public:
void SetImageAlign( ImageAlign eAlign ); void SetImageAlign( ImageAlign eAlign );
ImageAlign GetImageAlign() const; ImageAlign GetImageAlign() const;
sal_Bool SetModeBitmap( const BitmapEx& rBitmap );
BitmapEx GetModeBitmap( ) const;
void EnableImageDisplay( sal_Bool bEnable ); void EnableImageDisplay( sal_Bool bEnable );
sal_Bool IsImageDisplayEnabled();
void EnableTextDisplay( sal_Bool bEnable ); void EnableTextDisplay( sal_Bool bEnable );
sal_Bool IsTextDisplayEnabled();
void SetFocusRect( const Rectangle& rFocusRect ); void SetFocusRect( const Rectangle& rFocusRect );
const Rectangle& GetFocusRect() const;
void SetSmallSymbol (bool bSmall=true); void SetSmallSymbol (bool bSmall=true);
bool IsSmallSymbol () const; bool IsSmallSymbol () const;
}; };
......
...@@ -79,7 +79,6 @@ public: ...@@ -79,7 +79,6 @@ public:
sal_Bool mbSmallSymbol; sal_Bool mbSmallSymbol;
Image maImage; Image maImage;
BitmapEx* mpBitmapEx;
ImageAlign meImageAlign; ImageAlign meImageAlign;
SymbolAlign meSymbolAlign; SymbolAlign meSymbolAlign;
...@@ -94,7 +93,6 @@ ImplCommonButtonData::ImplCommonButtonData() ...@@ -94,7 +93,6 @@ ImplCommonButtonData::ImplCommonButtonData()
mnButtonState = 0; mnButtonState = 0;
mbSmallSymbol = sal_False; mbSmallSymbol = sal_False;
mpBitmapEx = NULL;
meImageAlign = IMAGEALIGN_TOP; meImageAlign = IMAGEALIGN_TOP;
meSymbolAlign = SYMBOLALIGN_LEFT; meSymbolAlign = SYMBOLALIGN_LEFT;
} }
...@@ -102,7 +100,6 @@ ImplCommonButtonData::ImplCommonButtonData() ...@@ -102,7 +100,6 @@ ImplCommonButtonData::ImplCommonButtonData()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
ImplCommonButtonData::~ImplCommonButtonData() ImplCommonButtonData::~ImplCommonButtonData()
{ {
delete mpBitmapEx;
} }
// ======================================================================= // =======================================================================
...@@ -115,30 +112,6 @@ Button::Button( WindowType nType ) : ...@@ -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() Button::~Button()
{ {
delete mpButtonData; delete mpButtonData;
...@@ -209,9 +182,6 @@ sal_Bool Button::SetModeImage( const Image& rImage ) ...@@ -209,9 +182,6 @@ sal_Bool Button::SetModeImage( const Image& rImage )
{ {
if ( rImage != mpButtonData->maImage ) if ( rImage != mpButtonData->maImage )
{ {
delete mpButtonData->mpBitmapEx;
mpButtonData->mpBitmapEx = NULL;
mpButtonData->maImage = rImage; mpButtonData->maImage = rImage;
StateChanged( STATE_CHANGE_DATA ); StateChanged( STATE_CHANGE_DATA );
...@@ -248,40 +218,12 @@ ImageAlign Button::GetImageAlign() const ...@@ -248,40 +218,12 @@ 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 ) void Button::SetFocusRect( const Rectangle& rFocusRect )
{ {
ImplSetFocusRect( rFocusRect ); ImplSetFocusRect( rFocusRect );
} }
// -----------------------------------------------------------------------
const Rectangle& Button::GetFocusRect() const
{
return ImplGetFocusRect();
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
const Rectangle& Button::ImplGetSymbolRect() const const Rectangle& Button::ImplGetSymbolRect() const
...@@ -377,16 +319,6 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, ...@@ -377,16 +319,6 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
// check for HC mode ( image only! ) // check for HC mode ( image only! )
Image *pImage = &(mpButtonData->maImage); 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 aTextSize;
Size aSymbolSize; Size aSymbolSize;
...@@ -592,19 +524,10 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, ...@@ -592,19 +524,10 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
! IsEnabled() ) ! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE; nStyle |= IMAGE_DRAW_DISABLE;
if ( pBitmapEx && ( pDev->GetOutDevType() == OUTDEV_PRINTER ) ) if ( IsZoom() )
{ pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle );
// Fuer die BitmapEx ueberlegt sich KA noch, wie man die disablete
// Darstellung hinbekommt...
pBitmapEx->Draw( pDev, aImagePos, aImageSize /*, nStyle*/ );
}
else else
{ pDev->DrawImage( aImagePos, *pImage, nStyle );
if ( IsZoom() )
pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle );
else
pDev->DrawImage( aImagePos, *pImage, nStyle );
}
if ( bDrawText ) if ( bDrawText )
{ {
...@@ -688,12 +611,6 @@ void Button::EnableImageDisplay( sal_Bool bEnable ) ...@@ -688,12 +611,6 @@ void Button::EnableImageDisplay( sal_Bool bEnable )
mpButtonData->mnButtonState |= BUTTON_DRAW_NOIMAGE; mpButtonData->mnButtonState |= BUTTON_DRAW_NOIMAGE;
} }
// -----------------------------------------------------------------------
sal_Bool Button::IsImageDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOIMAGE) == 0;
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void Button::EnableTextDisplay( sal_Bool bEnable ) void Button::EnableTextDisplay( sal_Bool bEnable )
{ {
...@@ -703,12 +620,6 @@ void Button::EnableTextDisplay( sal_Bool bEnable ) ...@@ -703,12 +620,6 @@ void Button::EnableTextDisplay( sal_Bool bEnable )
mpButtonData->mnButtonState |= BUTTON_DRAW_NOTEXT; mpButtonData->mnButtonState |= BUTTON_DRAW_NOTEXT;
} }
// -----------------------------------------------------------------------
sal_Bool Button::IsTextDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOTEXT) == 0;
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void Button::SetSmallSymbol (bool small) void Button::SetSmallSymbol (bool small)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment