diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-18 10:39:48 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-18 12:50:09 +0000 |
commit | a7f6efc68ba97db98ebab9ebc473bffb8ded757f (patch) | |
tree | bad37ce9ee1c9f61f1c8541a9689ecdea8c84c08 /basctl/source | |
parent | a08745551370a052bfb6b91335956ababf435791 (diff) |
loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af
Reviewed-on: https://gerrit.libreoffice.org/21571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 20 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 9 |
3 files changed, 11 insertions, 22 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 34d037d8cb59..09a3bac220a1 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -296,7 +296,7 @@ void ModulWindow::CheckCompileBasic() } } -bool ModulWindow::BasicExecute() +void ModulWindow::BasicExecute() { // #116444# check security settings before macro execution ScriptDocument aDocument( GetDocument() ); @@ -305,7 +305,7 @@ bool ModulWindow::BasicExecute() if ( !aDocument.allowMacros() ) { ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute(); - return false; + return; } } @@ -341,7 +341,8 @@ bool ModulWindow::BasicExecute() if ( !pMethod ) { // If not in a method then prompt the user - return ( !ChooseMacro( uno::Reference< frame::XModel >(), false, OUString() ).isEmpty() ); + ChooseMacro( uno::Reference< frame::XModel >(), false, OUString() ); + return; } if ( pMethod ) { @@ -357,10 +358,6 @@ bool ModulWindow::BasicExecute() else aStatus.bIsRunning = false; // cancel of Reschedule() } - - bool bDone = !aStatus.bError; - - return bDone; } void ModulWindow::CompileBasic() @@ -490,18 +487,16 @@ void ModulWindow::ImportDialog() implImportDialog( this, aCurPath, rDocument, aLibName ); } -bool ModulWindow::ToggleBreakPoint( sal_uLong nLine ) +void ModulWindow::ToggleBreakPoint( sal_uLong nLine ) { DBG_ASSERT( XModule().Is(), "Kein Modul!" ); - bool bNewBreakPoint = false; - if ( XModule().Is() ) { CheckCompileBasic(); if ( aStatus.bError ) { - return false; + return; } BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nLine ); @@ -515,7 +510,6 @@ bool ModulWindow::ToggleBreakPoint( sal_uLong nLine ) if ( xModule->SetBP( (sal_uInt16)nLine) ) { GetBreakPoints().InsertSorted( new BreakPoint( nLine ) ); - bNewBreakPoint = true; if ( StarBASIC::IsRunning() ) { for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ ) @@ -528,8 +522,6 @@ bool ModulWindow::ToggleBreakPoint( sal_uLong nLine ) } } } - - return bNewBreakPoint; } void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk ) diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 8be5eff1a11d..41dd6d3f5753 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -310,7 +310,7 @@ private: OUString m_aModule; void CheckCompileBasic(); - bool BasicExecute(); + void BasicExecute(); static void GoOnTop(); @@ -373,7 +373,7 @@ public: void EditMacro( const OUString& rMacroName ); - bool ToggleBreakPoint( sal_uLong nLine ); + void ToggleBreakPoint( sal_uLong nLine ); BasicStatus& GetBasicStatus() { return aStatus; } diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index ea2f02d882c6..6d3a328100b0 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -242,7 +242,7 @@ namespace basctl getDocument() const; void setDocumentModified() const; bool isDocumentModified() const; - bool saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const; + void saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const; OUString getTitle() const; OUString getURL() const; @@ -805,11 +805,11 @@ namespace basctl } - bool ScriptDocument::Impl::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const + void ScriptDocument::Impl::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const { Reference< XFrame > xFrame; if ( !getCurrentFrame( xFrame ) ) - return false; + return; Sequence< PropertyValue > aArgs; if ( _rxStatusIndicator.is() ) @@ -837,10 +837,7 @@ namespace basctl catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - return false; } - - return true; } |