summaryrefslogtreecommitdiff
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
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)
-rwxr-xr-xcompilerplugins/clang/unusedmethods.py47
-rw-r--r--editeng/qa/unit/core-test.cxx3
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx3
-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
-rw-r--r--editeng/source/items/numitem.cxx14
-rw-r--r--editeng/source/misc/splwrap.cxx3
-rw-r--r--editeng/source/misc/svxacorr.cxx13
-rw-r--r--editeng/source/outliner/outliner.cxx3
-rw-r--r--editeng/source/outliner/outlvw.cxx7
-rw-r--r--include/editeng/AccessibleEditableTextPara.hxx2
-rw-r--r--include/editeng/editeng.hxx10
-rw-r--r--include/editeng/editobj.hxx2
-rw-r--r--include/editeng/editview.hxx2
-rw-r--r--include/editeng/numitem.hxx6
-rw-r--r--include/editeng/outliner.hxx6
-rw-r--r--include/editeng/outlobj.hxx1
-rw-r--r--include/editeng/splwrap.hxx2
-rw-r--r--include/editeng/svxacorr.hxx10
-rw-r--r--include/editeng/tstpitem.hxx2
-rw-r--r--sw/source/core/edit/acorrect.cxx3
-rw-r--r--sw/source/core/inc/acorrect.hxx2
-rw-r--r--sw/source/uibase/inc/hyp.hxx2
-rw-r--r--sw/source/uibase/lingu/hyp.cxx4
27 files changed, 83 insertions, 105 deletions
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py
index 0c2cdff7f640..392ef7f66c54 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -137,42 +137,49 @@ for k, definitions in sourceLocationToDefinitionMap.iteritems():
if len(definitions) > 1:
for d in definitions:
definitionSet.remove(d)
-
-tmp1set = set()
-for d in definitionSet:
+
+def isOtherConstness( d, callSet ):
clazz = d[0] + " " + d[1]
- if clazz in exclusionSet:
- continue
- if d in callSet:
- continue
- # ignore operators, they are normally called from inside STL code
- if "::operator" in d[1]:
- continue
- # ignore the custom RTTI stuff
- if ( ("::CreateType()" in d[1])
- or ("::IsA(" in d[1])
- or ("::Type()" in d[1])):
- continue
# if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone
if d[0].startswith("const ") and d[1].endswith(" const"):
if ((d[0][6:],d[1][:-6]) in callSet):
- continue
+ return True
elif clazz.endswith(" const"):
clazz2 = clazz[:len(clazz)-6] # strip off " const"
if ((d[0],clazz2) in callSet):
- continue
+ return True
if clazz.endswith(" const") and ("::iterator" in clazz):
clazz2 = clazz[:len(clazz)-6] # strip off " const"
clazz2 = clazz2.replace("::const_iterator", "::iterator")
if ((d[0],clazz2) in callSet):
- continue
+ return True
# if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone
if (not clazz.endswith(" const")) and ((d[0],"const " + clazz + " const") in callSet):
- continue
+ return True
if (not clazz.endswith(" const")) and ("::iterator" in clazz):
clazz2 = clazz.replace("::iterator", "::const_iterator") + " const"
if ((d[0],clazz2) in callSet):
- continue
+ return True
+ return False
+
+
+tmp1set = set()
+for d in definitionSet:
+ clazz = d[0] + " " + d[1]
+ if clazz in exclusionSet:
+ continue
+ if d in callSet:
+ continue
+ # ignore operators, they are normally called from inside STL code
+ if "::operator" in d[1]:
+ continue
+ # ignore the custom RTTI stuff
+ if ( ("::CreateType()" in d[1])
+ or ("::IsA(" in d[1])
+ or ("::Type()" in d[1])):
+ continue
+ if isOtherConstness(d, callSet):
+ continue
# just ignore iterators, they normally occur in pairs, and we typically want to leave one constness version alone
# alone if the other one is in use.
if d[1] == "begin() const" or d[1] == "begin()" or d[1] == "end()" or d[1] == "end() const":
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 eac046e8d002..b73b6bb3b629 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1674,7 +1674,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();
@@ -1737,7 +1737,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 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;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 31a17578ef29..016e9593ea0d 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++)
@@ -860,9 +857,8 @@ OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum ) const
}
// 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));
@@ -879,14 +875,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 364116ef9949..04c5733415d5 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -260,9 +260,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 e2731d71ebac..9d6739a1d51e 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1205,8 +1205,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 )
{
@@ -1417,8 +1416,6 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
}
} while( false );
-
- return nRet;
}
SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList(
@@ -1607,7 +1604,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 )
{
@@ -1615,14 +1612,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 94d2b1e6b838..2c9a898479a6 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1309,7 +1309,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 )
@@ -1322,7 +1322,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 c6bc75483200..1266830dc015 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -575,10 +575,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
@@ -1270,9 +1269,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()
diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx
index 0d1b8e493129..8ac3bd69ac36 100644
--- a/include/editeng/AccessibleEditableTextPara.hxx
+++ b/include/editeng/AccessibleEditableTextPara.hxx
@@ -344,7 +344,7 @@ namespace accessibility
void _correctValues( const sal_Int32 nIndex, css::uno::Sequence< css::beans::PropertyValue >& rValues );
sal_Int32 SkipField(sal_Int32 nIndex, bool bForward);
// get overlapped field, extend return string. Only extend forward for now
- bool ExtendByField( css::accessibility::TextSegment& Segment );
+ void ExtendByField( css::accessibility::TextSegment& Segment );
OUString GetFieldTypeNameAtIndex(sal_Int32 nIndex);
// the paragraph index in the edit engine (guarded by solar mutex)
sal_Int32 mnParagraphIndex;
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index dd08c25c5665..fd6dc7784636 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -228,7 +228,7 @@ public:
void InsertView(EditView* pEditView, size_t nIndex = EE_APPEND);
EditView* RemoveView( EditView* pEditView );
- EditView* RemoveView(size_t nIndex = EE_APPEND);
+ void RemoveView(size_t nIndex = EE_APPEND);
EditView* GetView(size_t nIndex = 0) const;
size_t GetViewCount() const;
bool HasView( EditView* pView ) const;
@@ -369,7 +369,7 @@ public:
// sal_uInt32: Error code of the stream.
sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
- sal_uLong Write( SvStream& rOutput, EETextFormat );
+ void Write( SvStream& rOutput, EETextFormat );
void SetStatusEventHdl( const Link<EditStatus&,void>& rLink );
Link<EditStatus&,void> GetStatusEventHdl() const;
@@ -587,7 +587,7 @@ public:
EditPaM SplitContent(sal_Int32 nNode, sal_Int32 nSepPos);
EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward);
- EditPaM InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
+ void InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
EditSelection MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos, EditView* pCurView);
@@ -600,8 +600,8 @@ public:
void SetUndoMode(bool b);
void FormatAndUpdate(EditView* pCurView = nullptr);
- bool Undo(EditView* pView);
- bool Redo(EditView* pView);
+ void Undo(EditView* pView);
+ void Redo(EditView* pView);
sal_Int32 GetOverflowingParaNum() const;
sal_Int32 GetOverflowingLineNum() const;
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index 1b709d4c3294..2206cc9ded85 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -98,7 +98,7 @@ public:
EditTextObject* Clone() const;
- bool Store( SvStream& rOStream ) const;
+ void Store( SvStream& rOStream ) const;
static EditTextObject* Create( SvStream& rIStream );
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 1dc7f87c1d4c..514e22a5145c 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -122,7 +122,7 @@ public:
bool HasSelection() const;
ESelection GetSelection() const;
void SetSelection( const ESelection& rNewSel );
- bool SelectCurrentWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
+ void SelectCurrentWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
/// Returns the rectangles of the current selection in TWIPs.
void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const;
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 741978b70580..b6a21858a582 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -148,7 +148,7 @@ public:
virtual ~SvxNumberFormat();
- SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter);
+ void Store(SvStream &rStream, FontToSubsFontConverter pConverter);
SvxNumberFormat& operator=( const SvxNumberFormat& );
bool operator==( const SvxNumberFormat& ) const;
@@ -265,7 +265,7 @@ public:
SvxNumRule& operator=( const SvxNumRule& );
- SvStream& Store(SvStream &rStream);
+ void Store(SvStream &rStream);
const SvxNumberFormat* Get(sal_uInt16 nLevel)const;
const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const;
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, bool bIsValid = true);
@@ -286,7 +286,7 @@ public:
SvxNumRuleType GetNumRuleType() const { return eNumberingType; }
- bool UnLinkGraphics();
+ void UnLinkGraphics();
};
class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 50dafd4b7178..6be06181ddf9 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -260,7 +260,7 @@ public:
void Indent( short nDiff );
void AdjustDepth( short nDX ); // Later replace with Indent!
- bool AdjustHeight( long nDY );
+ void AdjustHeight( long nDY );
sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, bool bSelect = false, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
@@ -298,7 +298,7 @@ public:
Pointer GetPointer( const Point& rPosPixel );
void Command( const CommandEvent& rCEvt );
- EESpellState StartSpeller( bool bMultipleDoc = false );
+ void StartSpeller( bool bMultipleDoc = false );
EESpellState StartThesaurus();
sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
@@ -709,7 +709,7 @@ public:
void SetAddExtLeading( bool b );
size_t InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) );
- OutlinerView* RemoveView( OutlinerView* pView );
+ void RemoveView( OutlinerView* pView );
OutlinerView* RemoveView( size_t nIndex );
OutlinerView* GetView( size_t nIndex ) const;
size_t GetViewCount() const;
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx
index eac443bdd92a..f4d9c6a51a65 100644
--- a/include/editeng/outlobj.hxx
+++ b/include/editeng/outlobj.hxx
@@ -69,7 +69,6 @@ public:
// compare operator
bool operator==(const OutlinerParaObject& rCandidate) const;
- bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); }
// #i102062#
bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index 82b6a32f411a..aeace0c04d20 100644
--- a/include/editeng/splwrap.hxx
+++ b/include/editeng/splwrap.hxx
@@ -106,7 +106,7 @@ protected:
virtual bool SpellMore(); // examine further documents?
virtual bool HasOtherCnt(); // Are there any special areas?
virtual void SpellStart( SvxSpellArea eSpell ); // Preparing the area
- virtual bool SpellContinue(); // Check Areas
+ virtual void SpellContinue(); // Check Areas
// Result available through GetLast
virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list
static css::uno::Reference< css::linguistic2::XDictionary >
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 96ff2764d27b..15558a490be8 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -87,7 +87,7 @@ public:
virtual bool Replace( sal_Int32 nPos, const OUString& rTxt ) = 0;
virtual bool ReplaceRange( sal_Int32 nPos, sal_Int32 nLen, const OUString& rTxt ) = 0;
- virtual bool SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
+ virtual void SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
SfxPoolItem& ) = 0;
virtual bool SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString& rURL ) = 0;
@@ -279,7 +279,7 @@ public:
// FIXME: this has the horrible flaw that the rTxt must be a reference
// to the actual SwTxtNode/EditNode string because it inserts the character
// in rDoc and expects that to side-effect rTxt
- sal_uLong DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
+ void DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
sal_Int32 nPos, sal_Unicode cInsChar, bool bInsert, vcl::Window* pFrameWin = nullptr );
// Return for the autotext expansion the previous word,
@@ -339,11 +339,11 @@ public:
// - pure Text
bool PutText( const OUString& rShort, const OUString& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
// - Text with attribution (only in the SWG - SWG format!)
- bool PutText( const OUString& rShort, SfxObjectShell& rShell,
+ void PutText( const OUString& rShort, SfxObjectShell& rShell,
LanguageType eLang = LANGUAGE_SYSTEM )
- { return _GetLanguageList( eLang ).PutText(rShort, rShell ); }
+ { _GetLanguageList( eLang ).PutText(rShort, rShell ); }
- bool MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries,
+ void MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries,
std::vector<SvxAutocorrWord>& aDeleteEntries,
LanguageType eLang = LANGUAGE_SYSTEM );
diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx
index 3d3c114f7a61..14dc78a551fa 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -72,8 +72,6 @@ public:
}
// For the SortedArray:
- bool operator==( const SvxTabStop& rTS ) const
- { return nTabPos == rTS.nTabPos; }
bool operator <( const SvxTabStop& rTS ) const
{ return nTabPos < rTS.nTabPos; }
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index e84ddf3d3174..ef4efb130f65 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -229,7 +229,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const
return true;
}
-bool SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
+void SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
SfxPoolItem& rItem )
{
const SwNodeIndex& rNd = rCursor.GetPoint()->nNode;
@@ -249,7 +249,6 @@ bool SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
if( bUndoIdInitialized )
bUndoIdInitialized = true;
}
- return 0 != nWhich;
}
bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString& rURL )
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index b04df8c49917..50bc87ca43c0 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -62,7 +62,7 @@ public:
virtual bool Replace( sal_Int32 nPos, const OUString& rText ) override;
virtual bool ReplaceRange( sal_Int32 nPos, sal_Int32 nLen, const OUString& rText ) override;
- virtual bool SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId,
+ 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;
diff --git a/sw/source/uibase/inc/hyp.hxx b/sw/source/uibase/inc/hyp.hxx
index 258c39693237..8a621ba0bd3b 100644
--- a/sw/source/uibase/inc/hyp.hxx
+++ b/sw/source/uibase/inc/hyp.hxx
@@ -38,7 +38,7 @@ private:
protected:
virtual void SpellStart( SvxSpellArea eSpell ) override;
- virtual bool SpellContinue() override;
+ virtual void SpellContinue() override;
virtual void SpellEnd( ) override;
virtual bool SpellMore() override;
virtual void InsertHyphen( const sal_Int32 nPos ) override; // insert hyphen
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index aee0bcfd5ff9..f5738f86737b 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -69,7 +69,7 @@ void SwHyphWrapper::SpellStart( SvxSpellArea eSpell )
pView->HyphStart( eSpell );
}
-bool SwHyphWrapper::SpellContinue()
+void SwHyphWrapper::SpellContinue()
{
// for automatic separation, make actions visible only at the end
std::unique_ptr<SwWait> pWait;
@@ -90,8 +90,6 @@ bool SwHyphWrapper::SpellContinue()
PSH->EndAllAction();
pWait.reset();
}
-
- return GetLast().is();
}
void SwHyphWrapper::SpellEnd()