From 509fd38fba550b554217cd67061e8571486d0f9b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 2 Jul 2017 22:35:53 +0200 Subject: loplugin:casttovoid: basctl Change-Id: I3a8222d39ed02fc048dab1dc6f8dd0ac48857b3e --- basctl/source/basicide/basdoc.cxx | 1 - basctl/source/basicide/basicbox.cxx | 3 +-- basctl/source/basicide/baside2.cxx | 5 +---- basctl/source/basicide/baside2.hxx | 2 +- basctl/source/basicide/basides1.cxx | 2 +- basctl/source/basicide/bastypes.cxx | 3 +-- basctl/source/basicide/iderdll.cxx | 6 ++---- basctl/source/basicide/localizationmgr.cxx | 1 - basctl/source/basicide/moduldlg.cxx | 1 - basctl/source/basicide/scriptdocument.cxx | 1 - 10 files changed, 7 insertions(+), 18 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 8006a0550604..7d9f76f9305a 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -79,7 +79,6 @@ void DocShell::SetPrinter( SfxPrinter* pPr ) void DocShell::FillClass( SvGlobalName*, SotClipboardFormatId*, OUString*, OUString*, OUString*, sal_Int32, bool bTemplate) const { - (void)bTemplate; DBG_ASSERT( !bTemplate, "No template for Basic" ); } diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 7d97fe6d5bd2..b048169038a0 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -337,9 +337,8 @@ LanguageBoxControl::LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, Tool { } -void LanguageBoxControl::StateChanged( sal_uInt16 nID, SfxItemState eState, const SfxPoolItem* pItem ) +void LanguageBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pItem ) { - (void)nID; if (LanguageBox* pBox = static_cast(GetToolBox().GetItemWindow(GetId()))) { if (eState != SfxItemState::DEFAULT) diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1d2c0cf8dbdf..e40583f82e80 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -622,11 +622,8 @@ bool ModulWindow::BasicErrorHdl( StarBASIC * pBasic ) return false; } -BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) +BasicDebugFlags ModulWindow::BasicBreakHdl() { - // #i69280 Required in Window despite normal usage in next command! - (void)pBasic; - // Return value: sal_uInt16 => see SB-Debug-Flags sal_uInt16 nErrorLine = StarBASIC::GetLine(); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index f27997ddc15c..06539527200b 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -362,7 +362,7 @@ public: void BasicAddWatch(); bool BasicErrorHdl( StarBASIC* pBasic ); - BasicDebugFlags BasicBreakHdl( StarBASIC* pBasic ); + BasicDebugFlags BasicBreakHdl(); void AssertValidEditEngine(); void LoadBasic(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index a9c9187a5ad4..2a015cc7cce2 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1182,7 +1182,7 @@ BasicDebugFlags Shell::CallBasicBreakHdl( StarBASIC* pBasic ) BasicStopped( &bAppWindowDisabled, &bDispatcherLocked, &nWaitCount, &pSWActionCount, &pSWLockViewCount ); - nRet = pModWin->BasicBreakHdl( pBasic ); + nRet = pModWin->BasicBreakHdl(); if ( StarBASIC::IsRunning() ) // if cancelled... { diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index e82202a00768..9750d2490b00 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -209,9 +209,8 @@ SearchOptionFlags BaseWindow::GetSearchOptions() return SearchOptionFlags::NONE; } -sal_uInt16 BaseWindow::StartSearchAndReplace (SvxSearchItem const&, bool bFromStart) +sal_uInt16 BaseWindow::StartSearchAndReplace (SvxSearchItem const&, bool) { - static_cast(bFromStart); return 0; } diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index 275ec980903b..fc890c3aee0f 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -114,19 +114,17 @@ namespace Dll::Dll () : m_pShell(nullptr) { - SfxObjectFactory* pFact = &DocShell::Factory(); - (void)pFact; + SfxObjectFactory& rFactory = DocShell::Factory(); ResMgr* pMgr = ResMgr::CreateResMgr( "basctl", Application::GetSettings().GetUILanguageTag()); - auto pModule = o3tl::make_unique( pMgr, &DocShell::Factory() ); + auto pModule = o3tl::make_unique( pMgr, &rFactory ); SfxModule* pMod = pModule.get(); SfxApplication::SetModule(SfxToolsModule::Basic, std::move(pModule)); GetExtraData(); // to cause GlobalErrorHdl to be set - SfxObjectFactory& rFactory = DocShell::Factory(); rFactory.SetDocumentServiceName( "com.sun.star.script.BasicIDE" ); DocShell::RegisterInterface( pMod ); diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 436a75a4580e..18b64c4f5a04 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -711,7 +711,6 @@ void LocalizationMgr::handleRemoveLocales( const Sequence< Locale >& aLocaleSeq DBG_ASSERT( bConsistant, "LocalizationMgr::handleRemoveLocales(): sequence contains unsupported locales" ); - (void)bConsistant; } void LocalizationMgr::handleSetDefaultLocale(const Locale& rLocale) diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index a9f64dcc2212..0e02742d6d07 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -309,7 +309,6 @@ void Shell::CopyDialogResources( TriState ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry, SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos, bool bMove ) { - (void)pEntry; DBG_ASSERT( pEntry, "No entry?" ); // ASS is ok here, should not be reached DBG_ASSERT( pTarget, "No target?" ); // with NULL (right at the beginning) sal_uInt16 nDepth = GetModel()->GetDepth( pTarget ); diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index abbb47cad672..9272d204b943 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -1032,7 +1032,6 @@ namespace basctl :m_pImpl( new Impl( Reference< XModel >() ) ) { OSL_ENSURE( _eType == NoDocument, "ScriptDocument::ScriptDocument: unknown SpecialDocument type!" ); - (void)_eType; } -- cgit