summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-11 08:38:51 +0200
committerNoel Grandin <noel@peralex.com>2016-01-11 10:49:24 +0200
commit1b26a4eb4ba99cb4a47da83c4e6419f2065f9d17 (patch)
tree8839078d7cfc754fe60844b954c8eba9486d7238 /basctl
parentaae44c09d33611fc9e9b9a835026f04a7ff56025 (diff)
loplugin:unusedmethods unused return value in basctl
Change-Id: I23590020acbb9a6760edd755affa121a572aaea5
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx47
-rw-r--r--basctl/source/basicide/baside2.hxx22
-rw-r--r--basctl/source/basicide/baside2b.cxx10
-rw-r--r--basctl/source/basicide/baside3.cxx11
-rw-r--r--basctl/source/basicide/bastype2.cxx13
-rw-r--r--basctl/source/basicide/scriptdocument.cxx4
-rw-r--r--basctl/source/dlged/dlgedfunc.cxx24
-rw-r--r--basctl/source/dlged/dlgedobj.cxx6
-rw-r--r--basctl/source/inc/baside3.hxx4
-rw-r--r--basctl/source/inc/bastype2.hxx2
-rw-r--r--basctl/source/inc/dlgedfunc.hxx12
-rw-r--r--basctl/source/inc/dlgedobj.hxx2
-rw-r--r--basctl/source/inc/scriptdocument.hxx2
13 files changed, 52 insertions, 107 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d4102010a6df..6d4a07286a0e 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -363,36 +363,36 @@ bool ModulWindow::BasicExecute()
return bDone;
}
-bool ModulWindow::CompileBasic()
+void ModulWindow::CompileBasic()
{
CheckCompileBasic();
- return XModule().Is() && xModule->IsCompiled();
+ XModule().Is() && xModule->IsCompiled();
}
-bool ModulWindow::BasicRun()
+void ModulWindow::BasicRun()
{
aStatus.nBasicFlags = 0;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepOver()
+void ModulWindow::BasicStepOver()
{
aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepInto()
+void ModulWindow::BasicStepInto()
{
aStatus.nBasicFlags = SbDEBUG_STEPINTO;
- return BasicExecute();
+ BasicExecute();
}
-bool ModulWindow::BasicStepOut()
+void ModulWindow::BasicStepOut()
{
aStatus.nBasicFlags = SbDEBUG_STEPOUT;
- return BasicExecute();
+ BasicExecute();
}
@@ -403,10 +403,8 @@ void ModulWindow::BasicStop()
aStatus.bIsRunning = false;
}
-bool ModulWindow::LoadBasic()
+void ModulWindow::LoadBasic()
{
- bool bDone = false;
-
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
@@ -438,20 +436,15 @@ bool ModulWindow::LoadBasic()
sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
- else
- bDone = true;
}
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTREAD))->Execute();
}
- return bDone;
}
-bool ModulWindow::SaveBasicSource()
+void ModulWindow::SaveBasicSource()
{
- bool bDone = false;
-
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
@@ -484,21 +477,17 @@ bool ModulWindow::SaveBasicSource()
sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
- else
- bDone = true;
}
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_COULDNTWRITE))->Execute();
}
-
- return bDone;
}
-bool ModulWindow::ImportDialog()
+void ModulWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
OUString aLibName = GetLibName();
- return implImportDialog( this, aCurPath, rDocument, aLibName );
+ implImportDialog( this, aCurPath, rDocument, aLibName );
}
bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
@@ -559,7 +548,7 @@ void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk )
}
-bool ModulWindow::BasicToggleBreakPoint()
+void ModulWindow::BasicToggleBreakPoint()
{
AssertValidEditEngine();
@@ -567,16 +556,12 @@ bool ModulWindow::BasicToggleBreakPoint()
aSel.GetStart().GetPara()++; // Basic lines start at 1!
aSel.GetEnd().GetPara()++;
- bool bNewBreakPoint = false;
-
for ( sal_uInt32 nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); ++nLine )
{
- if ( ToggleBreakPoint( nLine ) )
- bNewBreakPoint = true;
+ ToggleBreakPoint( nLine );
}
aXEditorWindow->GetBrkWindow().Invalidate();
- return bNewBreakPoint;
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 72e617df71c0..8be5eff1a11d 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -152,7 +152,7 @@ public:
void InitScrollBars();
void ForceSyntaxTimeout();
- bool SetSourceInBasic();
+ void SetSourceInBasic();
bool CanModify() { return ImpCanModify(); }
@@ -246,7 +246,7 @@ public:
virtual void dispose() override;
void AddWatch( const OUString& rVName );
- bool RemoveSelectedWatch();
+ void RemoveSelectedWatch();
void UpdateWatches( bool bBasicStopped = false );
};
@@ -351,13 +351,13 @@ public:
void SetSbModule( SbModule* pModule ) { xModule = pModule; }
OUString GetSbModuleName();
- bool CompileBasic();
- bool BasicRun();
- bool BasicStepOver();
- bool BasicStepInto();
- bool BasicStepOut();
+ void CompileBasic();
+ void BasicRun();
+ void BasicStepOver();
+ void BasicStepInto();
+ void BasicStepOut();
void BasicStop();
- bool BasicToggleBreakPoint();
+ void BasicToggleBreakPoint();
void BasicToggleBreakPointEnabled();
void ManageBreakPoints();
void UpdateBreakPoint( const BreakPoint& rBrk );
@@ -367,9 +367,9 @@ public:
long BasicBreakHdl( StarBASIC* pBasic );
void AssertValidEditEngine();
- bool LoadBasic();
- bool SaveBasicSource();
- bool ImportDialog();
+ void LoadBasic();
+ void SaveBasicSource();
+ void ImportDialog();
void EditMacro( const OUString& rMacroName );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 59352066349c..2729774f1996 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -929,9 +929,8 @@ void EditorWindow::LoseFocus()
Window::LoseFocus();
}
-bool EditorWindow::SetSourceInBasic()
+void EditorWindow::SetSourceInBasic()
{
- bool bChanged = false;
if ( pEditEngine && pEditEngine->IsModified()
&& !GetEditView()->IsReadOnly() ) // Added for #i60626, otherwise
// any read only bug in the text engine could lead to a crash later
@@ -939,10 +938,8 @@ bool EditorWindow::SetSourceInBasic()
if ( !StarBASIC::IsRunning() ) // Not at runtime!
{
rModulWindow.UpdateModule();
- bChanged = true;
}
}
- return bChanged;
}
// Returns the position of the last character of any of the following
@@ -1763,7 +1760,7 @@ void WatchWindow::AddWatch( const OUString& rVName )
UpdateWatches();
}
-bool WatchWindow::RemoveSelectedWatch()
+void WatchWindow::RemoveSelectedWatch()
{
SvTreeListEntry* pEntry = aTreeListBox->GetCurEntry();
if ( pEntry )
@@ -1776,10 +1773,7 @@ bool WatchWindow::RemoveSelectedWatch()
aXEdit->SetText( OUString() );
if ( !aTreeListBox->GetEntryCount() )
aRemoveWatchButton->Disable();
- return true;
}
- else
- return false;
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 09e3c873dcd3..9a6cccb88ef6 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -675,10 +675,8 @@ void DialogWindow::UpdateBrowser()
rLayout.UpdatePropertyBrowser();
}
-bool DialogWindow::SaveDialog()
+void DialogWindow::SaveDialog()
{
- bool bDone = false;
-
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
@@ -733,7 +731,6 @@ bool DialogWindow::SaveDialog()
if (! nRead)
break;
}
- bDone = true;
// With resource?
Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
@@ -832,8 +829,6 @@ bool DialogWindow::SaveDialog()
else
ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTWRITE))->Execute();
}
-
- return bDone;
}
std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
@@ -1211,11 +1206,11 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
}
-bool DialogWindow::ImportDialog()
+void DialogWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
OUString aLibName = GetLibName();
- return implImportDialog( this, aCurPath, rDocument, aLibName );
+ implImportDialog( this, aCurPath, rDocument, aLibName );
}
DlgEdModel& DialogWindow::GetModel() const
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index e43fa7250c76..652c75980ebf 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -160,19 +160,6 @@ EntryDescriptor::EntryDescriptor (
EntryDescriptor::~EntryDescriptor()
{ }
-bool EntryDescriptor::operator == (EntryDescriptor const& rDesc) const
-{
- return
- m_aDocument == rDesc.m_aDocument &&
- m_eLocation == rDesc.m_eLocation &&
- m_aLibName == rDesc.m_aLibName &&
- m_aLibSubName == rDesc.m_aLibSubName &&
- m_aName == rDesc.m_aName &&
- m_aMethodName == rDesc.m_aMethodName &&
- m_eType == rDesc.m_eType;
-}
-
-
// TreeListBox
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index d239fd29fe3e..ea2f02d882c6 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1447,9 +1447,9 @@ namespace basctl
}
- bool ScriptDocument::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const
+ void ScriptDocument::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const
{
- return m_pImpl->saveDocument( _rxStatusIndicator );
+ m_pImpl->saveDocument( _rxStatusIndicator );
}
diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx
index c087cdd228d4..be9485394ae6 100644
--- a/basctl/source/dlged/dlgedfunc.cxx
+++ b/basctl/source/dlged/dlgedfunc.cxx
@@ -88,9 +88,8 @@ DlgEdFunc::~DlgEdFunc()
{
}
-bool DlgEdFunc::MouseButtonDown( const MouseEvent& )
+void DlgEdFunc::MouseButtonDown( const MouseEvent& )
{
- return true;
}
bool DlgEdFunc::MouseButtonUp( const MouseEvent& )
@@ -99,9 +98,8 @@ bool DlgEdFunc::MouseButtonUp( const MouseEvent& )
return true;
}
-bool DlgEdFunc::MouseMove( const MouseEvent& )
+void DlgEdFunc::MouseMove( const MouseEvent& )
{
- return true;
}
bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
@@ -342,10 +340,10 @@ DlgEdFuncInsert::~DlgEdFuncInsert()
rParent.GetView().SetEditMode();
}
-bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
+void DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
{
if( !rMEvt.IsLeft() )
- return true;
+ return;
SdrView& rView = rParent.GetView();
vcl::Window& rWindow = rParent.GetWindow();
@@ -377,8 +375,6 @@ bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
if ( rView.IsMarkedHit(aPos, nHitLog) && rParent.GetMode() != DlgEditor::READONLY )
rParent.ShowProperties();
}
-
- return true;
}
bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
@@ -413,7 +409,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
}
}
-bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
+void DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
{
SdrView& rView = rParent.GetView();
vcl::Window& rWindow = rParent.GetWindow();
@@ -429,8 +425,6 @@ bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
}
rWindow.SetPointer( rView.GetPreferredPointer( aPos, &rWindow, nHitLog ) );
-
- return true;
}
DlgEdFuncSelect::DlgEdFuncSelect (DlgEditor& rParent_) :
@@ -443,7 +437,7 @@ DlgEdFuncSelect::~DlgEdFuncSelect()
{
}
-bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
+void DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
// get view from parent
SdrView& rView = rParent.GetView();
@@ -501,8 +495,6 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
if ( rView.IsMarkedHit(aMDPos, nHitLog) && rParent.GetMode() != DlgEditor::READONLY )
rParent.ShowProperties();
}
-
- return true;
}
bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
@@ -539,7 +531,7 @@ bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
return true;
}
-bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
+void DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
{
SdrView& rView = rParent.GetView();
vcl::Window& rWindow = rParent.GetWindow();
@@ -558,8 +550,6 @@ bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
}
rWindow.SetPointer( rView.GetPreferredPointer( aPnt, &rWindow, nHitLog ) );
-
- return true;
}
} // namespace basctl
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 86786e8f7dc6..ae73dbabeb67 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -1672,9 +1672,8 @@ awt::DeviceInfo DlgEdForm::getDeviceInfo() const
return aDeviceInfo;
}
-bool DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel )
+void DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel )
{
- bool bRes = false;
// Need to flesh this out, currently we will only support data-aware controls for calc
// and only handle a subset of functionality e.g. linked-cell and cell range data source. Of course later
// we need to disambiguate for writer ( and others ? ) and also support the generic form (db) bindings
@@ -1707,10 +1706,7 @@ bool DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel )
Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( "com.sun.star.table.CellRangeListSource", aArgs ), UNO_QUERY );
xListEntrySink->setListEntrySource( xSource );
}
- if ( xListEntrySink.is() || xBindable.is() )
- bRes = true;
}
- return bRes;
}
} // namespace basctl
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 3ac12e1e3d8e..61afcb84d153 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -93,8 +93,8 @@ public:
bool RenameDialog( const OUString& rNewName );
void DisableBrowser();
void UpdateBrowser();
- bool SaveDialog();
- bool ImportDialog();
+ void SaveDialog();
+ void ImportDialog();
virtual OUString GetTitle() override;
virtual EntryDescriptor CreateEntryDescriptor() override;
diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx
index 48f9e202f4dd..d8f17d8109a6 100644
--- a/basctl/source/inc/bastype2.hxx
+++ b/basctl/source/inc/bastype2.hxx
@@ -141,8 +141,6 @@ public:
);
virtual ~EntryDescriptor ();
- bool operator == (EntryDescriptor const& rDesc) const;
-
ScriptDocument const& GetDocument() const { return m_aDocument; }
LibraryLocation GetLocation() const { return m_eLocation; }
diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx
index 9f6118784dca..a675288a2bfe 100644
--- a/basctl/source/inc/dlgedfunc.hxx
+++ b/basctl/source/inc/dlgedfunc.hxx
@@ -42,9 +42,9 @@ public:
explicit DlgEdFunc (DlgEditor& rParent);
virtual ~DlgEdFunc();
- virtual bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual bool MouseButtonUp( const MouseEvent& rMEvt );
- virtual bool MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
bool KeyInput( const KeyEvent& rKEvt );
};
@@ -58,9 +58,9 @@ public:
explicit DlgEdFuncInsert (DlgEditor& rParent);
virtual ~DlgEdFuncInsert ();
- virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
- virtual bool MouseMove( const MouseEvent& rMEvt ) override;
+ virtual void MouseMove( const MouseEvent& rMEvt ) override;
};
@@ -76,9 +76,9 @@ public:
explicit DlgEdFuncSelect (DlgEditor& rParent);
virtual ~DlgEdFuncSelect ();
- virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
- virtual bool MouseMove( const MouseEvent& rMEvt ) override;
+ virtual void MouseMove( const MouseEvent& rMEvt ) override;
};
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index 52a247a09aaa..65afa32f44fc 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -128,7 +128,7 @@ public:
void SAL_CALL _elementRemoved( const css::container::ContainerEvent& Event ) throw(css::uno::RuntimeException);
virtual void SetLayer(SdrLayerID nLayer) override;
- bool MakeDataAware( const css::uno::Reference< css::frame::XModel >& xModel );
+ void MakeDataAware( const css::uno::Reference< css::frame::XModel >& xModel );
};
diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx
index 815c78b80195..60cadce8fab9 100644
--- a/basctl/source/inc/scriptdocument.hxx
+++ b/basctl/source/inc/scriptdocument.hxx
@@ -457,7 +457,7 @@ namespace basctl
@precond
<code>isApplication</code> returns <FALSE/>
*/
- bool saveDocument(
+ void saveDocument(
const css::uno::Reference< css::task::XStatusIndicator >& _rxStatusIndicator
) const;