summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-04 10:45:52 +0200
committerNoel Grandin <noel@peralex.com>2016-03-04 11:48:04 +0200
commitfb6c99f21e03afb85d00459ca1e1abb07e71d126 (patch)
tree30292c26db1083e5c9bb663b8f75fd9bbdfe6e1d /svtools
parent1fbc20dad2520862f8142f1cabae169bf1450b87 (diff)
loplugin:unuseddefaultparam in svtools
Change-Id: I3ef15fa33791bc5e59c36c1e80f669c7e1e7044b
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/roadmap.hxx2
-rw-r--r--svtools/source/brwbox/datwin.hxx2
-rw-r--r--svtools/source/contnr/imivctl.hxx16
-rw-r--r--svtools/source/contnr/imivctl1.cxx22
-rw-r--r--svtools/source/contnr/ivctrl.cxx4
-rw-r--r--svtools/source/contnr/svimpbox.cxx16
-rw-r--r--svtools/source/contnr/treelist.cxx28
-rw-r--r--svtools/source/control/calendar.cxx22
-rw-r--r--svtools/source/control/roadmap.cxx8
-rw-r--r--svtools/source/inc/svimpbox.hxx4
-rw-r--r--svtools/source/misc/transfer2.cxx5
11 files changed, 45 insertions, 84 deletions
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index 4cc79cff7ed5..d7522654b511 100644
--- a/svtools/inc/roadmap.hxx
+++ b/svtools/inc/roadmap.hxx
@@ -94,7 +94,7 @@ private:
RoadmapItem* GetByIndex( ItemIndex _nItemIndex );
const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const;
- RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 );
+ RoadmapItem* GetByID( ItemId _nID );
const RoadmapItem* GetByID( ItemId _nID ) const;
RoadmapItem* GetPreviousHyperLabel( ItemIndex _Index);
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index d4d1495076a8..dc4f76be01de 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -81,7 +81,7 @@ public:
OUString& Title() { return _aTitle; }
bool IsFrozen() const { return _bFrozen; }
- void Freeze( bool bFreeze = true ) { _bFrozen = bFreeze; }
+ void Freeze() { _bFrozen = true; }
void Draw( BrowseBox& rBox, OutputDevice& rDev,
const Point& rPos, bool bCurs );
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index c01254249832..a238cae3ecbe 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -321,14 +321,14 @@ public:
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
- bool SetChoiceWithCursor ( bool bDo = true ) { bool bOld = bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
+ bool SetChoiceWithCursor() { bool bOld = bChooseWithCursor; bChooseWithCursor = true; return bOld; }
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 CreateAutoMnemonics( MnemonicGenerator* _pGenerator = nullptr );
void FontModified();
- void SelectAll( bool bSelect = true );
+ void SelectAll();
void SelectEntry(
SvxIconChoiceCtrlEntry*,
bool bSelect,
@@ -369,11 +369,7 @@ public:
void SetNoSelection();
SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; }
- void SetCursor(
- SvxIconChoiceCtrlEntry*,
- // true == carry selection when single-selecting
- bool bSyncSingleSelection = true
- );
+ void SetCursor( SvxIconChoiceCtrlEntry* );
SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false );
@@ -418,7 +414,7 @@ public:
bool bIsBackgroundPainted = false);
void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
- sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext, const OUString* pStr = nullptr);
+ sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
// recalculates all BoundingRects if bMustRecalcBoundingRects == true
void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
@@ -595,11 +591,11 @@ public:
GridId GetUnoccupiedGrid();
void OccupyGrids( const SvxIconChoiceCtrlEntry* );
- void OccupyGrid( GridId nId, bool bOccupy = true )
+ void OccupyGrid( GridId nId )
{
DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
if(_pGridMap && nId < (sal_uLong)(_nGridCols *_nGridRows) )
- _pGridMap[ nId ] = bOccupy;
+ _pGridMap[ nId ] = true;
}
Rectangle GetGridRect( GridId );
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index bd6fdd3af77b..85080a79b9a0 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1572,15 +1572,11 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rec
void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect,
IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags,
- vcl::RenderContext& rRenderContext, const OUString* pStr )
+ vcl::RenderContext& rRenderContext )
{
if (eItem == IcnViewFieldTypeText)
{
- OUString aText;
- if (!pStr)
- aText = SvtIconChoiceCtrl::GetEntryText(pEntry, false);
- else
- aText = *pStr;
+ OUString aText = SvtIconChoiceCtrl::GetEntryText(pEntry, false);
Color aOldFontColor = rRenderContext.GetTextColor();
if (pView->AutoFontColor())
@@ -2044,11 +2040,11 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr
}
-void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSyncSingleSelection )
+void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
{
if( pEntry == pCursor )
{
- if( pCursor && eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection &&
+ if( pCursor && eSelectionMode == SINGLE_SELECTION &&
!pCursor->IsSelected() )
SelectEntry( pCursor, true );
return;
@@ -2059,14 +2055,14 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSy
if( pOldCursor )
{
pOldCursor->ClearFlags( SvxIconViewFlags::FOCUSED );
- if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
+ if( eSelectionMode == SINGLE_SELECTION )
SelectEntry( pOldCursor, false ); // deselect old cursor
}
if( pCursor )
{
ToTop( pCursor );
pCursor->SetFlags( SvxIconViewFlags::FOCUSED );
- if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
+ if( eSelectionMode == SINGLE_SELECTION )
SelectEntry( pCursor, true );
ShowCursor( true );
}
@@ -3089,15 +3085,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
return nullptr;
}
-void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect )
+void SvxIconChoiceCtrl_Impl::SelectAll()
{
bool bPaint = true;
size_t nCount = aEntries.size();
- for( size_t nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
+ for( size_t nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ];
- SelectEntry( pEntry, bSelect, true, true, bPaint );
+ SelectEntry( pEntry, true/*bSelect*/, true, true, bPaint );
}
nFlags &= (~F_ADD_MODE);
pAnchor = nullptr;
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index c11e6f3c6fd7..6829631af259 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, const Point* pPos )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, SvxIconViewFlags::NONE);
- _pImp->InsertEntry( pEntry, nPos, pPos );
+ _pImp->InsertEntry( pEntry, nPos );
return pEntry;
}
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index e6607c12adf2..c808572dc031 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -466,7 +466,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta )
ShowCursor( true );
}
-void SvImpLBox::KeyUp( bool bPageUp, bool bNotifyScroll )
+void SvImpLBox::KeyUp( bool bPageUp )
{
if( !aVerSBar->IsVisible() )
return;
@@ -486,8 +486,7 @@ void SvImpLBox::KeyUp( bool bPageUp, bool bNotifyScroll )
return;
nFlags &= (~F_FILLING);
- if( bNotifyScroll )
- BeginScroll();
+ BeginScroll();
aVerSBar->SetThumbPos( nThumbPos - nDelta );
if( bPageUp )
@@ -495,12 +494,11 @@ void SvImpLBox::KeyUp( bool bPageUp, bool bNotifyScroll )
else
CursorUp();
- if( bNotifyScroll )
- EndScroll();
+ EndScroll();
}
-void SvImpLBox::KeyDown( bool bPageDown, bool bNotifyScroll )
+void SvImpLBox::KeyDown( bool bPageDown )
{
if( !aVerSBar->IsVisible() )
return;
@@ -523,8 +521,7 @@ void SvImpLBox::KeyDown( bool bPageDown, bool bNotifyScroll )
return;
nFlags &= (~F_FILLING);
- if( bNotifyScroll )
- BeginScroll();
+ BeginScroll();
aVerSBar->SetThumbPos( nThumbPos+nDelta );
if( bPageDown )
@@ -532,8 +529,7 @@ void SvImpLBox::KeyDown( bool bPageDown, bool bNotifyScroll )
else
CursorDown();
- if( bNotifyScroll )
- EndScroll();
+ EndScroll();
}
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 9eafa9168e63..8f723f403862 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -562,17 +562,11 @@ SvTreeListEntry* SvTreeList::Next( SvTreeListEntry* pActEntry, sal_uInt16* pDept
return nullptr;
}
-SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDepth ) const
+SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry ) const
{
DBG_ASSERT(pActEntry!=nullptr,"Entry?");
sal_uInt16 nDepth = 0;
- bool bWithDepth = false;
- if ( pDepth )
- {
- nDepth = *pDepth;
- bWithDepth = true;
- }
SvTreeListEntries* pActualList = &pActEntry->pParent->m_Children;
sal_uLong nActualPos = pActEntry->GetChildListPos();
@@ -586,8 +580,6 @@ SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDept
nDepth++;
pActEntry = pActualList->back().get();
}
- if ( bWithDepth )
- *pDepth = nDepth;
return pActEntry;
}
if ( pActEntry->pParent == pRootItem )
@@ -598,8 +590,6 @@ SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDept
if ( pActEntry )
{
nDepth--;
- if ( bWithDepth )
- *pDepth = nDepth;
return pActEntry;
}
return nullptr;
@@ -723,17 +713,11 @@ SvTreeListEntry* SvTreeList::NextVisible(const SvListView* pView,SvTreeListEntry
// For performance reasons, this function assumes that the passed entry is
// already visible.
-SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntry* pActEntry, sal_uInt16* pActDepth) const
+SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntry* pActEntry) const
{
DBG_ASSERT(pView&&pActEntry,"PrevVis:View/Entry?");
sal_uInt16 nDepth = 0;
- bool bWithDepth = false;
- if ( pActDepth )
- {
- nDepth = *pActDepth;
- bWithDepth = true;
- }
SvTreeListEntries* pActualList = &pActEntry->pParent->m_Children;
sal_uLong nActualPos = pActEntry->GetChildListPos();
@@ -747,8 +731,6 @@ SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntr
nDepth++;
pActEntry = pActualList->back().get();
}
- if ( bWithDepth )
- *pActDepth = nDepth;
return pActEntry;
}
@@ -759,21 +741,17 @@ SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntr
if ( pActEntry )
{
nDepth--;
- if ( bWithDepth )
- *pActDepth = nDepth;
return pActEntry;
}
return nullptr;
}
-SvTreeListEntry* SvTreeList::LastVisible( const SvListView* pView, sal_uInt16* pDepth) const
+SvTreeListEntry* SvTreeList::LastVisible( const SvListView* pView) const
{
DBG_ASSERT(pView,"LastVis:No View");
SvTreeListEntry* pEntry = Last();
while( pEntry && !IsEntryVisible( pView, pEntry ) )
pEntry = PrevVisible( pView, pEntry );
- if ( pEntry && pDepth )
- *pDepth = GetDepth( pEntry );
return pEntry;
}
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 6ca8461c7994..3f2437520ca4 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -653,20 +653,17 @@ static void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangl
} //end anonymous namespace
-void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev )
+void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext )
{
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor());
- if (bDrawPrev)
- {
- Rectangle aOutRect = maPrevRect;
- aOutRect.Left() += 3;
- aOutRect.Top() += 3;
- aOutRect.Right() -= 3;
- aOutRect.Bottom() -= 3;
- ImplDrawSpinArrow(rRenderContext, aOutRect, true);
- }
- Rectangle aOutRect = maNextRect;
+ Rectangle aOutRect = maPrevRect;
+ aOutRect.Left() += 3;
+ aOutRect.Top() += 3;
+ aOutRect.Right() -= 3;
+ aOutRect.Bottom() -= 3;
+ ImplDrawSpinArrow(rRenderContext, aOutRect, true);
+ aOutRect = maNextRect;
aOutRect.Left() += 3;
aOutRect.Top() += 3;
aOutRect.Right() -= 3;
@@ -1976,7 +1973,7 @@ void Calendar::EndSelection()
}
}
-Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine ) const
+Size Calendar::CalcWindowSizePixel() const
{
OUString a99Text("99");
vcl::Font aOldFont = GetFont();
@@ -2013,7 +2010,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine ) const
aSize.Width() += ((n99TextWidth+DAY_OFFX)*7) + nWeekWidth;
aSize.Width() += MONTH_BORDERX*2;
- aSize.Width() *= nCalcMonthPerLine;
aSize.Height() = nTextHeight + TITLE_OFFY + (TITLE_BORDERY*2);
aSize.Height() += nTextHeight + WEEKDAY_OFFY;
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index a275af78dafd..f9d7f26bf93a 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -437,13 +437,13 @@ void ORoadmap::ChangeRoadmapItemID(ItemId _nID, ItemId _NewID)
pItem->SetID( _NewID );
}
-RoadmapItem* ORoadmap::GetByID(ItemId _nID, ItemIndex _nStartIndex)
+RoadmapItem* ORoadmap::GetByID(ItemId _nID)
{
ItemId nLocID = 0;
const HL_Vector& rItems = m_pImpl->getHyperLabels();
- for ( HL_Vector::const_iterator i = rItems.begin() + _nStartIndex;
- i != rItems.end();
- ++i
+ for ( HL_Vector::const_iterator i = rItems.begin();
+ i != rItems.end();
+ ++i
)
{
nLocID = (*i)->GetID();
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 0f3a9d031f54..926bf1a3ada4 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -305,8 +305,8 @@ public:
static const Image& GetDefaultCollapsedNodeImage( );
const Size& GetOutputSize() const { return aOutputSize;}
- void KeyUp( bool bPageUp, bool bNotifyScroll = true );
- void KeyDown( bool bPageDown, bool bNotifyScroll = true );
+ void KeyUp( bool bPageUp );
+ void KeyDown( bool bPageDown );
void Command( const CommandEvent& rCEvt );
void Invalidate();
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index f1c98bafb8da..6288f8ef808e 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -525,11 +525,10 @@ bool TransferDataContainer::HasAnyData() const
void TransferDataContainer::StartDrag(
vcl::Window* pWindow, sal_Int8 nDragSourceActions,
- const Link<sal_Int8,void>& rLnk, sal_Int32 nDragPointer )
+ const Link<sal_Int8,void>& rLnk )
{
pImpl->aFinshedLnk = rLnk;
- TransferableHelper::StartDrag( pWindow, nDragSourceActions,
- nDragPointer );
+ TransferableHelper::StartDrag( pWindow, nDragSourceActions );
}