diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-11 16:02:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-12 07:39:42 +0000 |
commit | 1f9a610de1e1e540386972c010ebfc99e5f55df7 (patch) | |
tree | aabfe490a5de78c0936e7237695c2ef6680f75df /editeng | |
parent | c93486bbb85ae19b6d15395afbd7aec3c5db7e89 (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>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 3 | ||||
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 3 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 22 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 3 | ||||
-rw-r--r-- | editeng/source/editeng/edtspell.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/edtspell.hxx | 4 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 14 | ||||
-rw-r--r-- | editeng/source/misc/splwrap.cxx | 3 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 13 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 3 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 7 |
12 files changed, 32 insertions, 55 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 0c6acef40c90..d1c73af64bbc 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -260,10 +260,9 @@ private: m_rText = m_rText.replaceAt(nPos, nLen, rTxt); return true; } - virtual bool SetAttr( sal_Int32, sal_Int32, sal_uInt16, SfxPoolItem& ) override + virtual void SetAttr( sal_Int32, sal_Int32, sal_uInt16, SfxPoolItem& ) override { //fprintf(stderr, "TestAutoCorrDoc::SetAttr\n"); - return true; } virtual bool SetINetAttr( sal_Int32, sal_Int32, const OUString& ) override { diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 8b097ae89597..9781f93172e9 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1681,7 +1681,7 @@ namespace accessibility } return nIndex; } - bool AccessibleEditableTextPara::ExtendByField( css::accessibility::TextSegment& Segment ) + void AccessibleEditableTextPara::ExtendByField( css::accessibility::TextSegment& Segment ) { sal_Int32 nParaIndex = GetParagraphIndex(); SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder(); @@ -1744,7 +1744,6 @@ namespace accessibility Segment.SegmentText = GetTextRange(Segment.SegmentStart, Segment.SegmentEnd); } } - return bExtend; } css::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index b8297153a66e..d6b3e669ee81 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) @@ -1466,12 +1465,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 d6bb729eab8c..de10b02a2ae4 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -374,10 +374,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(); @@ -394,8 +394,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, SfxItemPool* pGlobalTextObjectPool ) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index d28c562fb196..d9d31483df5f 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1045,7 +1045,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(); @@ -1053,7 +1053,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 896a562415b8..4182822047a0 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -105,10 +105,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 fb37d85aab69..2cd6b5be14b4 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; @@ -138,7 +138,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; diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index bd68ff001874..4d59e45f176e 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -243,7 +243,7 @@ SvxNumberFormat::~SvxNumberFormat() delete pBulletFont; } -SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter) +void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter) { if(pConverter && pBulletFont) { @@ -308,8 +308,6 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream.WriteInt32( mnListtabPos ); rStream.WriteInt32( mnFirstLineIndent ); rStream.WriteInt32( mnIndentAt ); - - return rStream; } SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) @@ -658,7 +656,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream ) rStream.ReadUInt16( nTmp16 ); nFeatureFlags = static_cast<SvxNumRuleFlags>(nTmp16); } -SvStream& SvxNumRule::Store( SvStream &rStream ) +void SvxNumRule::Store( SvStream &rStream ) { rStream.WriteUInt16( NUMITEM_VERSION_03 ); rStream.WriteUInt16( nLevelCount ); @@ -691,9 +689,8 @@ SvStream& SvxNumRule::Store( SvStream &rStream ) rStream.WriteUInt16( static_cast<sal_uInt16>(nFeatureFlags) ); if(pConverter) DestroyFontToSubsFontConverter(pConverter); - - return rStream; } + SvxNumRule::~SvxNumRule() { for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) @@ -863,9 +860,8 @@ OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings ) } // changes linked to embedded bitmaps -bool SvxNumRule::UnLinkGraphics() +void SvxNumRule::UnLinkGraphics() { - bool bRet = false; for(sal_uInt16 i = 0; i < GetLevelCount(); i++) { SvxNumberFormat aFmt(GetLevel(i)); @@ -882,14 +878,12 @@ bool SvxNumRule::UnLinkGraphics() aTempItem.SetGraphic(*pGraphic); sal_Int16 eOrient = aFmt.GetVertOrient(); aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient ); - bRet = true; } } else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType()) aFmt.SetNumberingType(SVX_NUM_BITMAP); SetLevel(i, aFmt); } - return bRet; } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) : diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 031d4050f78c..9ea4d8e6db7d 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -268,9 +268,8 @@ void SvxSpellWrapper::SpellEnd() ShowLanguageErrors(); } -bool SvxSpellWrapper::SpellContinue() +void SvxSpellWrapper::SpellContinue() { - return false; } void SvxSpellWrapper::ReplaceAll( const OUString &, sal_Int16 ) diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 6568380344ac..8461634b4c8a 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1206,8 +1206,7 @@ OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos, return sRet; } -sal_uLong -SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, +void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, sal_Int32 nInsPos, sal_Unicode cChar, bool bInsert, vcl::Window* pFrameWin ) { @@ -1418,8 +1417,6 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, } } while( false ); - - return nRet; } SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList( @@ -1608,7 +1605,7 @@ bool SvxAutoCorrect::PutText( const OUString& rShort, const OUString& rLong, return false; } -bool SvxAutoCorrect::MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries, +void SvxAutoCorrect::MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries, std::vector<SvxAutocorrWord>& aDeleteEntries, LanguageType eLang ) { @@ -1616,14 +1613,12 @@ bool SvxAutoCorrect::MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntr auto const iter = m_pLangTable->find(aLanguageTag); if (iter != m_pLangTable->end()) { - return iter->second->MakeCombinedChanges( aNewEntries, aDeleteEntries ); + iter->second->MakeCombinedChanges( aNewEntries, aDeleteEntries ); } else if(CreateLanguageFile( aLanguageTag )) { - return m_pLangTable->find( aLanguageTag )->second->MakeCombinedChanges( aNewEntries, aDeleteEntries ); + m_pLangTable->find( aLanguageTag )->second->MakeCombinedChanges( aNewEntries, aDeleteEntries ); } - return false; - } // - return the replacement text (only for SWG-Format, all other diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 0643fd742a6d..fac21c1a78e2 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1334,7 +1334,7 @@ size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex ) return ActualIndex; } -OutlinerView* Outliner::RemoveView( OutlinerView* pView ) +void Outliner::RemoveView( OutlinerView* pView ) { for ( ViewList::iterator it = aViewList.begin(); it != aViewList.end(); ++it ) @@ -1347,7 +1347,6 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView ) break; } } - return nullptr; // return superfluous } OutlinerView* Outliner::RemoveView( size_t nIndex ) diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 782d0e2d9c14..9de935e268e1 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -576,10 +576,9 @@ void OutlinerView::Indent( short nDiff ) pOwner->UndoActionEnd( OLUNDO_DEPTH ); } -bool OutlinerView::AdjustHeight( long nDY ) +void OutlinerView::AdjustHeight( long nDY ) { pEditView->MoveParagraphs( nDY ); - return true; // remove return value... } Rectangle OutlinerView::GetVisArea() const @@ -1275,9 +1274,9 @@ OUString OutlinerView::GetSelected() const return pEditView->GetSelected(); } -EESpellState OutlinerView::StartSpeller( bool bMultiDoc ) +void OutlinerView::StartSpeller( bool bMultiDoc ) { - return pEditView->StartSpeller( bMultiDoc ); + pEditView->StartSpeller( bMultiDoc ); } EESpellState OutlinerView::StartThesaurus() |