summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-02 16:47:09 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-03 08:20:35 +0200
commitd52136a8335024c32c81bbe79fef3557baf8fc45 (patch)
tree937c08887357b8c2a7a6653728ed8f34f4693b06 /vcl/source/control
parent0ec47906c488d20b4ce43a4df78bbed9ae7cd6b8 (diff)
tdf#161853 Drop SvxIconChoiceCtrl_Impl::GetSelectionCount
Support for anything except single selection mode was dropped in Change-Id: I0acde664d695571e9058b9829ad02745a4abaad2 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 2 11:53:27 2024 +0200 tdf#161853 icon choice ctrl: Drop support for non-single selection modes , so the selection count will usually be 1. The only use is in `SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry`, and should it be possible for no entry to be selected, that will still return `nullptr` anyway. Change-Id: I46562b448b59ba7013ff2e98cfba5925347e01a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169886 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/imivctl.hxx2
-rw-r--r--vcl/source/control/imivctl1.cxx13
2 files changed, 0 insertions, 15 deletions
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 712599364304..cd268c3d271a 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -141,7 +141,6 @@ class SvxIconChoiceCtrl_Impl
LocalFocus aFocus; // Data for focusrect
::vcl::AccessibleFactoryAccess aAccFactory;
- sal_Int32 nSelectionCount;
SvxIconChoiceCtrlPositionMode ePositionMode;
bool bBoundRectsDirty;
bool bUpdateMode;
@@ -309,7 +308,6 @@ public:
void Command( const CommandEvent& rCEvt );
void ToTop( SvxIconChoiceCtrlEntry* );
- sal_Int32 GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
void Scroll( tools::Long nDeltaX, tools::Long nDeltaY );
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index ac384b34d167..27f363f4da76 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -107,7 +107,6 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor )
{
- nSelectionCount = 0;
pCurHighlightFrame = nullptr;
CancelUserEvents();
ShowCursor( false );
@@ -256,14 +255,12 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool b
{
nEntryFlags |= SvxIconViewFlags::SELECTED;
pEntry->AssignFlags( nEntryFlags );
- nSelectionCount++;
pView->ClickIcon();
}
else
{
nEntryFlags &= ~SvxIconViewFlags::SELECTED;
pEntry->AssignFlags( nEntryFlags );
- nSelectionCount--;
pView->ClickIcon();
}
EntrySelected( pEntry, bSelect );
@@ -1805,13 +1802,6 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bS
VisRectChanged();
}
-sal_Int32 SvxIconChoiceCtrl_Impl::GetSelectionCount() const
-{
- if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame )
- return 1;
- return nSelectionCount;
-}
-
void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry )
{
bool bSel;
@@ -2124,9 +2114,6 @@ void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry )
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
{
- if( !GetSelectionCount() )
- return nullptr;
-
size_t nCount = maEntries.size();
if( !pHead )
{