From bee3461c8756d707d042a71a92f81de943229db9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 2 Jul 2017 22:33:02 +0200 Subject: loplugin:casttovoid: cui Change-Id: Id8c4baf8c22cde50c22e4dcbcb475d78294baf5d --- cui/source/customize/cfg.cxx | 26 +++++++------------------- cui/source/customize/macropg.cxx | 1 - cui/source/dialogs/hyphen.cxx | 3 +-- cui/source/inc/cfg.hxx | 2 +- cui/source/options/optjava.cxx | 8 ++++---- cui/source/tabpages/tpcolor.cxx | 1 - 6 files changed, 13 insertions(+), 28 deletions(-) (limited to 'cui/source') diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 90545756487c..a02a4d713243 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1531,18 +1531,14 @@ void SvxMenuEntriesListBox::dispose() // drag and drop support DragDropMode SvxMenuEntriesListBox::NotifyStartDrag( - TransferDataContainer& aTransferDataContainer, SvTreeListEntry* pEntry ) + TransferDataContainer&, SvTreeListEntry* ) { - (void)aTransferDataContainer; - (void)pEntry; - m_bIsInternalDrag = true; return GetDragDropMode(); } -void SvxMenuEntriesListBox::DragFinished( sal_Int8 nDropAction ) +void SvxMenuEntriesListBox::DragFinished( sal_Int8 ) { - (void)nDropAction; m_bIsInternalDrag = false; } @@ -1593,13 +1589,9 @@ TriState SvxMenuEntriesListBox::NotifyMoving( } TriState SvxMenuEntriesListBox::NotifyCopying( - SvTreeListEntry* pTarget, SvTreeListEntry* pSource, - SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) + SvTreeListEntry* pTarget, SvTreeListEntry*, + SvTreeListEntry*&, sal_uLong&) { - (void)pSource; - (void)rpNewParent; - (void)rNewChildPos; - if ( !m_bIsInternalDrag ) { // if the target is NULL then add function to the start of the list @@ -4846,14 +4838,10 @@ TriState SvxToolbarEntriesListBox::NotifyMoving( TriState SvxToolbarEntriesListBox::NotifyCopying( SvTreeListEntry* pTarget, - SvTreeListEntry* pSource, - SvTreeListEntry*& rpNewParent, - sal_uLong& rNewChildPos) + SvTreeListEntry*, + SvTreeListEntry*&, + sal_uLong&) { - (void)pSource; - (void)rpNewParent; - (void)rNewChildPos; - if ( !m_bIsInternalDrag ) { // if the target is NULL then add function to the start of the list diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 60140c901c79..d3b68e626951 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -85,7 +85,6 @@ static long nTabs[] = IMPL_LINK( MacroEventListBox, HeaderEndDrag_Impl, HeaderBar*, pBar, void ) { DBG_ASSERT( pBar == maHeaderBar.get(), "*MacroEventListBox::HeaderEndDrag_Impl: something is wrong here..." ); - (void)pBar; if( !maHeaderBar->GetCurItemId() ) return; diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 3767af0b3048..63a0ad81bd95 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -364,9 +364,8 @@ IMPL_LINK_NOARG( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, void ) xProp->setIsHyphAuto( false ); } - catch (uno::Exception &e) + catch (uno::Exception &) { - (void) e; SAL_WARN( "cui.dialogs", "Hyphenate All failed" ); } } diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 6ffbf8bf73c4..e141bc0b0eaf 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -191,7 +191,7 @@ public: /// methods inherited from SaveInData SvxEntries* GetEntries() override; void SetEntries( SvxEntries* ) override; - bool HasURL( const OUString& URL ) override { (void)URL; return false; } + bool HasURL( const OUString& ) override { return false; } bool HasSettings() override { return m_xMenuSettings.is(); } void Reset() override; bool Apply() override; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index c0eb29c13eee..d117b8668502 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -597,7 +597,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ ) if ( m_pParamDlg ) { eErr = jfw_setVMParameters( m_pParamDlg->GetParameters() ); - SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters"); (void)eErr; + SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters"); bModified = true; } @@ -607,7 +607,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ ) if ( m_pPathDlg->GetOldPath() != sPath ) { eErr = jfw_setUserClassPath( sPath ); - SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath"); (void)eErr; + SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath"); bModified = true; } } @@ -638,7 +638,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ ) } eErr = jfw_setSelectedJRE( pInfo ); - SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE"); (void)eErr; + SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE"); bModified = true; } } @@ -649,7 +649,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ ) bool bEnabled = false; eErr = jfw_getEnabled( &bEnabled ); DBG_ASSERT( JFW_E_NONE == eErr, - "SvxJavaOptionsPage::FillItemSet(): error in jfw_getEnabled" ); (void)eErr; + "SvxJavaOptionsPage::FillItemSet(): error in jfw_getEnabled" ); if ( bEnabled != m_pJavaEnableCB->IsChecked() ) { eErr = jfw_setEnabled( m_pJavaEnableCB->IsChecked() ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 232dc45e2f64..7f17633377f1 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -767,7 +767,6 @@ void SvxColorTabPage::FillUserData() void SvxColorTabPage::SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef ) { - (void) t; OSL_ASSERT( t == XPropertyListType::Color ); pColorList = XColorListRef( static_cast(xRef.get() ) ); } -- cgit v1.2.3