summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-03 10:03:43 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-04 06:31:51 +0200
commitfed3e5d4ea03d12d17dd380359689e4f00c7f90e (patch)
treeef9f40262d1353ae1bdb982d8dda23909e2c5189 /vcl/source/control
parented3c987a60dddcf3a75a15cbb5251d57a9bccdb7 (diff)
tdf#161853 Drop SvxIconViewFlags::POS_LOCKED
The flag is never set, so there's no need to check or clear it either. The only method setting it (`SvxIconChoiceCtrl_Impl::LockEntryPos`) was dropped in commit 18d18c8a5646868a8229dea9ffe3f46888c2bad5 Author: Joseph Powers <jpowers27@cox.net> Date: Sat Jul 23 07:16:14 2011 -0700 unusedcode.easy: svxIconChoiceCtrl_Impl Doing List cleanup, I ran into SaveSelection() and decided to delete it. While I was in the class, I went ahead and cleanup them all up. , but that method was already unused by then. Drop the flag and related code. Change-Id: I9b886f3a63444d502ef8c488437889a2b05e065a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169909 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/imivctl1.cxx21
1 files changed, 3 insertions, 18 deletions
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 23c7a877f3f8..c647939ca4d6 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -297,16 +297,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
{
SvxIconChoiceCtrlEntry* pCur = maEntries[ nCur ].get();
pCur->ClearFlags( SvxIconViewFlags::POS_MOVED );
- if( pCur->IsPosLocked() )
- {
- // adapt (among others) VirtSize
- if( !IsBoundingRectValid( pCur->aRect ) )
- FindBoundingRect( pCur );
- else
- AdjustVirtSize( pCur->aRect );
- }
- else
- InvalidateBoundingRect( pCur->aRect );
+ InvalidateBoundingRect(pCur->aRect);
}
if( !(nWinBits & (WB_NOVSCROLL | WB_NOHSCROLL)) )
@@ -370,7 +361,7 @@ void SvxIconChoiceCtrl_Impl::InitPredecessors()
SvxIconChoiceCtrlEntry* pPrev = maEntries[ 0 ].get();
for( size_t nCur = 1; nCur <= nCount; nCur++ )
{
- pPrev->ClearFlags( SvxIconViewFlags::POS_LOCKED | SvxIconViewFlags::POS_MOVED );
+ pPrev->ClearFlags(SvxIconViewFlags::POS_MOVED);
SvxIconChoiceCtrlEntry* pNext;
if( nCur == nCount )
@@ -1447,12 +1438,6 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry )
{
- DBG_ASSERT(!pEntry->IsPosLocked(),"Locked entry pos in FindBoundingRect");
- if( pEntry->IsPosLocked() && IsBoundingRectValid( pEntry->aRect) )
- {
- AdjustVirtSize( pEntry->aRect );
- return;
- }
Size aSize( CalcBoundingSize() );
Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid()).TopLeft());
SetBoundingRect_Impl( pEntry, aPos, aSize );
@@ -2128,7 +2113,7 @@ void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMod
for( size_t nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = maEntries[ nCur ].get();
- if( pEntry->GetFlags() & SvxIconViewFlags(SvxIconViewFlags::POS_LOCKED | SvxIconViewFlags::POS_MOVED))
+ if (pEntry->GetFlags() & SvxIconViewFlags::POS_MOVED)
SetEntryPos(pEntry, GetEntryBoundRect( pEntry ).TopLeft());
}