summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-08 14:45:58 +0200
committerNoel Grandin <noel@peralex.com>2016-03-09 10:07:46 +0200
commit44bccf92bc78daa93e969e8b37aeef96a3b38987 (patch)
tree3a59196190ac8d7bf08a6090dc8ca78b78b81036 /svtools
parentff745fc0d973b8d793c3ec21f258ebe695ce3ee2 (diff)
loplugin:constantparam in svtools
Change-Id: Ica82c2758030729ee0d1480c16720cf6c8fed487
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/fileview.cxx4
-rw-r--r--svtools/source/contnr/imivctl.hxx4
-rw-r--r--svtools/source/contnr/imivctl1.cxx18
-rw-r--r--svtools/source/contnr/svlbitm.cxx11
-rw-r--r--svtools/source/contnr/treelistbox.cxx26
-rw-r--r--svtools/source/control/toolbarmenu.cxx14
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx8
-rw-r--r--svtools/source/control/toolbarmenuimp.hxx2
-rw-r--r--svtools/source/misc/templatefoldercache.cxx18
-rw-r--r--svtools/source/svhtml/HtmlWriter.cxx4
10 files changed, 51 insertions, 58 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index b442cb2c9f4a..a28135884180 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1236,9 +1236,9 @@ void SvtFileView::EnableDelete( bool bEnable )
mpImp->EnableDelete( bEnable );
}
-void SvtFileView::EndInplaceEditing( bool _bCancel )
+void SvtFileView::EndInplaceEditing()
{
- return mpImp->EndEditing( _bCancel );
+ return mpImp->EndEditing( false/*_bCancel*/ );
}
IMPL_LINK_TYPED( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar, void )
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index eea834df2c0d..5b78b1f7b417 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -444,7 +444,7 @@ public:
bool bCallRectChangedHdl = true
);
- void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = nullptr );
+ void AdjustEntryAtGrid();
#ifdef DBG_UTIL
void SetEntryTextMode(
SvxIconChoiceCtrlTextMode,
@@ -454,7 +454,7 @@ public:
bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
bool IsEntryEditing() const { return (pCurEditedEntry!=nullptr); }
void EditEntry( SvxIconChoiceCtrlEntry* pEntry );
- void StopEntryEditing( bool bCancel );
+ void StopEntryEditing();
size_t GetEntryCount() const { return aEntries.size(); }
SvxIconChoiceCtrlEntry* GetEntry( size_t nPos )
{
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 4da1d8a02a8a..6e10806278df 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -174,7 +174,7 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor )
{
- StopEntryEditing( true );
+ StopEntryEditing();
nSelectionCount = 0;
pCurHighlightFrame = nullptr;
StopEditTimer();
@@ -234,7 +234,7 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
IMPL_LINK_TYPED( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar, void )
{
- StopEntryEditing( true );
+ StopEntryEditing();
// arrow up: delta=-1; arrow down: delta=+1
Scroll( 0, pScrollBar->GetDelta(), true );
bEndScrollInvalidate = true;
@@ -242,7 +242,7 @@ IMPL_LINK_TYPED( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar
IMPL_LINK_TYPED( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar, void )
{
- StopEntryEditing( true );
+ StopEntryEditing();
// arrow left: delta=-1; arrow right: delta=+1
Scroll( pScrollBar->GetDelta(), 0, true );
bEndScrollInvalidate = true;
@@ -2723,14 +2723,14 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Idle *, void)
// pStart == 0: align all entries
// else: align all entries of the row from pStart on (including pStart)
-void SvxIconChoiceCtrl_Impl::AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart )
+void SvxIconChoiceCtrl_Impl::AdjustEntryAtGrid()
{
IconChoiceMap aLists;
- pImpCursor->CreateGridAjustData( aLists, pStart );
+ pImpCursor->CreateGridAjustData( aLists, nullptr );
for (IconChoiceMap::const_iterator iter = aLists.begin();
iter != aLists.end(); ++iter)
{
- AdjustAtGrid(iter->second, pStart);
+ AdjustAtGrid(iter->second, nullptr);
}
IcnCursor_Impl::DestroyGridAdjustData( aLists );
CheckScrollBars();
@@ -2943,7 +2943,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
if( !pEntry )
return;
- StopEntryEditing( true );
+ StopEntryEditing();
pEdit.disposeAndClear();
SetNoSelection();
@@ -3000,10 +3000,10 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, TextEditEndedHdl, LinkParamNone*,
pCurEditedEntry = nullptr;
}
-void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel )
+void SvxIconChoiceCtrl_Impl::StopEntryEditing()
{
if( pEdit )
- pEdit->StopEditing( bCancel );
+ pEdit->StopEditing( true/*bCancel*/ );
}
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index c5e5403d2cdd..50767f8534a0 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -35,7 +35,7 @@ struct SvLBoxButtonData_Impl
SvLBoxButtonData_Impl() : pEntry( nullptr ), bDefaultImages( false ), bShowRadioButton( false ) {}
};
-void SvLBoxButtonData::InitData( bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
+void SvLBoxButtonData::InitData( bool _bRadioBtn, const Control* pCtrl )
{
nWidth = nHeight = 0;
@@ -43,23 +43,22 @@ void SvLBoxButtonData::InitData( bool bImagesFromDefault, bool _bRadioBtn, const
bDataOk = false;
eState = SV_BUTTON_UNCHECKED;
- pImpl->bDefaultImages = bImagesFromDefault;
+ pImpl->bDefaultImages = true;
pImpl->bShowRadioButton = _bRadioBtn;
- if ( bImagesFromDefault )
- SetDefaultImages( pCtrl );
+ SetDefaultImages( pCtrl );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings )
: pImpl( new SvLBoxButtonData_Impl )
{
- InitData( true, false, pControlForSettings );
+ InitData( false, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
: pImpl( new SvLBoxButtonData_Impl )
{
- InitData( true, _bRadioBtn, pControlForSettings );
+ InitData( _bRadioBtn, pControlForSettings );
}
SvLBoxButtonData::~SvLBoxButtonData()
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f0e9142b71f8..695fd424e898 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1414,7 +1414,7 @@ void SvTreeListBox::InitTreeView()
SetSpaceBetweenEntries( 0 );
SetLineColor();
- InitSettings( true, true, true );
+ InitSettings( true );
ImplInitStyle();
SetTabs();
}
@@ -3709,7 +3709,7 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
nEntryHeight = 0; // _together_ with true of 1. par (bFont) of InitSettings() a zero-height
// forces complete recalc of heights!
- InitSettings( true, true, true );
+ InitSettings( true );
Invalidate();
}
else
@@ -3745,23 +3745,17 @@ void SvTreeListBox::ApplySettings(vcl::RenderContext& rRenderContext)
pCheckButtonData->SetDefaultImages(this);
}
-void SvTreeListBox::InitSettings(bool bFont, bool bForeground, bool bBackground)
+void SvTreeListBox::InitSettings(bool bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if (bFont)
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor(rStyleSettings.GetWindowTextColor());
- SetPointFont(*this, aFont);
- AdjustEntryHeightAndRecalc();
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor(rStyleSettings.GetWindowTextColor());
+ SetPointFont(*this, aFont);
+ AdjustEntryHeightAndRecalc();
- if (bForeground || bFont)
- {
- SetTextColor(rStyleSettings.GetFieldTextColor());
- SetTextFillColor();
- }
+ SetTextColor(rStyleSettings.GetFieldTextColor());
+ SetTextFillColor();
if (bBackground)
SetBackground(rStyleSettings.GetFieldColor());
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 23ae4517ee7e..4cac6fe225fb 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -126,9 +126,9 @@ ToolbarMenuEntry::~ToolbarMenuEntry()
}
-const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCreate /* = false */ )
+const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible()
{
- if( !mxAccContext.is() && bCreate )
+ if( !mxAccContext.is() )
{
if( mpControl )
{
@@ -148,7 +148,7 @@ sal_Int32 ToolbarMenuEntry::getAccessibleChildCount() throw (RuntimeException)
{
if( mpControl )
{
- const Reference< XAccessibleContext >& xContext = GetAccessible( true );
+ const Reference< XAccessibleContext >& xContext = GetAccessible();
if( xContext.is() )
{
return xContext->getAccessibleChildCount();
@@ -160,7 +160,7 @@ sal_Int32 ToolbarMenuEntry::getAccessibleChildCount() throw (RuntimeException)
Reference< XAccessible > ToolbarMenuEntry::getAccessibleChild( sal_Int32 index ) throw (IndexOutOfBoundsException, RuntimeException)
{
- const Reference< XAccessibleContext >& xContext = GetAccessible( true );
+ const Reference< XAccessibleContext >& xContext = GetAccessible();
if( mpControl )
{
if( xContext.is() )
@@ -297,7 +297,7 @@ void ToolbarMenu_Impl::selectAccessibleChild( sal_Int32 nChildIndex ) throw (Ind
{
if( pEntry->mpControl )
{
- Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(true), UNO_QUERY_THROW );
+ Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(), UNO_QUERY_THROW );
xSel->selectAccessibleChild(nChildIndex);
}
else if( pEntry->mnEntryId != TITLE_ID )
@@ -329,7 +329,7 @@ bool ToolbarMenu_Impl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw
{
if( pEntry->mpControl )
{
- Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(true), UNO_QUERY_THROW );
+ Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(), UNO_QUERY_THROW );
xSel->isAccessibleChildSelected(nChildIndex);
}
return true;
@@ -381,7 +381,7 @@ void ToolbarMenu_Impl::notifyHighlightedEntry()
}
else
{
- aNew <<= pEntry->GetAccessible(true);
+ aNew <<= pEntry->GetAccessible();
}
fireAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOld, aNew );
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index 1bc217cf1520..b6a8dd1592a9 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -341,12 +341,12 @@ Reference< XAccessible > SAL_CALL ToolbarMenuAcc::getAccessibleAtPoint( const aw
if( pEntry->mpControl )
{
awt::Point aChildPoint( aPoint.X - pEntry->maRect.Left(), aPoint.Y - pEntry->maRect.Top() );
- Reference< XAccessibleComponent > xComp( pEntry->GetAccessible(true), UNO_QUERY_THROW );
+ Reference< XAccessibleComponent > xComp( pEntry->GetAccessible(), UNO_QUERY_THROW );
xRet = xComp->getAccessibleAtPoint(aChildPoint);
}
else
{
- xRet.set( pEntry->GetAccessible(true), UNO_QUERY );
+ xRet.set( pEntry->GetAccessible(), UNO_QUERY );
}
}
}
@@ -470,11 +470,11 @@ Reference< XAccessible > SAL_CALL ToolbarMenuAcc::getSelectedAccessibleChild( sa
{
if( pEntry->mpControl )
{
- Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(true), UNO_QUERY_THROW );
+ Reference< XAccessibleSelection > xSel( pEntry->GetAccessible(), UNO_QUERY_THROW );
return xSel->getSelectedAccessibleChild(0);
}
else
- return Reference< XAccessible >( pEntry->GetAccessible(true), UNO_QUERY );
+ return Reference< XAccessible >( pEntry->GetAccessible(), UNO_QUERY );
}
}
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index 825ebdfa8d12..9469bde4b3df 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -85,7 +85,7 @@ public:
void init( int nEntryId, MenuItemBits nBits );
- const css::uno::Reference< css::accessibility::XAccessibleContext >& GetAccessible( bool bCreate = false );
+ const css::uno::Reference< css::accessibility::XAccessibleContext >& GetAccessible();
sal_Int32 getAccessibleChildCount() throw (css::uno::RuntimeException);
css::uno::Reference< css::accessibility::XAccessible > getAccessibleChild( sal_Int32 index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 72c7bcbfb380..7157e0933885 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -417,8 +417,8 @@ namespace svt
explicit TemplateFolderCacheImpl( bool _bAutoStoreState );
~TemplateFolderCacheImpl( );
- bool needsUpdate( bool _bForceCheck );
- void storeState( bool _bForceRetrieval );
+ bool needsUpdate();
+ void storeState();
private:
bool openCacheStream( bool _bForRead );
@@ -459,7 +459,7 @@ namespace svt
{
// store the current state if possible and required
if ( m_bValidCurrentState && m_bAutoStoreState )
- storeState( false );
+ storeState();
closeCacheStream( );
}
@@ -507,9 +507,9 @@ namespace svt
}
- void TemplateFolderCacheImpl::storeState( bool _bForceRetrieval )
+ void TemplateFolderCacheImpl::storeState()
{
- if ( !m_bValidCurrentState || _bForceRetrieval )
+ if ( !m_bValidCurrentState )
readCurrentState( );
if ( m_bValidCurrentState && openCacheStream( false ) )
@@ -754,9 +754,9 @@ namespace svt
}
- bool TemplateFolderCacheImpl::needsUpdate( bool _bForceCheck )
+ bool TemplateFolderCacheImpl::needsUpdate()
{
- if ( m_bKnowState && !_bForceCheck )
+ if ( m_bKnowState )
return m_bNeedsUpdate;
m_bNeedsUpdate = true;
@@ -814,13 +814,13 @@ namespace svt
bool TemplateFolderCache::needsUpdate()
{
- return m_pImpl->needsUpdate( false/*_bForceCheck*/ );
+ return m_pImpl->needsUpdate();
}
void TemplateFolderCache::storeState()
{
- m_pImpl->storeState( false/*_bForceRetrieval*/ );
+ m_pImpl->storeState();
}
diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx
index 961ab38457b5..ea5b93a00fa6 100644
--- a/svtools/source/svhtml/HtmlWriter.cxx
+++ b/svtools/source/svhtml/HtmlWriter.cxx
@@ -22,9 +22,9 @@ HtmlWriter::HtmlWriter(SvStream& rStream) :
HtmlWriter::~HtmlWriter()
{}
-void HtmlWriter::prettyPrint(bool bChoice)
+void HtmlWriter::prettyPrint(bool b)
{
- mbPrettyPrint = bChoice;
+ mbPrettyPrint = b;
}
void HtmlWriter::start(const OString& aElement)