[Libreoffice-commits] .: vcl/inc vcl/source
August Sodora
augsod at kemper.freedesktop.org
Sun Dec 11 18:01:24 PST 2011
vcl/inc/vcl/status.hxx | 12 ---
vcl/source/window/status.cxx | 155 -------------------------------------------
2 files changed, 167 deletions(-)
New commits:
commit c95fa19f7c7b58a2beb65ad52335322ec2ae6f18
Author: August Sodora <augsod at gmail.com>
Date: Sun Dec 11 21:01:03 2011 -0500
Remove unused code
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index d039ddf..4fa982c 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -123,7 +123,6 @@ private:
public:
StatusBar( Window* pParent,
WinBits nWinStyle = WB_BORDER | WB_RIGHT );
- StatusBar( Window* pParent, const ResId& rResId );
~StatusBar();
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -144,15 +143,11 @@ public:
sal_uInt16 nPos = STATUSBAR_APPEND );
void RemoveItem( sal_uInt16 nItemId );
- void ShowItem( sal_uInt16 nItemId );
void HideItem( sal_uInt16 nItemId );
sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
- void ShowItems();
- void HideItems();
sal_Bool AreItemsVisible() const { return mbVisibleItems; }
- void CopyItems( const StatusBar& rStatusBar );
void Clear();
sal_uInt16 GetItemCount() const;
@@ -163,15 +158,12 @@ public:
Point GetItemTextPos( sal_uInt16 nItemId ) const;
sal_uInt16 GetCurItemId() const { return mnCurItemId; }
- sal_uLong GetItemWidth( sal_uInt16 nItemId ) const;
- StatusBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
long GetItemOffset( sal_uInt16 nItemId ) const;
void SetItemText( sal_uInt16 nItemId, const XubString& rText );
const XubString& GetItemText( sal_uInt16 nItemId ) const;
void SetItemData( sal_uInt16 nItemId, void* pNewData );
- void* GetItemData( sal_uInt16 nItemId ) const;
void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand );
const XubString& GetItemCommand( sal_uInt16 nItemId );
@@ -187,17 +179,13 @@ public:
void SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId );
rtl::OString GetHelpId( sal_uInt16 nItemId ) const;
- void SetBottomBorder( sal_Bool bBottomBorder = sal_True );
sal_Bool IsBottomBorder() const { return mbBottomBorder; }
-
- void SetTopBorder( sal_Bool bTopBorder = sal_True );
sal_Bool IsTopBorder() const;
void StartProgressMode( const XubString& rText );
void SetProgressValue( sal_uInt16 nPercent );
void EndProgressMode();
sal_Bool IsProgressMode() const { return mbProgressMode; }
- void ResetProgressMode();
void SetText( const XubString& rText );
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 944ad5f..32dcc4a 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -176,20 +176,6 @@ StatusBar::StatusBar( Window* pParent, WinBits nStyle ) :
// -----------------------------------------------------------------------
-StatusBar::StatusBar( Window* pParent, const ResId& rResId ) :
- Window( WINDOW_STATUSBAR )
-{
- rResId.SetRT( RSC_STATUSBAR );
- WinBits nStyle = ImplInitRes( rResId );
- ImplInit( pParent, nStyle );
- ImplLoadRes( rResId );
-
- if ( !(nStyle & WB_HIDE) )
- Show();
-}
-
-// -----------------------------------------------------------------------
-
StatusBar::~StatusBar()
{
// Alle Items loeschen
@@ -1050,28 +1036,6 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId )
// -----------------------------------------------------------------------
-void StatusBar::ShowItem( sal_uInt16 nItemId )
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
-
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- {
- ImplStatusItem* pItem = (*mpItemList)[ nPos ];
- if ( !pItem->mbVisible )
- {
- pItem->mbVisible = sal_True;
-
- mbFormat = sal_True;
- if ( ImplIsItemUpdate() )
- Invalidate();
-
- ImplCallEventListeners( VCLEVENT_STATUSBAR_SHOWITEM, (void*) sal_IntPtr(nItemId) );
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
void StatusBar::HideItem( sal_uInt16 nItemId )
{
sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1106,54 +1070,6 @@ sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::ShowItems()
-{
- if ( !mbVisibleItems )
- {
- mbVisibleItems = sal_True;
- if ( !mbProgressMode )
- Invalidate();
-
- ImplCallEventListeners( VCLEVENT_STATUSBAR_SHOWALLITEMS );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void StatusBar::HideItems()
-{
- if ( mbVisibleItems )
- {
- mbVisibleItems = sal_False;
- if ( !mbProgressMode )
- Invalidate();
-
- ImplCallEventListeners( VCLEVENT_STATUSBAR_HIDEALLITEMS );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void StatusBar::CopyItems( const StatusBar& rStatusBar )
-{
- // Alle Items entfernen
- for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) {
- delete (*mpItemList)[ i ];
- }
- mpItemList->clear();
-
- // Items kopieren
- for ( size_t i = 0, n = rStatusBar.mpItemList->size(); i < n; ++i ) {
- mpItemList->push_back( new ImplStatusItem( *(*rStatusBar.mpItemList)[ i ] ) );
- }
-
- mbFormat = sal_True;
- if ( ImplIsItemUpdate() )
- Invalidate();
-}
-
-// -----------------------------------------------------------------------
-
void StatusBar::Clear()
{
// Alle Item loeschen
@@ -1275,30 +1191,6 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-sal_uLong StatusBar::GetItemWidth( sal_uInt16 nItemId ) const
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
-
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- return (*mpItemList)[ nPos ]->mnWidth;
-
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-StatusBarItemBits StatusBar::GetItemBits( sal_uInt16 nItemId ) const
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
-
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- return (*mpItemList)[ nPos ]->mnBits;
-
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1409,18 +1301,6 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
// -----------------------------------------------------------------------
-void* StatusBar::GetItemData( sal_uInt16 nItemId ) const
-{
- sal_uInt16 nPos = GetItemPos( nItemId );
-
- if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- return (*mpItemList)[ nPos ]->mpUserData;
-
- return NULL;
-}
-
-// -----------------------------------------------------------------------
-
void StatusBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText )
{
sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1528,24 +1408,6 @@ void StatusBar::ImplCalcBorder( )
Invalidate();
}
-void StatusBar::SetBottomBorder( sal_Bool bBottomBorder )
-{
- if ( mbBottomBorder != bBottomBorder )
- {
- mbBottomBorder = bBottomBorder;
- ImplCalcBorder();
- }
-}
-
-void StatusBar::SetTopBorder( sal_Bool bTopBorder )
-{
- if ( mpImplData->mbTopBorder != static_cast<bool>(bTopBorder) )
- {
- mpImplData->mbTopBorder = static_cast<bool>(bTopBorder);
- ImplCalcBorder();
- }
-}
-
sal_Bool StatusBar::IsTopBorder() const
{
return mpImplData->mbTopBorder;
@@ -1619,23 +1481,6 @@ void StatusBar::EndProgressMode()
// -----------------------------------------------------------------------
-void StatusBar::ResetProgressMode()
-{
- if ( mbProgressMode )
- {
- mnPercent = 0;
- maPrgsTxt.Erase();
- if ( IsReallyVisible() )
- {
- Invalidate();
- Update();
- Flush();
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
void StatusBar::SetText( const XubString& rText )
{
if ( (!mbVisibleItems || (GetStyle() & WB_RIGHT)) && !mbProgressMode &&
More information about the Libreoffice-commits
mailing list