diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-12 12:53:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-14 07:35:58 +0000 |
commit | 1987a5c7772fafc1e863deeead9081fd747f7713 (patch) | |
tree | eb7e7f1c8ffddd7faaafe709695d83efa1e3a85c /svtools | |
parent | a2fc48ea649c341a9cfc96c6f3e16ba56ae4fa19 (diff) |
callcatcher: remove unused code
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/ivctrl.hxx | 21 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 11 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 218 | ||||
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 69 |
4 files changed, 2 insertions, 317 deletions
diff --git a/svtools/inc/svtools/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx index 8abaae60473d..f78957f0ada0 100644 --- a/svtools/inc/svtools/ivctrl.hxx +++ b/svtools/inc/svtools/ivctrl.hxx @@ -120,7 +120,6 @@ class SvxIconChoiceCtrlEntry } public: - SvxIconChoiceCtrlEntry( sal_uInt16 nFlags = 0 ); SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 nFlags = 0 ); ~SvxIconChoiceCtrlEntry () {} @@ -148,7 +147,7 @@ public: sal_Bool IsDropTarget() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); } sal_Bool IsBlockingEmphasis() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); } sal_Bool IsPosLocked() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); } - void LockPos( sal_Bool bLock ); + // Nur bei AutoArrange gesetzt. Den Kopf der Liste gibts per SvxIconChoiceCtrl::GetPredecessorHead SvxIconChoiceCtrlEntry* GetSuccessor() const { return pflink; } SvxIconChoiceCtrlEntry* GetPredecessor() const { return pblink; } @@ -281,7 +280,6 @@ public: sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True ); - void SetUpdateMode( sal_Bool bUpdateMode ); void SetFont( const Font& rFont ); void SetPointFont( const Font& rFont ); @@ -294,9 +292,6 @@ public: void ArrangeIcons(); - SvxIconChoiceCtrlEntry* InsertEntry( sal_uLong nPos = LIST_APPEND, - const Point* pPos = 0, - sal_uInt16 nFlags = 0 ); SvxIconChoiceCtrlEntry* InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos = LIST_APPEND, @@ -317,12 +312,9 @@ public: */ void CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics ); - void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry ); - sal_Bool DoKeyInput( const KeyEvent& rKEvt ); sal_Bool IsEntryEditing() const; - void Clear(); sal_uLong GetEntryCount() const; SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const; @@ -337,19 +329,11 @@ public: // bHit==sal_False: Eintrag gilt als getroffen, wenn Position im BoundRect liegt // ==sal_True : Bitmap oder Text muss getroffen sein SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, sal_Bool bHit = sal_False ) const; - // Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder) - SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const; // in dem sal_uLong wird die Position in der Liste des gefunden Eintrags zurueckgegeben SvxIconChoiceCtrlEntry* GetSelectedEntry( sal_uLong& rPos ) const; void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 ); - SvxIconChoiceCtrlTextMode GetEntryTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const; - - // offene asynchron abzuarbeitende Aktionen ausfuehren. Muss vor dem Speichern von - // Eintragspositionen etc. gerufen werden - void Flush(); - virtual sal_Bool HasBackground() const; virtual sal_Bool HasFont() const; @@ -359,12 +343,9 @@ public: void SetFontColorToBackground ( sal_Bool bDo = sal_True ) { _bAutoFontColor = bDo; } sal_Bool AutoFontColor () { return _bAutoFontColor; } - Point GetLogicPos( const Point& rPosPixel ) const; Point GetPixelPos( const Point& rPosLogic ) const; void SetSelectionMode( SelectionMode eMode ); - sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); - Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const; Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const; diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 021f6577df17..7c7b0af768e6 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -124,17 +124,12 @@ private: SvxIconChoiceCtrlEntryList_impl maIconChoiceCtrlEntryList; SvxIconChoiceCtrl_Impl* _pOwner; - void Removed_Impl( SvxIconChoiceCtrlEntry* pEntry ); - public: EntryList_Impl( SvxIconChoiceCtrl_Impl* ); ~EntryList_Impl(); void clear(); - SvxIconChoiceCtrlEntry* remove( size_t nPos ); - void remove( SvxIconChoiceCtrlEntry* pEntry ); - size_t size() { return maIconChoiceCtrlEntryList.size(); @@ -261,7 +256,6 @@ class SvxIconChoiceCtrl_Impl rPosPixel -= pView->GetMapMode().GetOrigin(); } void InitScrollBarBox(); - SvxIconChoiceCtrlEntry* FindNewCursor(); void ToggleSelection( SvxIconChoiceCtrlEntry* ); void DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False ); void Center( SvxIconChoiceCtrlEntry* pEntry ) const; @@ -349,7 +343,6 @@ public: WinBits GetStyle() const { return nWinBits; } void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=0 ); void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL ); - void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry ); void FontModified(); void SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True ); void SelectEntry( @@ -410,7 +403,6 @@ public: ); SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False ); - SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry ); Point GetEntryPos( SvxIconChoiceCtrlEntry* ); void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True ); @@ -550,7 +542,6 @@ public: void SetPositionMode( SvxIconChoiceCtrlPositionMode ); SvxIconChoiceCtrlPositionMode GetPositionMode() const { return ePositionMode;} - void Flush(); void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& ); const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const; @@ -569,8 +560,6 @@ public: ); void StopSelectTimer() { aCallSelectHdlTimer.Stop(); } - sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); - void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); inline ::svt::IAccessibleFactory& GetAccessibleFactory() diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 12d4829a7ad9..da49174b2573 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -381,85 +381,6 @@ void SvxIconChoiceCtrl_Impl::SetListPositions() nFlags |= F_ENTRYLISTPOS_VALID; } -void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry ) -{ - sal_Bool bSyncSingleSelection; - // bei Single-Selection wird die Selektion beim Umsetzen des Cursors - // mitgefuehrt. Das soll aber nur erfolgen, wenn ueberhaupt ein - // Eintrag selektiert ist. - if( GetSelectionCount() ) - bSyncSingleSelection = sal_True; - else - bSyncSingleSelection = sal_False; - - if( pEntry == pCurHighlightFrame ) - pCurHighlightFrame = 0; - - if( pEntry->IsSelected() ) - CallSelectHandler( 0 ); - - if( aEntries.size() == 1 && aEntries[ 0 ] == pEntry ) - { - Clear(); - return; - } - - StopEditTimer(); - if( pEntry == pAnchor ) - pAnchor = 0; - if( pEntry->IsSelected() ) - nSelectionCount--; - sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect ); - if( bEntryBoundValid ) - pView->Invalidate( pEntry->aRect ); - - sal_Bool bSetNewCursor = sal_False; - SvxIconChoiceCtrlEntry* pNewCursor = NULL; - - if( pEntry == pCursor ) - { - bSetNewCursor = sal_True; - pNewCursor = FindNewCursor(); - ShowCursor( sal_False ); - pCursor = 0; - } - - sal_Bool bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? sal_True : sal_False; - if( bCurEntryPosValid && aEntries[ aEntries.size()-1 ] != pEntry ) - nFlags &= ~F_ENTRYLISTPOS_VALID; - - for ( - SvxIconChoiceCtrlEntryList_impl::iterator it = pZOrderList->begin(); - it < pZOrderList->end(); - ++it - ) { - if ( *it == pEntry ) - { - pZOrderList->erase( it ); - break; - } - } - - if( bCurEntryPosValid ) - { - DBG_ASSERT(aEntries[ pEntry->nPos ] == pEntry,"RemoveEntry: Wrong nPos in entry"); - aEntries.remove( pEntry->nPos ); - } - else - aEntries.remove( pEntry ); - pImpCursor->Clear(); - pGridMap->Clear(); - delete pEntry; - if( IsAutoArrange() && aEntries.size() ) - aAutoArrangeTimer.Start(); - if( bSetNewCursor ) - { - // Fokusrechteck asynchron einblenden, um das Loeschen einer - // Multiselektion zu beschleunigen. - SetCursor( pNewCursor, bSyncSingleSelection, sal_True ); - } -} - void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect, sal_Bool bCallHdl, sal_Bool bAdd, sal_Bool bSyncPaint ) { @@ -2073,35 +1994,6 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, return 0; } -SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextEntry( - const Point& rDocPos, - SvxIconChoiceCtrlEntry* pCurEntry -) { - CheckBoundingRects(); - SvxIconChoiceCtrlEntry* pTarget = 0; - - for ( - SvxIconChoiceCtrlEntryList_impl::iterator it = pZOrderList->begin(); - it < pZOrderList->end(); - ++it - ) { - if ( *it == pCurEntry ) - { - while ( ++it < pZOrderList->end() ) - { - if ( (*it)->aRect.IsInside( rDocPos ) ) - { - pTarget = *it; - break; - } - } - break; - } - } - - return pTarget; -} - Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry ) { return pEntry->aRect.TopLeft(); @@ -2641,30 +2533,6 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrB VisRectChanged(); } - -SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor() -{ - SvxIconChoiceCtrlEntry* pNewCursor; - if( pCursor ) - { - pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False ); - if( !pNewCursor ) - { - pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True ); - if( !pNewCursor ) - { - pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False ); - if( !pNewCursor ) - pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True ); - } - } - } - else - pNewCursor = aEntries[ 0 ]; - DBG_ASSERT(!pNewCursor|| (pCursor&&pCursor!=pNewCursor),"FindNewCursor failed"); - return pNewCursor; -} - sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const { if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame ) @@ -3675,50 +3543,6 @@ void EntryList_Impl::insert( size_t nPos, SvxIconChoiceCtrlEntry* pEntry ) pEntry->SetBacklink( _pOwner->pHead->pblink ); } -SvxIconChoiceCtrlEntry* EntryList_Impl::remove( size_t nPos ) -{ - SvxIconChoiceCtrlEntry* pEntry = NULL; - if ( nPos < maIconChoiceCtrlEntryList.size() ) { - pEntry = maIconChoiceCtrlEntryList[ nPos ]; - maIconChoiceCtrlEntryList.erase( maIconChoiceCtrlEntryList.begin() + nPos ); - Removed_Impl( pEntry ); - } - return pEntry; -} - -void EntryList_Impl::remove( SvxIconChoiceCtrlEntry* pEntry ) -{ - for ( - SvxIconChoiceCtrlEntryList_impl::iterator it = maIconChoiceCtrlEntryList.begin(); - it < maIconChoiceCtrlEntryList.end(); - ++it - ) { - if ( *it == pEntry ) { - maIconChoiceCtrlEntryList.erase( it ); - Removed_Impl( pEntry ); - break; - } - } -} - -void EntryList_Impl::Removed_Impl( SvxIconChoiceCtrlEntry* pEntry ) -{ - if( _pOwner->pHead ) - { - if( _pOwner->pHead == pEntry ) - { - if( _pOwner->pHead != pEntry->pflink ) - _pOwner->pHead = pEntry->pflink; - else - { - DBG_ASSERT(!size(),"EntryList_Impl::Remove > Invalid predecessor" ); - _pOwner->pHead = 0; - } - } - pEntry->Unlink(); - } -} - void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMode ) { if( eMode == ePositionMode ) @@ -3866,14 +3690,6 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const return nGrid; } -void SvxIconChoiceCtrl_Impl::Flush() -{ - if( aAutoArrangeTimer.IsActive() ) - { - AutoArrangeHdl( 0 ); - } -} - sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) { if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) ) @@ -4072,40 +3888,6 @@ void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, sal_Bool bDoNotUpdate } } -sal_Bool SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt ) -{ - StopEditTimer(); - - sal_Bool bRet = sal_False; - - DBG_ASSERT( rKEvt.GetKeyCode().IsMod2(), "*SvxIconChoiceCtrl_Impl::HandleShortCutKey(): no <ALT> pressed!?" ); - - sal_Unicode cChar = rKEvt.GetCharCode(); - sal_uLong nPos = (sal_uLong)-1; - - if( cChar && IsMnemonicChar( cChar, nPos ) ) - { - // shortcut is clicked - SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos ); - SvxIconChoiceCtrlEntry* pOldCursor = pCursor; - if( pNewCursor != pOldCursor ) - { - SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False ); - - if( pNewCursor != NULL ) - { - pHdlEntry = pNewCursor; - pCurHighlightFrame = pHdlEntry; - pView->ClickIcon(); - pCurHighlightFrame = NULL; - } - } - bRet = sal_True; - } - - return bRet; -} - void SvxIconChoiceCtrl_Impl::CallEventListeners( sal_uLong nEvent, void* pData ) { pView->CallImplEventListeners( nEvent, pData ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index b16ebc4d6405..6e1c88a918fc 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -54,24 +54,6 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image pflink = 0; } -SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( sal_uInt16 _nFlags ) -{ - pUserData = NULL; - - nFlags = _nFlags; - eTextMode = IcnShowTextShort; - pblink = 0; - pflink = 0; -} - -void SvxIconChoiceCtrlEntry::LockPos( sal_Bool bLock ) -{ - if( bLock ) - nFlags |= ICNVIEW_FLAG_POS_LOCKED; - else - nFlags &= ~ICNVIEW_FLAG_POS_LOCKED; -} - String SvxIconChoiceCtrlEntry::GetDisplayText() const { return MnemonicGenerator::EraseAllMnemonicChars( aText ); @@ -130,13 +112,6 @@ SvtIconChoiceCtrl::~SvtIconChoiceCtrl() delete _pImp; } -SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags ) -{ - SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( nFlags ); - _pImp->InsertEntry( pEntry, nPos, pPos ); - return pEntry; -} - SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags ) { SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags); @@ -252,13 +227,6 @@ void SvtIconChoiceCtrl::Resize() Control::Resize(); } -Point SvtIconChoiceCtrl::GetLogicPos( const Point& rPosPixel ) const -{ - Point aPos( rPosPixel ); - aPos -= GetMapMode().GetOrigin(); - return aPos; -} - Point SvtIconChoiceCtrl::GetPixelPos( const Point& rPosLogic ) const { Point aPos( rPosLogic ); @@ -292,11 +260,6 @@ void SvtIconChoiceCtrl::LoseFocus() Control::LoseFocus(); } -void SvtIconChoiceCtrl::SetUpdateMode( sal_Bool bUpdate ) -{ - Control::SetUpdateMode( bUpdate ); - _pImp->SetUpdateMode( bUpdate ); -} void SvtIconChoiceCtrl::SetFont( const Font& rFont ) { if( rFont != GetFont() ) @@ -340,18 +303,6 @@ void SvtIconChoiceCtrl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIc _pImp->SetEntryTextMode( eMode, pEntry ); } -SvxIconChoiceCtrlTextMode SvtIconChoiceCtrl::GetEntryTextMode( const SvxIconChoiceCtrlEntry* pEntry ) const -{ - return _pImp->GetEntryTextModeSmart( pEntry ); -} - -SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const -{ - Point aPos( rPixPos ); - aPos -= GetMapMode().GetOrigin(); - return ((SvtIconChoiceCtrl*)this)->_pImp->GetNextEntry( aPos, pCurEntry ); -} - sal_uLong SvtIconChoiceCtrl::GetEntryCount() const { return _pImp->GetEntryCount(); @@ -372,11 +323,6 @@ void SvtIconChoiceCtrl::CreateAutoMnemonics( void ) _pImp->CreateAutoMnemonics(); } -void SvtIconChoiceCtrl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry ) -{ - _pImp->RemoveEntry( pEntry ); -} - SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const { return _pImp->GetFirstSelectedEntry( rPos ); @@ -434,10 +380,7 @@ void SvtIconChoiceCtrl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry ) { _pImp->InvalidateEntry( pEntry ); } -void SvtIconChoiceCtrl::Clear() -{ - _pImp->Clear(); -} + void SvtIconChoiceCtrl::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); @@ -507,11 +450,6 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) } } -void SvtIconChoiceCtrl::Flush() -{ - _pImp->Flush(); -} - void SvtIconChoiceCtrl::RequestHelp( const HelpEvent& rHEvt ) { if ( !_pImp->RequestHelp( rHEvt ) ) @@ -523,11 +461,6 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode ) _pImp->SetSelectionMode( eMode ); } -sal_Bool SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r ) -{ - return _pImp->HandleShortCutKey( r ); -} - Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return _pImp->GetEntryBoundRect( pEntry ); |