diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-09-14 17:00:06 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-09-25 10:00:46 +0200 |
commit | 83de03e077d219c881626de43960ae4756284371 (patch) | |
tree | 2d582083e3c060139699b075565f55f872edb7b1 /vcl | |
parent | 4d5e9db574bdb1a7517ffda01efe0746cc058d47 (diff) |
Rename GetSelectEntryCount -> GetSelectedEntryCount
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25
Reviewed-on: https://gerrit.libreoffice.org/42284
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/listbox.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 22 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 2 |
5 files changed, 20 insertions, 20 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index e7699b736064..402275af73a0 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -129,7 +129,7 @@ public: void SelectEntry( sal_Int32 nPos, bool bSelect ); - sal_Int32 GetSelectEntryCount() const; + sal_Int32 GetSelectedEntryCount() const; OUString GetSelectedEntry( sal_Int32 nIndex ) const; sal_Int32 GetSelectedEntryPos( sal_Int32 nIndex ) const; bool IsEntryPosSelected( sal_Int32 nIndex ) const; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 54fb097c4c6c..2b2668d3de7c 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -381,7 +381,7 @@ IMPL_LINK_NOARG(ComboBox::Impl, ImplSelectHdl, LinkParamNone*, void) // attach missing entries ::std::set< sal_Int32 > aSelInText; lcl_GetSelectedEntries( aSelInText, aText, m_cMultiSep, m_pImplLB->GetEntryList() ); - sal_Int32 nSelectedEntries = m_pImplLB->GetEntryList()->GetSelectEntryCount(); + sal_Int32 nSelectedEntries = m_pImplLB->GetEntryList()->GetSelectedEntryCount(); for ( sal_Int32 n = 0; n < nSelectedEntries; n++ ) { sal_Int32 nP = m_pImplLB->GetEntryList()->GetSelectedEntryPos( n ); @@ -1342,9 +1342,9 @@ const Wallpaper& ComboBox::GetDisplayBackground() const return rBack; } -sal_Int32 ComboBox::GetSelectEntryCount() const +sal_Int32 ComboBox::GetSelectedEntryCount() const { - return m_pImpl->m_pImplLB->GetEntryList()->GetSelectEntryCount(); + return m_pImpl->m_pImplLB->GetEntryList()->GetSelectedEntryCount(); } sal_Int32 ComboBox::GetSelectedEntryPos( sal_Int32 nIndex ) const diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 90b1c6bd9043..2244f8397ac7 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -379,7 +379,7 @@ ListBoxEntryFlags ImplEntryList::GetEntryFlags( sal_Int32 nPos ) const return pImplEntry ? pImplEntry->mnFlags : ListBoxEntryFlags::NONE; } -sal_Int32 ImplEntryList::GetSelectEntryCount() const +sal_Int32 ImplEntryList::GetSelectedEntryCount() const { sal_Int32 nSelCount = 0; for ( sal_Int32 n = GetEntryCount(); n; ) @@ -836,7 +836,7 @@ void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt ) sal_Int32 nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() ); if( nSelect != LISTBOX_ENTRY_NOTFOUND ) { - if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) + if ( !mbMulti && GetEntryList()->GetSelectedEntryCount() ) mnTrackingSaveSelection = GetEntryList()->GetSelectedEntryPos( 0 ); else mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND; @@ -901,7 +901,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) // Select only visible Entries with MouseMove, otherwise Tracking... if ( IsVisible( nSelect ) && mpEntryList->IsEntrySelectable( nSelect ) && - ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectedEntryPos( 0 ) ) ) ) + ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectedEntryCount() || ( nSelect != GetEntryList()->GetSelectedEntryPos( 0 ) ) ) ) { mbTrackingSelect = true; if ( SelectEntries( nSelect, LET_TRACKING ) ) @@ -928,7 +928,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) // with the mouse button pressed... if ( rMEvt.IsLeft() && !rMEvt.IsSynthetic() ) { - if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) + if ( !mbMulti && GetEntryList()->GetSelectedEntryCount() ) mnTrackingSaveSelection = GetEntryList()->GetSelectedEntryPos( 0 ); else mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND; @@ -944,7 +944,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) void ImplListBoxWindow::DeselectAll() { - while ( GetEntryList()->GetSelectEntryCount() ) + while ( GetEntryList()->GetSelectedEntryCount() ) { sal_Int32 nS = GetEntryList()->GetSelectedEntryPos( 0 ); SelectEntry( nS, false ); @@ -1074,9 +1074,9 @@ bool ImplListBoxWindow::SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bo bFocusChanged = true; sal_Int32 nAnchor = mpEntryList->GetSelectionAnchor(); - if( ( nAnchor == LISTBOX_ENTRY_NOTFOUND ) && ( mpEntryList->GetSelectEntryCount() || mbStackMode ) ) + if( ( nAnchor == LISTBOX_ENTRY_NOTFOUND ) && ( mpEntryList->GetSelectedEntryCount() || mbStackMode ) ) { - nAnchor = mbStackMode ? 0 : mpEntryList->GetSelectedEntryPos( mpEntryList->GetSelectEntryCount() - 1 ); + nAnchor = mbStackMode ? 0 : mpEntryList->GetSelectedEntryPos( mpEntryList->GetSelectedEntryCount() - 1 ); } if( nAnchor != LISTBOX_ENTRY_NOTFOUND ) { @@ -1244,7 +1244,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) if ( bInside ) { - if ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() ) + if ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectedEntryCount() ) { mbTrackingSelect = true; if ( SelectEntries( nSelect, LET_TRACKING, bShift, bCtrl ) ) @@ -1262,7 +1262,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) } else { - if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) + if ( !mbMulti && GetEntryList()->GetSelectedEntryCount() ) { mbTrackingSelect = true; SelectEntry( GetEntryList()->GetSelectedEntryPos( 0 ), false ); @@ -2260,7 +2260,7 @@ void ImplListBox::ImplCheckScrollBars() mbVScroll = true; // check of the scrolled-out region - if( GetEntryList()->GetSelectEntryCount() == 1 && + if( GetEntryList()->GetSelectedEntryCount() == 1 && GetEntryList()->GetSelectedEntryPos( 0 ) != LISTBOX_ENTRY_NOTFOUND ) ShowProminentEntry( GetEntryList()->GetSelectedEntryPos( 0 ) ); else @@ -2297,7 +2297,7 @@ void ImplListBox::ImplCheckScrollBars() mbVScroll = true; // check of the scrolled-out region - if( GetEntryList()->GetSelectEntryCount() == 1 && + if( GetEntryList()->GetSelectedEntryCount() == 1 && GetEntryList()->GetSelectedEntryPos( 0 ) != LISTBOX_ENTRY_NOTFOUND ) ShowProminentEntry( GetEntryList()->GetSelectedEntryPos( 0 ) ); else diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 1a36cc9e6879..bc953fbe3274 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1021,11 +1021,11 @@ OUString ListBox::GetSelectedEntry(sal_Int32 nIndex) const return GetEntry( GetSelectedEntryPos( nIndex ) ); } -sal_Int32 ListBox::GetSelectEntryCount() const +sal_Int32 ListBox::GetSelectedEntryCount() const { if (!mpImplLB) return 0; - return mpImplLB->GetEntryList()->GetSelectEntryCount(); + return mpImplLB->GetEntryList()->GetSelectedEntryCount(); } sal_Int32 ListBox::GetSelectedEntryPos( sal_Int32 nIndex ) const @@ -1065,9 +1065,9 @@ void ListBox::SelectEntryPos( sal_Int32 nPos, bool bSelect ) if ( 0 <= nPos && nPos < mpImplLB->GetEntryList()->GetEntryCount() ) { - sal_Int32 oldSelectCount = GetSelectEntryCount(), newSelectCount = 0, nCurrentPos = mpImplLB->GetCurrentPos(); + sal_Int32 oldSelectCount = GetSelectedEntryCount(), newSelectCount = 0, nCurrentPos = mpImplLB->GetCurrentPos(); mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect ); - newSelectCount = GetSelectEntryCount(); + newSelectCount = GetSelectedEntryCount(); if (oldSelectCount == 0 && newSelectCount > 0) CallEventListeners(VclEventId::ListboxStateUpdate); //Only when bSelect == true, send both Selection & Focus events diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 40b1f0bb9246..7b09da585859 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -825,7 +825,7 @@ StringMap ListBoxUIObject::get_state() aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly()); aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled()); aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount()); - aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectEntryCount()); + aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount()); aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos()); aMap["SelectEntryText"] = mxListBox->GetSelectedEntry(); |