diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-20 16:36:19 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-21 07:18:38 +0000 |
commit | 90d892664a6c49a8ae25a72ddccf54dba9d0e429 (patch) | |
tree | d9bb4a7307e349b88a4d528854abb44e4323f563 /sw | |
parent | ea6fdbaeeb51ad695f1c3754b796b7273eb4baad (diff) |
loplugin: unused return values
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7
Reviewed-on: https://gerrit.libreoffice.org/21628
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
40 files changed, 59 insertions, 103 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index c54712abc765..8b0af90c35b6 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -352,9 +352,6 @@ public: SvNumberFormatter* pNFormatr, long nLanguage ); - static sal_Int32 GetRowCount(css::uno::Reference< css::sdbc::XConnection> xConnection, - const OUString& rTableName); - sal_uLong GetColumnFormat( const OUString& rDBName, const OUString& rTableName, const OUString& rColNm, @@ -389,8 +386,8 @@ public: css::uno::Reference< css::sdbc::XConnection> RegisterConnection(OUString const& rSource); - const SwDSParam* CreateDSData(const SwDBData& rData) - {return FindDSData(rData, true);} + void CreateDSData(const SwDBData& rData) + { FindDSData(rData, true); } const SwDSParams_t& GetDSParamArray() const { return m_DataSourceParams; } /// close all data sources - after fields were updated diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index c752fa385526..d6c5c08f3c07 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -960,7 +960,7 @@ public: const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr, bool bExpand = false ); - const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, + void InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr ); static SwTOXBase* GetCurTOX( const SwPosition& rPos ); @@ -1523,7 +1523,7 @@ public: // Interface for the list of Ruby - texts/attributes static sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList, sal_uInt16 nMode ); - sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList, + void SetRubyList( const SwPaM& rPam, const SwRubyList& rList, sal_uInt16 nMode ); void ReadLayoutCache( SvStream& rStream ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 6a48ab001d9b..d12f6172e6f7 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -415,7 +415,7 @@ public: void DeleteTOXMark(SwTOXMark* pMark); /// Get all marks at current SPoint. - sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ; + void GetCurTOXMarks(SwTOXMarks& rMarks) const ; /// Insert content table. Renew if required. void InsertTableOf(const SwTOXBase& rTOX, @@ -926,7 +926,7 @@ public: bool IsLabelDoc() const; /// Interface for TextInputData - (for input of Japanese/Chinese chars.) - SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage); + void CreateExtTextInput(LanguageType eInputLanguage); OUString DeleteExtTextInput( SwExtTextInput* pDel = nullptr, bool bInsText = true); void SetExtTextInputData( const CommandExtTextInputData& ); diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index b2dbe78d15d8..5263bac5e25f 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -175,7 +175,7 @@ public: /// Overlay, because set-field takes care for its being updated by itself. inline OUString GetSetRefName() const; - sal_uInt16 SetSeqRefNo( SwSetExpField& rField ); + void SetSeqRefNo( SwSetExpField& rField ); size_t GetSeqFieldList( SwSeqFieldList& rList ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index e17cab3c8a75..3ee18574b0c8 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -341,7 +341,7 @@ public: long BeginDrag( const Point *pPt, bool bProp ); long Drag ( const Point *pPt, bool bProp ); - long EndDrag ( const Point *pPt, bool bProp ); + void EndDrag ( const Point *pPt, bool bProp ); void BreakDrag(); /// Methods for status line. diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index c603430c2e26..c5da3964d0b5 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -355,7 +355,7 @@ public: virtual SwContentFrame *MakeFrame( SwFrame* ) override; virtual SwContentNode *SplitContentNode( const SwPosition & ) override; virtual SwContentNode *JoinNext() override; - virtual SwContentNode *JoinPrev() override; + virtual void JoinPrev() override; SwContentNode *AppendNode( const SwPosition & ); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index d1ef7366d0f4..fbb4b36f9e46 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -387,7 +387,7 @@ public: virtual SwContentNode *SplitContentNode(const SwPosition & ) = 0; virtual SwContentNode *JoinNext(); - virtual SwContentNode *JoinPrev(); + virtual void JoinPrev(); /** Is it possible to join two nodes? In pIdx the second position can be returned. */ bool CanJoinNext( SwNodeIndex* pIdx =nullptr ) const; diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 01d32fb21bd1..295aaf5d804b 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -282,7 +282,7 @@ public: @param bPointFirst true: If the point is behind the mark then swap. false: If the mark is behind the point then swap. */ - SwPaM & Normalize(bool bPointFirst = true); + void Normalize(bool bPointFirst = true); /// @return the document (SwDoc) at which the PaM is registered SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); } diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index cd05f4eb91ce..fc7c612d1b63 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -313,7 +313,7 @@ public: OUString GetLongName( sal_uInt16 ) const; // Get long name for index. bool Delete( sal_uInt16 ); - sal_uInt16 Rename( sal_uInt16, const OUString*, const OUString* ); + void Rename( sal_uInt16, const OUString*, const OUString* ); sal_uLong CopyBlock( SwTextBlocks& rSource, OUString& rSrcShort, const OUString& rLong ); diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 541df563bcc8..13d1e15d1df8 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -431,12 +431,12 @@ public: virtual bool GetInfo( SfxPoolItem& rInfo ) const override; // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc. - // If not, so create it an copy all other used things. The return is this - SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& ); + // If not, so create it an copy all other used things. + void CopyTOXBase( SwDoc*, const SwTOXBase& ); const SwTOXType* GetTOXType() const; - sal_uInt16 GetCreateType() const; // creation types + sal_uInt16 GetCreateType() const; // creation types OUString GetTOXName() const {return m_aName;} void SetTOXName(const OUString& rSet) {m_aName = rSet;} diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index daf1bb163bb0..ea72481a8f98 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -58,7 +58,7 @@ public: void CheckCondColl(); // For references to footnotes. - sal_uInt16 SetSeqRefNo(); + void SetSeqRefNo(); void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; } // For Readers. sal_uInt16 GetSeqRefNo() const { return m_nSeqNo; } diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index e9dcca02605b..7081637f0536 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -285,7 +285,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE long PhyPageUp(); SAL_DLLPRIVATE long PhyPageDown(); - SAL_DLLPRIVATE int _CreateScrollbar( bool bHori ); + SAL_DLLPRIVATE void _CreateScrollbar( bool bHori ); DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar*, void ); SAL_DLLPRIVATE bool UpdateScrollbars(); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 7069de10e2cf..afdd0608cd4f 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -370,7 +370,7 @@ public: vcl::RenderContext& rRenderContext, const Rectangle& rRect ); // Fill temporary doc with selected text for Print or PDF export. - SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); + void FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); // Called internally for Shell. Formats pages. void CalcPagesForPrint( sal_uInt16 nMax ); diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 65b347c6be11..ef74593df1ae 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -529,7 +529,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg ) return pPam; } -SwPaM & SwPaM::Normalize(bool bPointFirst) +void SwPaM::Normalize(bool bPointFirst) { if (HasMark()) if ( ( bPointFirst && *m_pPoint > *m_pMark) || @@ -537,7 +537,6 @@ SwPaM & SwPaM::Normalize(bool bPointFirst) { Exchange(); } - return *this; } /// return page number at cursor (for reader and page bound frames) diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 0bb6e4ad18b7..d90cfd6281e0 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -90,7 +90,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, return rList.size(); } -sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, +void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, sal_uInt16 nMode ) { GetIDocumentUndoRedo().StartUndo( UNDO_SETRUBYATTR, nullptr ); @@ -175,8 +175,6 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor ); GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, nullptr ); - - return nListEntry; } bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt16 ) diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index afc95d7fb8a4..98859a809dfb 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -370,18 +370,18 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, return pNewSection; } -const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, +void SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, const SwTOXBase& rTOX, const SfxItemSet* pSet ) { - // check for recursiv TOX + // check for recursive TOX SwNode* pNd = GetNodes()[ nSttNd ]; SwSectionNode* pSectNd = pNd->FindSectionNode(); while( pSectNd ) { SectionType eT = pSectNd->GetSection().GetType(); if( TOX_HEADER_SECTION == eT || TOX_CONTENT_SECTION == eT ) - return nullptr; + return; pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode(); } @@ -399,14 +399,13 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd if (!pNewSectionNode) { DelSectionFormat( pFormat ); - return nullptr; + return; } SwTOXBaseSection *const pNewSection( dynamic_cast<SwTOXBaseSection*>(& pNewSectionNode->GetSection())); if (pNewSection) pNewSection->SetTOXName(sSectNm); // rTOX may have had no name... - return pNewSection; } /// Get current table of contents diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 6b348575c743..544ee124962a 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1385,9 +1385,8 @@ SwContentNode *SwContentNode::JoinNext() return this; } -SwContentNode *SwContentNode::JoinPrev() +void SwContentNode::JoinPrev() { - return this; } /// Get info from Modify diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 3336422bb73b..1c8e0d60c45c 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -934,12 +934,11 @@ void SwEditShell::SetLinkUpdMode( sal_uInt16 nMode ) } // Interface for TextInputData - (for text input of japanese/chinese characters) -SwExtTextInput* SwEditShell::CreateExtTextInput(LanguageType eInputLanguage) +void SwEditShell::CreateExtTextInput(LanguageType eInputLanguage) { SwExtTextInput* pRet = GetDoc()->CreateExtTextInput( *GetCursor() ); pRet->SetLanguage(eInputLanguage); pRet->SetOverwriteCursor( SwCursorShell::IsOverwriteCursor() ); - return pRet; } OUString SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, bool bInsText ) diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 3935c67853cd..36af137ef033 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -90,9 +90,9 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark ) } /// Collect all listing markers -sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const +void SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const { - return SwDoc::GetCurTOXMark( *GetCursor()->Start(), rMarks ); + SwDoc::GetCurTOXMark( *GetCursor()->Start(), rMarks ); } bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 973ad932586b..2718e4a4c366 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -532,10 +532,10 @@ sal_uLong SwSetExpFieldType::GetSeqFormat() return pField->GetFormat(); } -sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField ) +void SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField ) { if( !HasWriterListeners() || !(nsSwGetSetExpType::GSE_SEQ & nType) ) - return USHRT_MAX; + return; std::vector<sal_uInt16> aArr; @@ -563,7 +563,7 @@ sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField ) break; if( n == aArr.size() || aArr[ n ] > nNum ) - return nNum; // no -> use it + return; // no -> use it } // flagged all numbers, so determine the right number @@ -578,7 +578,6 @@ sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField ) } rField.SetSeqNumber( n ); - return n; } size_t SwSetExpFieldType::GetSeqFieldList( SwSeqFieldList& rList ) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 20e373aaba00..8de3667befb5 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -684,7 +684,7 @@ long SwFEShell::Drag( const Point *pPt, bool ) return 0; } -long SwFEShell::EndDrag( const Point *, bool ) +void SwFEShell::EndDrag( const Point *, bool ) { OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" ); SdrView *pView = Imp()->GetDrawView(); @@ -721,10 +721,7 @@ long SwFEShell::EndDrag( const Point *, bool ) GetDoc()->getIDocumentState().SetModified(); ::FrameNotify( this ); - - return 1; } - return 0; } void SwFEShell::BreakDrag() diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx index 53509ab8c53e..6c1d368dd1fd 100644 --- a/sw/source/core/inc/SwXMLBlockExport.hxx +++ b/sw/source/core/inc/SwXMLBlockExport.hxx @@ -57,7 +57,7 @@ public: virtual ~SwXMLTextBlockExport() {} sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum /*eClass*/) override {return 0;} - sal_uInt32 exportDoc(const OUString & rText); + void exportDoc(const OUString & rText); void _ExportAutoStyles() override {} void _ExportMasterStyles () override {} void _ExportContent() override {} diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 8c984def8720..60ac54efcbdf 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -401,10 +401,10 @@ public: void Current( const SdrObject *pNew ) { m_pCurrent = pNew; } const SdrObject *operator()() const { return m_pCurrent; } - const SdrObject *Top(); + void Top(); const SdrObject *Bottom(); const SdrObject *Next(); - const SdrObject *Prev(); + void Prev(); }; class StackHack diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index d6f467558c87..2cc44b208d6a 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -298,12 +298,11 @@ public: } /** retrieves kashida opportunities for a given text range. - returns the number of kashida positions in the given text range pKashidaPositions: buffer to receive the char indices of the kashida opportunties relative to the paragraph */ - sal_Int32 GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen, + void GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen, sal_Int32* pKashidaPosition); /** Use regular blank justification instead of kashdida justification for the given line of text. diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index d662ac83717b..09e1b38fe98b 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -307,7 +307,7 @@ public: bool& bRight, bool bInsertCursor ); /// Methods to manage the FollowFrame - SwContentFrame *SplitFrame( const sal_Int32 nTextPos ); + void SplitFrame( const sal_Int32 nTextPos ); SwContentFrame *JoinFrame(); inline sal_Int32 GetOfst() const { return mnOffset; } void _SetOfst( const sal_Int32 nNewOfst ); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 6f8d05c390ac..100efd736dc9 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2232,7 +2232,7 @@ SwOrderIter::SwOrderIter( const SwPageFrame *pPg, bool bFlys ) : { } -const SdrObject *SwOrderIter::Top() +void SwOrderIter::Top() { m_pCurrent = nullptr; if ( m_pPage->GetSortedObjs() ) @@ -2256,7 +2256,6 @@ const SdrObject *SwOrderIter::Top() } } } - return m_pCurrent; } const SdrObject *SwOrderIter::Bottom() @@ -2314,7 +2313,7 @@ const SdrObject *SwOrderIter::Next() return m_pCurrent; } -const SdrObject *SwOrderIter::Prev() +void SwOrderIter::Prev() { const sal_uInt32 nCurOrd = m_pCurrent ? m_pCurrent->GetOrdNumDirect() : 0; m_pCurrent = nullptr; @@ -2339,7 +2338,6 @@ const SdrObject *SwOrderIter::Prev() } } } - return m_pCurrent; } /// Keep and restore the substructure of a layout frame for an action. diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx index b2ee9e05b788..4ba7d8bdcf94 100644 --- a/sw/source/core/swg/SwXMLBlockExport.cxx +++ b/sw/source/core/swg/SwXMLBlockExport.cxx @@ -95,7 +95,7 @@ SwXMLTextBlockExport::SwXMLTextBlockExport( XML_NAMESPACE_TEXT ); } -sal_uInt32 SwXMLTextBlockExport::exportDoc(const OUString &rText) +void SwXMLTextBlockExport::exportDoc(const OUString &rText) { GetDocHandler()->startDocument(); @@ -130,7 +130,6 @@ sal_uInt32 SwXMLTextBlockExport::exportDoc(const OUString &rText) } } GetDocHandler()->endDocument(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 279b2f4d70f9..316b308749d4 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -329,7 +329,7 @@ bool SwTextBlocks::Delete( sal_uInt16 n ) return false; } -sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) +void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) { sal_uInt16 nIdx = USHRT_MAX; if( pImp && !pImp->bInPutMuchBlocks ) @@ -345,7 +345,7 @@ sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString { OSL_ENSURE( false, "No short name provided in the rename" ); nErr = ERR_SWG_INTERNAL_ERROR; - return USHRT_MAX; + return; } if( pImp->IsFileChanged() ) @@ -369,7 +369,6 @@ sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString if( !nErr ) nIdx = pImp->GetIndex( aNew ); } - return nIdx; } sal_uLong SwTextBlocks::CopyBlock( SwTextBlocks& rSource, OUString& rSrcShort, diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 3f1fb82704c2..7ba5c3500f56 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -663,7 +663,7 @@ SwContentFrame *SwTextFrame::JoinFrame() return pNxt; } -SwContentFrame *SwTextFrame::SplitFrame( const sal_Int32 nTextPos ) +void SwTextFrame::SplitFrame( const sal_Int32 nTextPos ) { SwSwapIfSwapped swap( this ); @@ -737,8 +737,6 @@ SwContentFrame *SwTextFrame::SplitFrame( const sal_Int32 nTextPos ) // No SetOfst or CalcFollow, because an AdjustFollow follows immediately anyways pNew->ManipOfst( nTextPos ); - - return pNew; } void SwTextFrame::_SetOfst( const sal_Int32 nNewOfst ) diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index 479114c25381..c36f3860d723 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -290,13 +290,12 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, return nOfst; } -const SwLineLayout *SwTextIter::TwipsToLine( const SwTwips y) +void SwTextIter::TwipsToLine( const SwTwips y) { while( m_nY + GetLineHeight() <= y && Next() ) ; while( m_nY > y && Prev() ) ; - return m_pCurr; } // Local helper function to check, if pCurr needs a field rest portion: diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx index 42e901894da7..dce06ef80d78 100644 --- a/sw/source/core/text/itrtxt.hxx +++ b/sw/source/core/text/itrtxt.hxx @@ -109,7 +109,7 @@ public: const SwLineLayout *GetPrevLine(); void CharToLine( const sal_Int32 ); - const SwLineLayout *TwipsToLine(const SwTwips); + void TwipsToLine(const SwTwips); // Truncates all after pCurr void TruncLines( bool bNoteFollow = false ); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 06a30aa41b31..362bbafc7581 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1815,7 +1815,7 @@ void SwScriptInfo::MarkKashidaInvalid(sal_Int32 nKashPos) } // retrieve the kashida positions in the given text range -sal_Int32 SwScriptInfo::GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen, +void SwScriptInfo::GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen, sal_Int32* pKashidaPosition) { size_t nCntKash = 0; @@ -1836,7 +1836,6 @@ sal_Int32 SwScriptInfo::GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen, pKashidaPosition [ nCntKashEnd - nCntKash ] = GetKashida ( nCntKashEnd ); nCntKashEnd++; } - return nCntKashEnd - nCntKash; } void SwScriptInfo::SetNoKashidaLine(sal_Int32 nStt, sal_Int32 nLen) diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 68066b783ba5..1acfb02eeb6a 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -455,7 +455,7 @@ void SwTOXBase::RegisterToTOXType( SwTOXType& rType ) rType.Add( this ); } -SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource ) +void SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource ) { maMSTOCExpression = rSource.maMSTOCExpression; SwTOXType* pType = const_cast<SwTOXType*>(rSource.GetTOXType()); @@ -507,8 +507,6 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource ) m_aName = rSource.GetTOXName(); else m_aName = pDoc->GetUniqueTOXBaseName( *pType, rSource.GetTOXName() ); - - return *this; } // TOX specific functions diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 3bbf8720c5aa..455ac7254334 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -497,23 +497,23 @@ void SwTextFootnote::DelFrames( const SwFrame* pSib ) /// Set the sequence number for the current footnote. /// @returns The new sequence number or USHRT_MAX if invalid. -sal_uInt16 SwTextFootnote::SetSeqRefNo() +void SwTextFootnote::SetSeqRefNo() { if( !m_pTextNode ) - return USHRT_MAX; + return; SwDoc* pDoc = m_pTextNode->GetDoc(); if( pDoc->IsInReading() ) - return USHRT_MAX; + return; std::set<sal_uInt16> aUsedNums; std::vector<SwTextFootnote*> badRefNums; ::lcl_FillUsedFootnoteRefNumbers(*pDoc, this, aUsedNums, badRefNums); if ( ::lcl_IsRefNumAvailable(aUsedNums, m_nSeqNo) ) - return m_nSeqNo; + return; std::vector<sal_uInt16> unused; ::lcl_FillUnusedSeqRefNums(unused, aUsedNums, 1); - return m_nSeqNo = unused[0]; + m_nSeqNo = unused[0]; } /// Set a unique sequential reference number for every footnote in the document. diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 85a83660f4b5..6cb302d71cf7 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -725,7 +725,7 @@ SwContentNode *SwTextNode::JoinNext() return this; } -SwContentNode *SwTextNode::JoinPrev() +void SwTextNode::JoinPrev() { SwNodes& rNds = GetNodes(); SwNodeIndex aIdx( *this ); @@ -815,8 +815,6 @@ SwContentNode *SwTextNode::JoinPrev() else { OSL_FAIL( "kein TextNode." ); } - - return this; } // erzeugt einen AttrSet mit Bereichen fuer Frame-/Para/Char-Attributen diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 9945b48d2881..1318dc48c5c1 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -322,7 +322,7 @@ void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax ) pMyLayout->EndAllAction(); } -SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) +void SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) { OSL_ENSURE( dynamic_cast<const SwFEShell*>( this) != nullptr,"SwViewShell::Prt for FEShell only"); SwFEShell* pFESh = static_cast<SwFEShell*>(this); @@ -422,7 +422,6 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) } } } - return pPrtDoc; } // TODO: there is already a GetPageByPageNum, but it checks some physical page diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 19bb42dcd26d..b09fcfd250aa 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -206,7 +206,7 @@ public: } const uno::Reference< XMultiServiceFactory >& GetServiceFactory(); - const uno::Reference< drawing::XDrawPage >& GetDrawPage(); + void GetDrawPage(); const uno::Reference< drawing::XShapes >& GetShapes(); const uno::Reference< script::XEventAttacherManager >& GetControlEventManager(); const uno::Reference< script::XEventAttacherManager >& GetFormEventManager(); @@ -276,7 +276,7 @@ const uno::Reference< XMultiServiceFactory >& SwHTMLForm_Impl::GetServiceFactory return xServiceFactory; } -const uno::Reference< drawing::XDrawPage >& SwHTMLForm_Impl::GetDrawPage() +void SwHTMLForm_Impl::GetDrawPage() { if( !xDrawPage.is() && pDocSh ) { @@ -287,7 +287,6 @@ const uno::Reference< drawing::XDrawPage >& SwHTMLForm_Impl::GetDrawPage() xDrawPage = xTextDoc->getDrawPage(); OSL_ENSURE( xDrawPage.is(), "drawing::XDrawPage nicht erhalten" ); } - return xDrawPage; } const uno::Reference< container::XIndexContainer >& SwHTMLForm_Impl::GetForms() diff --git a/sw/source/filter/html/htmlnum.hxx b/sw/source/filter/html/htmlnum.hxx index 6ef008b2dd0d..944a9e2ac510 100644 --- a/sw/source/filter/html/htmlnum.hxx +++ b/sw/source/filter/html/htmlnum.hxx @@ -71,8 +71,8 @@ public: void SetDepth( sal_uInt16 nDepth ) { nDeep = nDepth; } sal_uInt16 GetDepth() const { return nDeep; } - sal_uInt16 IncDepth() { return ++nDeep; } - sal_uInt16 DecDepth() { return nDeep==0 ? 0 : --nDeep; } + void IncDepth() { ++nDeep; } + void DecDepth() { if (nDeep!=0) --nDeep; } inline sal_uInt8 GetLevel() const; bool IsRestart() const { return bRestart; } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index b4632ba4ae1e..f3f1b6ce6c33 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -757,20 +757,6 @@ void SwDBManager::GetColumnNames(ListBox* pListBox, } -sal_Int32 SwDBManager::GetRowCount(uno::Reference<sdbc::XConnection> xConnection, - const OUString& rTableName) -{ - uno::Reference<beans::XPropertySet> xRow = GetRowSupplier(xConnection, rTableName, SwDBSelect::UNKNOWN); - sal_Int32 nCnt = 0; - - if(xRow.is()) - xRow->getPropertyValue( "RowCount" ) >>= nCnt; - - return nCnt; -} - - - SwDBManager::SwDBManager(SwDoc* pDoc) : bCancel(false) , bInitDBFields(false) diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 600ab97a8c56..271fb33fe239 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -280,7 +280,7 @@ IMPL_LINK_TYPED( SwView, WindowChildEventListener, VclWindowEvent&, rEvent, void } } -int SwView::_CreateScrollbar( bool bHori ) +void SwView::_CreateScrollbar( bool bHori ) { vcl::Window *pMDI = &GetViewFrame()->GetWindow(); VclPtr<SwScrollbar>& ppScrollbar = bHori ? m_pHScrollbar : m_pVScrollbar; @@ -302,8 +302,6 @@ int SwView::_CreateScrollbar( bool bHori ) if (!m_bShowAtResize) ppScrollbar->ExtendedShow(); - - return 1; } IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) |