summaryrefslogtreecommitdiff
path: root/editeng/source/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-11 16:02:17 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:25:54 -0400
commit0629bbb0f58052640f294c0e95dca1f185ac8169 (patch)
treed93b28f7d882d69adfe30a05a9bc40e437c7a24f /editeng/source/editeng
parent39214a9c36b64ccd48c2ad5aae3b5849028cc0f6 (diff)
loplugin:unusedmethods unused return value in include/editeng
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970 Reviewed-on: https://gerrit.libreoffice.org/21361 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 1f9a610de1e1e540386972c010ebfc99e5f55df7)
Diffstat (limited to 'editeng/source/editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx22
-rw-r--r--editeng/source/editeng/editobj.cxx6
-rw-r--r--editeng/source/editeng/editview.cxx3
-rw-r--r--editeng/source/editeng/edtspell.cxx6
-rw-r--r--editeng/source/editeng/edtspell.hxx4
5 files changed, 17 insertions, 24 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index a023b25c2368..fee7a9bf6fcd 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -340,16 +340,15 @@ EditView* EditEngine::RemoveView( EditView* pView )
return pRemoved;
}
-EditView* EditEngine::RemoveView(size_t nIndex)
+void EditEngine::RemoveView(size_t nIndex)
{
ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
if (nIndex >= rViews.size())
- return nullptr;
+ return;
EditView* pView = rViews[nIndex];
if ( pView )
- return RemoveView( pView );
- return nullptr;
+ RemoveView( pView );
}
EditView* EditEngine::GetView(size_t nIndex) const
@@ -707,9 +706,9 @@ EditPaM EditEngine::ConnectContents(sal_Int32 nLeftNode, bool bBackward)
return pImpEditEngine->ConnectContents(nLeftNode, bBackward);
}
-EditPaM EditEngine::InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem)
+void EditEngine::InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem)
{
- return pImpEditEngine->ImpInsertFeature(rEditSelection, rItem);
+ pImpEditEngine->ImpInsertFeature(rEditSelection, rItem);
}
EditSelection EditEngine::MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos, EditView* pCurView)
@@ -747,14 +746,14 @@ void EditEngine::FormatAndUpdate(EditView* pCurView)
pImpEditEngine->FormatAndUpdate(pCurView);
}
-bool EditEngine::Undo(EditView* pView)
+void EditEngine::Undo(EditView* pView)
{
- return pImpEditEngine->Undo(pView);
+ pImpEditEngine->Undo(pView);
}
-bool EditEngine::Redo(EditView* pView)
+void EditEngine::Redo(EditView* pView)
{
- return pImpEditEngine->Redo(pView);
+ pImpEditEngine->Redo(pView);
}
uno::Reference<datatransfer::XTransferable> EditEngine::CreateTransferable(const EditSelection& rSelection)
@@ -1467,12 +1466,11 @@ sal_uLong EditEngine::Read( SvStream& rInput, const OUString& rBaseURL, EETextFo
return rInput.GetError();
}
-sal_uLong EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
+void EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
{
EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
EditPaM aEndPaM( pImpEditEngine->GetEditDoc().GetEndPaM() );
pImpEditEngine->Write( rOutput, eFormat, EditSelection( aStartPaM, aEndPaM ) );
- return rOutput.GetError();
}
EditTextObject* EditEngine::CreateTextObject()
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index fd7ec2b79ed0..0dc8ab7a8f9c 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -372,10 +372,10 @@ SvtScriptType EditTextObject::GetScriptType() const
}
-bool EditTextObject::Store( SvStream& rOStream ) const
+void EditTextObject::Store( SvStream& rOStream ) const
{
if ( rOStream.GetError() )
- return false;
+ return;
sal_Size nStartPos = rOStream.Tell();
@@ -392,8 +392,6 @@ bool EditTextObject::Store( SvStream& rOStream ) const
rOStream.Seek( nStartPos + sizeof( nWhich ) );
rOStream.WriteUInt32( nStructSz );
rOStream.Seek( nEndPos );
-
- return rOStream.GetError() == 0;
}
EditTextObject* EditTextObject::Create( SvStream& rIStream )
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index fa17feb6fe70..e03e6caaa7f9 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1056,7 +1056,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
}
}
-bool EditView::SelectCurrentWord( sal_Int16 nWordType )
+void EditView::SelectCurrentWord( sal_Int16 nWordType )
{
EditSelection aCurSel( pImpEditView->GetEditSelection() );
pImpEditView->DrawSelection();
@@ -1064,7 +1064,6 @@ bool EditView::SelectCurrentWord( sal_Int16 nWordType )
pImpEditView->SetEditSelection( aCurSel );
pImpEditView->DrawSelection();
ShowCursor( true, false );
- return aCurSel.HasRange();
}
void EditView::InsertField( const SvxFieldItem& rFld )
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 13a772f9145c..7cb4e471e3cb 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -106,10 +106,9 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
}
}
-bool EditSpellWrapper::SpellContinue()
+void EditSpellWrapper::SpellContinue()
{
SetLast( pEditView->GetImpEditEngine()->ImpSpell( pEditView ) );
- return GetLast().is();
}
void EditSpellWrapper::SpellEnd()
@@ -612,7 +611,7 @@ bool EdtAutoCorrDoc::ReplaceRange(sal_Int32 nPos, sal_Int32 nSourceLength, const
return true;
}
-bool EdtAutoCorrDoc::SetAttr(sal_Int32 nStt, sal_Int32 nEnd,
+void EdtAutoCorrDoc::SetAttr(sal_Int32 nStt, sal_Int32 nEnd,
sal_uInt16 nSlotId, SfxPoolItem& rItem)
{
SfxItemPool* pPool = &mpEditEngine->GetEditDoc().GetItemPool();
@@ -635,7 +634,6 @@ bool EdtAutoCorrDoc::SetAttr(sal_Int32 nStt, sal_Int32 nEnd,
mpEditEngine->SetAttribs( aSel, aSet, ATTRSPECIAL_EDGE );
bAllowUndoAction = false;
}
- return true;
}
bool EdtAutoCorrDoc::SetINetAttr(sal_Int32 nStt, sal_Int32 nEnd,
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index 9fe8798a3caf..281ebb56d1a2 100644
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -46,7 +46,7 @@ private:
protected:
virtual void SpellStart( SvxSpellArea eArea ) override;
- virtual bool SpellContinue() override; // Check area
+ virtual void SpellContinue() override; // Check area
virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ) override;
virtual void SpellEnd() override;
virtual bool SpellMore() override;
@@ -140,7 +140,7 @@ public:
virtual bool Replace( sal_Int32 nPos, const OUString& rTxt ) override;
virtual bool ReplaceRange( sal_Int32 nPos, sal_Int32 nLen, const OUString& rTxt ) override;
- virtual bool SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) override;
+ virtual void SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) override;
virtual bool SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString& rURL ) override;
virtual OUString const* GetPrevPara(bool bAtNormalPos) override;