diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-07-26 11:20:43 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-07-26 23:39:03 +0200 |
commit | 8b61f66aab135e25592d935a4fa8e125a67bae0a (patch) | |
tree | d44116c7ec74c4cf25a83ab586b568d64480dc04 /svtools | |
parent | 19556f9d8b2eeed2c740964efab5a130d19ef8fc (diff) |
callcatcher: clean up SvTreeList{Box}
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/svtreebx.hxx | 18 | ||||
-rw-r--r-- | svtools/inc/svtools/treelist.hxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/svtreebx.cxx | 175 | ||||
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 66 |
4 files changed, 0 insertions, 262 deletions
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx index 96adfe73aea9..22b08bcadf1d 100644 --- a/svtools/inc/svtools/svtreebx.hxx +++ b/svtools/inc/svtools/svtreebx.hxx @@ -174,7 +174,6 @@ public: ~SvTreeListBox(); void SetExtendedWinBits( ExtendedWinBits _nBits ); - ExtendedWinBits GetExtendedWinBits() const; void DisconnectFromModel(); @@ -224,7 +223,6 @@ public: void SetCheckButtonState( SvLBoxEntry*, SvButtonState ); SvButtonState GetCheckButtonState( SvLBoxEntry* ) const; - void ShowExpandBitmapOnCursor( sal_Bool ); sal_Bool IsExpandBitmapOnCursor() const { return (sal_Bool)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; } void SetEntryText(SvLBoxEntry*, const XubString& ); @@ -245,16 +243,13 @@ public: virtual sal_uInt16 IsA(); void SetSublistOpenWithReturn( sal_Bool bMode = sal_True ); // open/close sublist with return/enter - sal_Bool IsSublistOpenWithReturn() const; void SetSublistOpenWithLeftRight( sal_Bool bMode = sal_True ); // open/close sublist with cursor left/right - sal_Bool IsSublistOpenWithLeftRight() const; void EnableInplaceEditing( sal_Bool bEnable ); sal_Bool IsInplaceEditingEnabled() const { return SvLBox::IsInplaceEditingEnabled(); } inline void ForbidEmptyText() { SvLBox::ForbidEmptyText(); } // Editiert das erste StringItem des Entries, 0==Cursor void EditEntry( SvLBoxEntry* pEntry = NULL ); - void CancelEditing(); virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& ); virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText ); sal_Bool IsEditingActive() const { return SvLBox::IsEditingActive(); } @@ -272,8 +267,6 @@ public: virtual void GetFocus(); virtual void LoseFocus(); void SetUpdateMode( sal_Bool ); - // aktualisiert nicht die vertikale ScrollBar - void SetUpdateModeFast( sal_Bool ); using SvListView::SetModel; void SetModel( SvLBoxTreeList* ); @@ -306,7 +299,6 @@ public: void SetCollapsedNodeBmp( const Image& ); void SetExpandedNodeBmp( const Image& ); - Image GetCollapsedNodeBmp( ) const; Image GetExpandedNodeBmp( ) const; void SetFont( const Font& rFont ); @@ -327,12 +319,9 @@ public: void InvalidateEntry( SvLBoxEntry* ); SvLBoxItem* GetItem( SvLBoxEntry*, long nX, SvLBoxTab** ppTab); SvLBoxItem* GetItem( SvLBoxEntry*, long nX ); - SvLBoxItem* GetFirstDynamicItem( SvLBoxEntry* pEntry ); void SetDragDropMode( DragDropMode ); void SetSelectionMode( SelectionMode ); - void SetAddMode( sal_Bool bAdd ); - sal_Bool IsAddMode() const; virtual sal_Bool Expand( SvLBoxEntry* pParent ); virtual sal_Bool Collapse( SvLBoxEntry* pParent ); @@ -348,7 +337,6 @@ public: virtual void Invalidate( const Rectangle&, sal_uInt16 nFlags = 0 ); void SetHighlightRange(sal_uInt16 nFirstTab=0,sal_uInt16 nLastTab=0xffff); - void RemoveHighlightRange(); virtual Region GetDragRegion() const; @@ -359,9 +347,7 @@ public: virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1, SvListEntry* pEntry2, sal_uLong nPos ); - long GetTextOffset() const; void EndSelection(); - sal_Bool IsNodeButton( const Point& rPos ) const; void RepaintScrollBars() const; ScrollBar* GetVScroll(); ScrollBar* GetHScroll(); @@ -373,12 +359,8 @@ public: void ScrollToAbsPos( long nPos ); void ShowFocusRect( const SvLBoxEntry* pEntry ); - void SetTabBar( TabBar* pTabBar ); void InitStartEntry(); - // reset all what could lead to editingText in e.g. a contextmenu call - void CancelPendingEdit(); - virtual PopupMenu* CreateContextMenu( void ); virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ); diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index 63545ed30cc1..8c78c990f56a 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -289,7 +289,6 @@ class SVT_DLLPUBLIC SvTreeList SvListEntry* LastSelected( const SvListView*) const; sal_Bool Select( SvListView*,SvListEntry* pEntry, sal_Bool bSelect=sal_True ); - sal_uLong SelectChilds( SvListView*,SvListEntry* pParent, sal_Bool bSelect ); void SelectAll( SvListView*,sal_Bool bSelect ); // ruft nicht Select-Hdl sal_uLong GetChildSelectionCount( const SvListView*,SvListEntry* pParent ) const; @@ -355,7 +354,6 @@ public: sal_uLong Insert( SvListEntry* pEntry,sal_uLong nRootPos = ULONG_MAX ) { return Insert(pEntry, pRootItem, nRootPos ); } - void InsertTree( SvListEntry* pTree, SvListEntry* pTarget ); void InsertTree( SvListEntry* pTree, SvListEntry* pTargetParent, sal_uLong nListPos ); // Entries muessen im gleichen Model stehen! @@ -363,7 +361,6 @@ public: // erzeugt ggf. Child-List sal_uLong Move( SvListEntry* pSource, SvListEntry* pTargetParent, sal_uLong nListPos); - void Copy( SvListEntry* pSource, SvListEntry* pTarget ); sal_uLong Copy( SvListEntry* pSource, SvListEntry* pTargetParent, sal_uLong nListPos); sal_Bool Remove( SvListEntry* pEntry ); diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index 7695137431f0..1730d90bd66f 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -126,11 +126,6 @@ void SvTreeListBox::SetExtendedWinBits( ExtendedWinBits _nBits ) pImp->SetExtendedWindowBits( _nBits ); } -ExtendedWinBits SvTreeListBox::GetExtendedWinBits() const -{ - return pImp->GetExtendedWindowBits(); -} - void SvTreeListBox::SetModel( SvLBoxTreeList* pNewModel ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -157,21 +152,11 @@ void SvTreeListBox::SetSublistOpenWithReturn( sal_Bool b ) pImp->bSubLstOpRet = b; } -sal_Bool SvTreeListBox::IsSublistOpenWithReturn() const -{ - return pImp->bSubLstOpRet; -} - void SvTreeListBox::SetSublistOpenWithLeftRight( sal_Bool b ) { pImp->bSubLstOpLR = b; } -sal_Bool SvTreeListBox::IsSublistOpenWithLeftRight() const -{ - return pImp->bSubLstOpLR; -} - void SvTreeListBox::Resize() { DBG_CHKTHIS(SvTreeListBox,0); @@ -628,15 +613,6 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource ) return pClone; } -void SvTreeListBox::ShowExpandBitmapOnCursor( sal_Bool bYes ) -{ - DBG_CHKTHIS(SvTreeListBox,0); - if( bYes ) - aContextBmpMode = SVLISTENTRYFLAG_FOCUSED; - else - aContextBmpMode = SVLISTENTRYFLAG_EXPANDED; -} - void SvTreeListBox::SetIndent( short nNewIndent ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -1186,12 +1162,6 @@ void SvTreeListBox::SetUpdateMode( sal_Bool bUpdate ) pImp->SetUpdateMode( bUpdate ); } -void SvTreeListBox::SetUpdateModeFast( sal_Bool bUpdate ) -{ - DBG_CHKTHIS(SvTreeListBox,0); - pImp->SetUpdateModeFast( bUpdate ); -} - void SvTreeListBox::SetSpaceBetweenEntries( short nOffsLogic ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -1218,11 +1188,6 @@ void SvTreeListBox::SetCurEntry( SvLBoxEntry* pEntry ) pImp->SetCurEntry( pEntry ); } -Image SvTreeListBox::GetCollapsedNodeBmp( ) const -{ - return pImp->GetCollapsedNodeBmp( ); -} - Image SvTreeListBox::GetExpandedNodeBmp( ) const { return pImp->GetExpandedNodeBmp( ); @@ -1296,12 +1261,6 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem, EditText( pItem->GetText(), aRect, rSelection ); } -void SvTreeListBox::CancelEditing() -{ - DBG_CHKTHIS(SvTreeListBox,0); - SvLBox::CancelTextEditing(); -} - void SvTreeListBox::EditEntry( SvLBoxEntry* pEntry ) { pImp->aEditClickPos = Point( -1, -1 ); @@ -1993,24 +1952,6 @@ SvLBoxItem* SvTreeListBox::GetItem(SvLBoxEntry* pEntry,long nX ) return GetItem_Impl( pEntry, nX, &pDummyTab, 0 ); } -SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry ) -{ - DBG_CHKTHIS(SvTreeListBox,0); - - SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0); - SvLBoxItem* pItem = pEntry->GetItem(0); - sal_uInt16 nTabCount = aTabs.Count(); - - sal_uInt16 nNext = 1; - while ( !pTab->IsDynamic() && nNext < nTabCount ) - { - pItem = pEntry->GetItem( nNext ); - pTab = (SvLBoxTab*)aTabs.GetObject( nNext ); - nNext++; - } - return pItem; -} - void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -2151,14 +2092,6 @@ void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd) pImp->RecalcFocusRect(); } -void SvTreeListBox::RemoveHighlightRange() -{ - DBG_CHKTHIS(SvTreeListBox,0); - nTreeFlags &= (~TREEFLAG_USESEL); - if( IsUpdateMode() ) - Invalidate(); -} - sal_uLong SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*) { return LIST_APPEND; @@ -2245,16 +2178,6 @@ SvLBoxTab* SvTreeListBox::GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos return 0; } -void SvTreeListBox::SetAddMode( sal_Bool bAdd ) -{ - pImp->SetAddMode( bAdd ); -} - -sal_Bool SvTreeListBox::IsAddMode() const -{ - return pImp->IsAddMode(); -} - void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt ) { if( !pImp->RequestHelp( rHEvt ) ) @@ -2321,98 +2244,11 @@ void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry } } -// bei Aenderungen SetTabs beruecksichtigen -long SvTreeListBox::GetTextOffset() const -{ - DBG_CHKTHIS(SvTreeListBox,0); - const WinBits nWindowStyle = GetStyle(); - sal_Bool bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0; - sal_Bool bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT | - WB_HASBUTTONSATROOT))!=0; - long nStartPos = TAB_STARTPOS; - long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width(); - - long nCheckWidth = 0; - if( nTreeFlags & TREEFLAG_CHKBTN ) - nCheckWidth = pCheckButtonData->aBmps[0].GetSizePixel().Width(); - long nCheckWidthDIV2 = nCheckWidth / 2; - - long nContextWidth = nContextBmpWidthMax; - long nContextWidthDIV2 = nContextWidth / 2; - - int nCase = NO_BUTTONS; - if( !(nTreeFlags & TREEFLAG_CHKBTN) ) - { - if( bHasButtons ) - nCase = NODE_BUTTONS; - } - else - { - if( bHasButtons ) - nCase = NODE_AND_CHECK_BUTTONS; - else - nCase = CHECK_BUTTONS; - } - - switch( nCase ) - { - case NO_BUTTONS : - nStartPos += nContextWidthDIV2; // wg. Zentrierung - nStartPos += nContextWidthDIV2; // rechter Rand der Context-Bmp - if( nContextBmpWidthMax ) - nStartPos += 5; // Abstand Context-Bmp - Text - break; - - case NODE_BUTTONS : - if( bHasButtonsAtRoot ) - nStartPos += ( nIndent + (nNodeWidthPixel/2) ); - else - nStartPos += nContextWidthDIV2; - nStartPos += nContextWidthDIV2; // rechter Rand der Context-Bmp - if( nContextBmpWidthMax ) - nStartPos += 5; // Abstand Context-Bmp - Text - break; - - case NODE_AND_CHECK_BUTTONS : - if( bHasButtonsAtRoot ) - nStartPos += ( nIndent + nNodeWidthPixel ); - else - nStartPos += nCheckWidthDIV2; - nStartPos += nCheckWidthDIV2; // rechter Rand des CheckButtons - nStartPos += 3; // Abstand CheckButton Context-Bmp - nStartPos += nContextWidthDIV2; // Mitte der Context-Bmp - nStartPos += nContextWidthDIV2; // rechter Rand der Context-Bmp - // Abstand setzen nur wenn Bitmaps da - if( nContextBmpWidthMax ) - nStartPos += 5; // Abstand Context-Bmp - Text - break; - - case CHECK_BUTTONS : - nStartPos += nCheckWidthDIV2; - nStartPos += nCheckWidthDIV2; // rechter Rand CheckButton - nStartPos += 3; // Abstand CheckButton Context-Bmp - nStartPos += nContextWidthDIV2; // Mitte der Context-Bmp - nStartPos += nContextWidthDIV2; // rechter Rand der Context-Bmp - if( nContextBmpWidthMax ) - nStartPos += 5; // Abstand Context-Bmp - Text - break; - } - return nStartPos; -} - void SvTreeListBox::EndSelection() { pImp->EndSelection(); } -sal_Bool SvTreeListBox::IsNodeButton( const Point& rPos ) const -{ - SvLBoxEntry* pEntry = GetEntry( rPos ); - if( pEntry ) - return pImp->IsNodeButton( rPos, pEntry ); - return sal_False; -} - void SvTreeListBox::RepaintScrollBars() const { ((SvTreeListBox*)this)->pImp->RepaintScrollBars(); @@ -2479,11 +2315,6 @@ void SvTreeListBox::ShowFocusRect( const SvLBoxEntry* pEntry ) pImp->ShowFocusRect( pEntry ); } -void SvTreeListBox::SetTabBar( TabBar* pTabBar ) -{ - pImp->SetTabBar( pTabBar ); -} - void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt ) { if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) @@ -2552,12 +2383,6 @@ void SvTreeListBox::InitStartEntry() pImp->pStartEntry = GetModel()->First(); } -void SvTreeListBox::CancelPendingEdit() -{ - if( pImp ) - pImp->CancelPendingEdit(); -} - PopupMenu* SvTreeListBox::CreateContextMenu( void ) { return NULL; diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 13b8fb553ee5..d1f2941a0de3 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -417,54 +417,6 @@ void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry ) Move( pSrcEntry, pParent, nPos ); } -/************************************************************************* -|* -|* SvTreeList:: -|* -*************************************************************************/ - -void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry ) -{ - SvListEntry* pParent; - sal_uLong nPos; - - if ( !pDstEntry ) - { - pParent = pRootItem; - nPos = 0UL; - } - else - { - pParent = pDstEntry->pParent; - nPos = pDstEntry->GetChildListPos()+1; - } - Copy( pSrcEntry, pParent, nPos ); -} - -/************************************************************************* -|* -|* SvTreeList:: -|* -*************************************************************************/ -void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry) -{ - SvListEntry* pParent; - sal_uLong nPos; - - if ( !pDstEntry ) - { - pParent = pRootItem; - nPos = 0UL; - } - else - { - pParent = pDstEntry->pParent; - nPos = pDstEntry->GetChildListPos()+1; - } - InsertTree( pSrcEntry, pParent, nPos ); -} - - void SvTreeList::InsertTree(SvListEntry* pSrcEntry, SvListEntry* pTargetParent,sal_uLong nListPos) { @@ -1485,24 +1437,6 @@ void lcl_CheckList( SvTreeEntryList* pList ) } } -void SvTreeList::CheckIntegrity() const -{ - sal_uLong nMyEntryCount = 0; - if ( pRootItem->pChilds ) - { - lcl_CheckList( pRootItem->pChilds ); - SvListEntry* pEntry = First(); - while( pEntry ) - { - nMyEntryCount++; - if ( pEntry->pChilds ) - lcl_CheckList( pEntry->pChilds ); - pEntry = Next( pEntry ); - } - } - DBG_ASSERT(nMyEntryCount==GetEntryCount(),"Entry count invalid"); -} - SvListEntry* SvTreeList::GetRootLevelParent( SvListEntry* pEntry ) const { DBG_ASSERT(pEntry,"GetRootLevelParent:No Entry"); |