summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-07 08:09:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-07 09:16:00 +0000
commit359e0b47a0f96ffa595a0c38a5e5318d797812fe (patch)
tree3695eb961668945dda469fc659337cbdd8c89520 /svtools
parentcc84aaf70ac56092b32d1d329143eca0550dce12 (diff)
loplugin:unuseddefaultparams
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl.hxx6
-rw-r--r--svtools/source/contnr/imivctl1.cxx47
-rw-r--r--svtools/source/contnr/ivctrl.cxx4
3 files changed, 20 insertions, 37 deletions
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index a238cae3ecbe..e14761ffe188 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -325,7 +325,7 @@ public:
void Clear( bool bInCtor = false );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
- void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=nullptr );
+ void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos );
void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = nullptr );
void FontModified();
void SelectAll();
@@ -359,9 +359,7 @@ public:
void SetEntryPos(
SvxIconChoiceCtrlEntry* pEntry,
const Point& rPos,
- bool bAdjustRow = false,
- bool bCheckScrollBars = false,
- bool bKeepGridMap = false
+ bool bAdjustRow = false
);
void InvalidateEntry( SvxIconChoiceCtrlEntry* );
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 85080a79b9a0..c8f25367cf89 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -260,8 +260,7 @@ void SvxIconChoiceCtrl_Impl::FontModified()
ShowCursor( true );
}
-void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t nPos,
- const Point* pPos )
+void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t nPos)
{
StopEditTimer();
aEntries.insert( nPos, pEntry );
@@ -272,32 +271,22 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t
pZOrderList->push_back( pEntry );
pImpCursor->Clear();
- if( pPos )
+
+ // If the UpdateMode is true, don't set all bounding rectangles to
+ // 'to be checked', but only the bounding rectangle of the new entry.
+ // Thus, don't call InvalidateBoundingRect!
+ pEntry->aRect.Right() = LONG_MAX;
+ if( bUpdateMode )
{
- Size aSize( CalcBoundingSize( pEntry ) );
- SetBoundingRect_Impl( pEntry, *pPos, aSize );
- SetEntryPos( pEntry, *pPos, false, true, true /*keep grid map*/ );
- pEntry->nFlags |= SvxIconViewFlags::POS_MOVED;
- SetEntriesMoved( true );
+ FindBoundingRect( pEntry );
+ Rectangle aOutputArea( GetOutputRect() );
+ pGridMap->OccupyGrids( pEntry );
+ if( !aOutputArea.IsOver( pEntry->aRect ) )
+ return; // is invisible
+ pView->Invalidate( pEntry->aRect );
}
else
- {
- // If the UpdateMode is true, don't set all bounding rectangles to
- // 'to be checked', but only the bounding rectangle of the new entry.
- // Thus, don't call InvalidateBoundingRect!
- pEntry->aRect.Right() = LONG_MAX;
- if( bUpdateMode )
- {
- FindBoundingRect( pEntry );
- Rectangle aOutputArea( GetOutputRect() );
- pGridMap->OccupyGrids( pEntry );
- if( !aOutputArea.IsOver( pEntry->aRect ) )
- return; // is invisible
- pView->Invalidate( pEntry->aRect );
- }
- else
- InvalidateBoundingRect( pEntry->aRect );
- }
+ InvalidateBoundingRect( pEntry->aRect );
}
void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator )
@@ -1699,7 +1688,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
}
void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- bool bAdjustAtGrid, bool bCheckScrollBars, bool bKeepGridMap )
+ bool bAdjustAtGrid )
{
ShowCursor( false );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ));
@@ -1713,8 +1702,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
Point aGridOffs(
pEntry->aGridRect.TopLeft() - pEntry->aRect.TopLeft() );
pImpCursor->Clear();
- if( !bKeepGridMap )
- pGridMap->Clear();
+ pGridMap->Clear();
aBoundRect.SetPos( rPos );
pEntry->aRect = aBoundRect;
pEntry->aGridRect.SetPos( rPos + aGridOffs );
@@ -1744,9 +1732,6 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
if( bAdjustVirtSize )
AdjustVirtSize( pEntry->aRect );
- if( bCheckScrollBars && bUpdateMode )
- CheckScrollBars();
-
pView->Invalidate( pEntry->aRect );
pGridMap->OccupyGrids( pEntry );
}
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 6829631af259..e2480983003a 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -101,11 +101,11 @@ void SvtIconChoiceCtrl::dispose()
Control::dispose();
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, SvxIconViewFlags::NONE);
- _pImp->InsertEntry( pEntry, nPos );
+ _pImp->InsertEntry( pEntry, CONTAINER_APPEND );
return pEntry;
}