diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-07 16:18:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-09 11:01:06 +0200 |
commit | 14505bb67eb671ebcb91c81cbefbbc1aab930b44 (patch) | |
tree | 0ad2166f5c6c95d01f2f7204b13aaa0ca8119acc /svtools/source/contnr | |
parent | 6ea42ddf8f06b7551e80a906908dbad0766a68c6 (diff) |
loplugin:staticmethods
Change-Id: I715374b531da2850434b2436633b6042ecb9ebe0
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 10 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 14 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl2.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 12 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 10 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 25 |
9 files changed, 43 insertions, 44 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 8ef7f1867411..8ec816f3af49 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -462,7 +462,7 @@ public: void OpenFolder_Impl(); // #83004# ------- - void ReplaceTabWithString( OUString& aValue ); + static void ReplaceTabWithString( OUString& aValue ); void CreateDisplayText_Impl(); void SortFolderContent_Impl(); @@ -1117,7 +1117,7 @@ Size SvtFileView::GetOptimalSize() const -OUString SvtFileView::GetURL( SvTreeListEntry* pEntry ) const +OUString SvtFileView::GetURL( SvTreeListEntry* pEntry ) { OUString aURL; if ( pEntry && pEntry->GetUserData() ) diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 9e6b3bfcdae4..da249561ffe4 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -235,7 +235,7 @@ class SvxIconChoiceCtrl_Impl void AdjustScrollBars( bool bVirtSizeGrowedOnly = false); void PositionScrollBars( long nRealWidth, long nRealHeight ); - long GetScrollBarPageSize( long nVisibleRange ) const + static long GetScrollBarPageSize( long nVisibleRange ) { return ((nVisibleRange*75)/100); } @@ -397,7 +397,7 @@ public: SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false ); - Point GetEntryPos( SvxIconChoiceCtrlEntry* ); + static Point GetEntryPos( SvxIconChoiceCtrlEntry* ); void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true ); void Arrange( @@ -432,7 +432,7 @@ public: rRect.Right() = LONG_MAX; bBoundRectsDirty = true; } - bool IsBoundingRectValid( const Rectangle& rRect ) const { return ( rRect.Right() != LONG_MAX ); } + static bool IsBoundingRectValid( const Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } void PaintEmphasis( const Rectangle& rRect1, @@ -469,10 +469,10 @@ public: void HideDDIcon(); - bool IsOver( + static bool IsOver( std::vector<Rectangle*>* pSelectedRectList, const Rectangle& rEntryBoundRect - ) const; + ); void SelectRect( const Rectangle&, diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 0e3d008cdce7..c46df0507255 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1628,7 +1628,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect, { OUString aText; if( !pStr ) - aText = pView->GetEntryText( pEntry, false ); + aText = SvtIconChoiceCtrl::GetEntryText( pEntry, false ); else aText = *pStr; @@ -1672,7 +1672,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect, aPos.X() += (rRect.GetWidth() - aImageSize.Width() ) / 2; if( nPaintFlags & PAINTFLAG_VER_CENTERED ) aPos.Y() += (rRect.GetHeight() - aImageSize.Height() ) / 2; - pView->DrawEntryImage( pEntry, aPos, *pOut ); + SvtIconChoiceCtrl::DrawEntryImage( pEntry, aPos, *pOut ); } } @@ -1740,7 +1740,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P } */ - OUString aEntryText( pView->GetEntryText( pEntry, false ) ); + OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); Rectangle aTextRect( CalcTextRect(pEntry,&rPos,false,&aEntryText)); Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) ); @@ -1982,7 +1982,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, { OUString aEntryText; if( !pStr ) - aEntryText = pView->GetEntryText( pEntry, bEdit ); + aEntryText = SvtIconChoiceCtrl::GetEntryText( pEntry, bEdit ); else aEntryText = *pStr; @@ -2811,7 +2811,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange( } } -bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<Rectangle*>* pRectList, const Rectangle& rBoundRect ) const +bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<Rectangle*>* pRectList, const Rectangle& rBoundRect ) { const sal_uInt16 nCount = pRectList->size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) @@ -3127,7 +3127,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) SetNoSelection(); pCurEditedEntry = pEntry; - OUString aEntryText( pView->GetEntryText( pEntry, true ) ); + OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, true ) ); Rectangle aRect( CalcTextRect( pEntry, 0, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); @@ -3585,7 +3585,7 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) return false; OUString sQuickHelpText = pEntry->GetQuickHelpText(); - OUString aEntryText( pView->GetEntryText( pEntry, false ) ); + OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); Rectangle aTextRect( CalcTextRect( pEntry, 0, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) return false; diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 88d6f0ad7714..659be51ba254 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -713,7 +713,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( bool bOccupyFound ) // lead to small overlaps. void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, bool bOccupy ) { - if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect )) + if( !_pGridMap || !SvxIconChoiceCtrl_Impl::IsBoundingRectValid( pEntry->aRect )) return; OccupyGrid( GetGrid( pEntry->aRect.Center()), bOccupy ); } diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index c069bef5b569..39eb1dc3ac88 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -1104,7 +1104,7 @@ void SvImpLBox::DrawNet() pChild = pView->FirstChild( pEntry ); DBG_ASSERT(pChild,"Child?"); - pChild = pTree->LastSibling( pChild ); + pChild = SvTreeList::LastSibling( pChild ); nDistance = (sal_uInt16)(pView->GetVisiblePos(pChild) - pView->GetVisiblePos(pEntry)); aPos2 = aPos1; @@ -1145,7 +1145,7 @@ void SvImpLBox::DrawNet() aPos1.X() -= pView->GetIndent(); aPos1.Y() = GetEntryLine( pEntry ); aPos1.Y() += nEntryHeightDIV2; - pChild = pTree->LastSibling( pEntry ); + pChild = SvTreeList::LastSibling( pEntry ); aPos2.X() = aPos1.X(); aPos2.Y() = GetEntryLine( pChild ); aPos2.Y() += nEntryHeightDIV2; @@ -1689,7 +1689,7 @@ void SvImpLBox::RemovingEntry( SvTreeListEntry* pEntry ) pView->Select( pCursor, false ); ShowCursor( false ); // focus rectangle gone // NextSibling, because we also delete the children of the cursor - pTemp = pView->NextSibling( pCursor ); + pTemp = SvTreeListBox::NextSibling( pCursor ); if( !pTemp ) pTemp = pView->PrevVisible(pCursor); @@ -1697,7 +1697,7 @@ void SvImpLBox::RemovingEntry( SvTreeListEntry* pEntry ) } if( pStartEntry && pStartEntry == pEntry ) { - pTemp = pView->NextSibling( pStartEntry ); + pTemp = SvTreeListBox::NextSibling( pStartEntry ); if( !pTemp ) pTemp = pView->PrevVisible(pStartEntry); pStartEntry = pTemp; @@ -1787,9 +1787,9 @@ void SvImpLBox::MovingEntry( SvTreeListEntry* pEntry ) } else { - pNew = pTree->NextSibling( pEntry ); + pNew = SvTreeList::NextSibling( pEntry ); if( !pNew ) - pNew = pTree->PrevSibling( pEntry ); + pNew = SvTreeList::PrevSibling( pEntry ); } pStartEntry = pNew; } diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 00e65e34cc56..b63059251b62 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -111,7 +111,7 @@ void SvLBoxButtonData::StoreButtonState( SvTreeListEntry* pActEntry, SvItemState eState = ConvertToButtonState( nItemFlags ); } -SvButtonState SvLBoxButtonData::ConvertToButtonState( SvItemStateFlags nItemFlags ) const +SvButtonState SvLBoxButtonData::ConvertToButtonState( SvItemStateFlags nItemFlags ) { nItemFlags &= (SvItemStateFlags::UNCHECKED | SvItemStateFlags::CHECKED | @@ -342,7 +342,7 @@ void SvLBoxButton::Paint( const SvTreeListEntry* /*pEntry*/) { SvBmp nIndex = eKind == SvLBoxButtonKind_staticImage - ? SvBmp::STATICIMAGE : pData->GetIndex( nItemFlags ); + ? SvBmp::STATICIMAGE : SvLBoxButtonData::GetIndex( nItemFlags ); sal_uInt16 nStyle = eKind != SvLBoxButtonKind_disabledCheckbox && rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE; diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 94e237df5545..b078a9c559a2 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -250,7 +250,7 @@ OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry ) const return GetEntryText( pEntry, 0xffff ); } -OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const +OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) { DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry"); OUString aResult; @@ -547,7 +547,7 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar ) -bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const +bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ) { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = static_cast<SvLBoxButton*>( pEntry->GetItem( nCol + 1 ) ); @@ -555,7 +555,7 @@ bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { SvItemStateFlags nButtonFlags = pItem->GetButtonFlags(); - eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); + eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags ); } return ( eState == SV_BUTTON_CHECKED ); diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index d684e4b3fd7b..dcc622edaadb 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -359,7 +359,7 @@ SvTreeListEntry* SvTreeList::CloneEntry( SvTreeListEntry* pSource ) const return pEntry; } -SvTreeListEntry* SvTreeList::CreateEntry() const +SvTreeListEntry* SvTreeList::CreateEntry() { return new SvTreeListEntry; } @@ -807,7 +807,7 @@ SvTreeListEntry* SvTreeList::FirstChild( SvTreeListEntry* pParent ) const return pResult; } -SvTreeListEntry* SvTreeList::NextSibling( SvTreeListEntry* pEntry ) const +SvTreeListEntry* SvTreeList::NextSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Entry?"); if( !pEntry ) @@ -819,7 +819,7 @@ SvTreeListEntry* SvTreeList::NextSibling( SvTreeListEntry* pEntry ) const return nPos < rList.size() ? &rList[nPos] : NULL; } -SvTreeListEntry* SvTreeList::PrevSibling( SvTreeListEntry* pEntry ) const +SvTreeListEntry* SvTreeList::PrevSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Entry?"); if( !pEntry ) @@ -835,7 +835,7 @@ SvTreeListEntry* SvTreeList::PrevSibling( SvTreeListEntry* pEntry ) const } -SvTreeListEntry* SvTreeList::LastSibling( SvTreeListEntry* pEntry ) const +SvTreeListEntry* SvTreeList::LastSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"LastSibling:Entry?"); if( !pEntry ) @@ -915,7 +915,7 @@ sal_uLong SvTreeList::GetAbsPos( const SvTreeListEntry* pEntry) const return pEntry->nAbsPos; } -sal_uLong SvTreeList::GetRelPos( const SvTreeListEntry* pChild ) const +sal_uLong SvTreeList::GetRelPos( const SvTreeListEntry* pChild ) { return pChild->GetChildListPos(); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 1e31187cfd1b..447b9f87d72c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -347,7 +347,7 @@ const Size& SvLBoxItem::GetSize(const SvTreeListBox* pView, const SvTreeListEntr return pViewData->maSize; } -const Size& SvLBoxItem::GetSize(const SvViewDataEntry* pData, sal_uInt16 nItemPos) const +const Size& SvLBoxItem::GetSize(const SvViewDataEntry* pData, sal_uInt16 nItemPos) { const SvViewDataItem* pIData = pData->GetItem(nItemPos); return pIData->maSize; @@ -607,7 +607,7 @@ TriState SvTreeListBox::NotifyMoving( { // case 1 rpNewParent = GetParent( pTarget ); - rNewChildPos = pModel->GetRelPos( pTarget ) + 1; + rNewChildPos = SvTreeList::GetRelPos( pTarget ) + 1; rNewChildPos += nCurEntrySelPos; nCurEntrySelPos++; } @@ -638,14 +638,14 @@ SvTreeListEntry* SvTreeListBox::FirstChild( SvTreeListEntry* pParent ) const return pModel->FirstChild(pParent); } -SvTreeListEntry* SvTreeListBox::NextSibling( SvTreeListEntry* pEntry ) const +SvTreeListEntry* SvTreeListBox::NextSibling( SvTreeListEntry* pEntry ) { - return pModel->NextSibling(pEntry); + return SvTreeList::NextSibling(pEntry); } -SvTreeListEntry* SvTreeListBox::PrevSibling( SvTreeListEntry* pEntry ) const +SvTreeListEntry* SvTreeListBox::PrevSibling( SvTreeListEntry* pEntry ) { - return pModel->PrevSibling(pEntry); + return SvTreeList::PrevSibling(pEntry); } // return: all entries copied @@ -786,7 +786,7 @@ void SvTreeListBox::RemoveSelection() pModel->Remove(*it); } -SvTreeListBox* SvTreeListBox::GetSourceView() const +SvTreeListBox* SvTreeListBox::GetSourceView() { return pDDSource; } @@ -1782,7 +1782,7 @@ OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const return pItem->GetText(); } -const Image& SvTreeListBox::GetExpandedEntryBmp(const SvTreeListEntry* pEntry) const +const Image& SvTreeListBox::GetExpandedEntryBmp(const SvTreeListEntry* pEntry) { DBG_ASSERT(pEntry,"Entry?"); const SvLBoxContextBmp* pItem = static_cast<const SvLBoxContextBmp*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); @@ -1790,7 +1790,7 @@ const Image& SvTreeListBox::GetExpandedEntryBmp(const SvTreeListEntry* pEntry) c return pItem->GetBitmap2( ); } -const Image& SvTreeListBox::GetCollapsedEntryBmp( const SvTreeListEntry* pEntry ) const +const Image& SvTreeListBox::GetCollapsedEntryBmp( const SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Entry?"); const SvLBoxContextBmp* pItem = static_cast<const SvLBoxContextBmp*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); @@ -2005,7 +2005,7 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) cons if(!pItem) return SV_BUTTON_TRISTATE; SvItemStateFlags nButtonFlags = pItem->GetButtonFlags(); - eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); + eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags ); } return eState; } @@ -2305,8 +2305,7 @@ void SvTreeListBox::SetEntryHeight( SvTreeListEntry* pEntry ) SvViewDataEntry* pViewData = GetViewDataEntry( pEntry ); while( nCur < nCount ) { - SvLBoxItem* pItem = pEntry->GetItem( nCur ); - short nHeight = (short)(pItem->GetSize( pViewData, nCur ).Height()); + short nHeight = (short)(SvLBoxItem::GetSize( pViewData, nCur ).Height()); if( nHeight > nHeightMax ) nHeightMax = nHeight; nCur++; @@ -2932,7 +2931,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT SvLBoxItem* pItem = nCurItem < nItemCount ? pEntry->GetItem(nCurItem) : 0; sal_uInt16 nFlags = pTab->nFlags; - Size aSize( pItem->GetSize( pViewDataEntry, nCurItem )); + Size aSize( SvLBoxItem::GetSize( pViewDataEntry, nCurItem )); long nTabPos = GetTabPos( pEntry, pTab ); long nNextTabPos; |