sw/inc/EnhancedPDFExportHelper.hxx | 2 sw/inc/IDocumentContentOperations.hxx | 4 - sw/inc/IDocumentFieldsAccess.hxx | 2 sw/inc/authfld.hxx | 6 - sw/inc/crsrsh.hxx | 16 ++-- sw/inc/dbfld.hxx | 4 - sw/inc/dbmgr.hxx | 2 sw/inc/ddefld.hxx | 4 - sw/inc/doc.hxx | 16 ++-- sw/inc/docary.hxx | 4 - sw/inc/editsh.hxx | 29 +++----- sw/inc/expfld.hxx | 4 - sw/inc/fesh.hxx | 22 +++--- sw/inc/fldbas.hxx | 4 - sw/inc/flddropdown.hxx | 5 - sw/inc/fmtcol.hxx | 2 sw/inc/hhcwrp.hxx | 2 sw/inc/ndtxt.hxx | 2 sw/inc/pagepreviewlayout.hxx | 16 +--- sw/inc/swabstdlg.hxx | 2 sw/inc/swbaslnk.hxx | 2 sw/inc/swtable.hxx | 2 sw/inc/tblafmt.hxx | 4 - sw/inc/txatritr.hxx | 2 sw/inc/unochart.hxx | 2 sw/inc/usrfld.hxx | 4 - sw/source/core/crsr/crsrsh.cxx | 9 +- sw/source/core/crsr/crstrvl.cxx | 13 +-- sw/source/core/crsr/crstrvl1.cxx | 4 - sw/source/core/crsr/trvlcol.cxx | 5 - sw/source/core/crsr/trvlfnfl.cxx | 5 - sw/source/core/doc/DocumentContentOperationsManager.cxx | 7 -- sw/source/core/doc/DocumentFieldsManager.cxx | 4 - sw/source/core/doc/docbasic.cxx | 4 - sw/source/core/doc/docfmt.cxx | 7 -- sw/source/core/doc/docredln.cxx | 8 -- sw/source/core/doc/fmtcol.cxx | 6 - sw/source/core/doc/tblafmt.cxx | 14 +--- sw/source/core/doc/tblrwcl.cxx | 6 - sw/source/core/docnode/ndtbl.cxx | 42 ++++-------- sw/source/core/edit/autofmt.cxx | 3 sw/source/core/edit/edattr.cxx | 4 - sw/source/core/edit/edglbldc.cxx | 16 +--- sw/source/core/edit/editsh.cxx | 3 sw/source/core/edit/ednumber.cxx | 11 +-- sw/source/core/edit/edsect.cxx | 8 -- sw/source/core/edit/edtab.cxx | 6 - sw/source/core/edit/edundo.cxx | 15 +--- sw/source/core/fields/authfld.cxx | 11 +-- sw/source/core/fields/dbfld.cxx | 6 - sw/source/core/fields/ddefld.cxx | 6 - sw/source/core/fields/expfld.cxx | 6 - sw/source/core/fields/fldbas.cxx | 6 - sw/source/core/fields/flddropdown.cxx | 4 - sw/source/core/fields/usrfld.cxx | 6 - sw/source/core/frmedt/fecopy.cxx | 19 +---- sw/source/core/frmedt/fefly1.cxx | 11 --- sw/source/core/frmedt/feshview.cxx | 5 - sw/source/core/frmedt/fetab.cxx | 54 ++++++---------- sw/source/core/inc/DocumentContentOperationsManager.hxx | 4 - sw/source/core/inc/DocumentFieldsManager.hxx | 2 sw/source/core/inc/cntfrm.hxx | 2 sw/source/core/inc/frame.hxx | 2 sw/source/core/inc/layact.hxx | 4 - sw/source/core/inc/scriptinfo.hxx | 2 sw/source/core/inc/sortedobjs.hxx | 4 - sw/source/core/inc/txtfly.hxx | 2 sw/source/core/layout/calcmove.cxx | 6 - sw/source/core/layout/dbg_lay.cxx | 15 ++-- sw/source/core/layout/layact.cxx | 17 +---- sw/source/core/layout/laycache.cxx | 9 -- sw/source/core/layout/layhelp.hxx | 4 - sw/source/core/layout/sortedobjs.cxx | 15 +--- sw/source/core/ole/ndole.cxx | 2 sw/source/core/text/EnhancedPDFExportHelper.cxx | 7 -- sw/source/core/text/porlay.cxx | 5 - sw/source/core/text/txtfly.cxx | 5 - sw/source/core/txtnode/thints.cxx | 16 +--- sw/source/core/txtnode/txatritr.cxx | 6 - sw/source/core/unocore/unochart.cxx | 8 -- sw/source/core/unocore/unostyle.cxx | 6 - sw/source/core/view/pagepreviewlayout.cxx | 24 ++----- sw/source/filter/html/htmlcss1.cxx | 8 -- sw/source/filter/html/parcss1.cxx | 8 -- sw/source/filter/html/parcss1.hxx | 2 sw/source/filter/html/swhtml.hxx | 2 sw/source/filter/ww8/ww8scan.cxx | 7 -- sw/source/filter/ww8/ww8scan.hxx | 2 sw/source/ui/dialog/swdlgfact.cxx | 4 - sw/source/ui/dialog/swdlgfact.hxx | 2 sw/source/uibase/dbui/dbmgr.cxx | 4 - sw/source/uibase/inc/wrtsh.hxx | 4 - sw/source/uibase/lingu/hhcwrp.cxx | 3 sw/source/uibase/wrtsh/move.cxx | 6 - 94 files changed, 273 insertions(+), 444 deletions(-)
New commits: commit 20e5f64215853bdd32c5f16394ba7f2f36745904 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Fri Jan 19 14:40:12 2018 +0200 loplugin:unused-returns in sw Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967 Reviewed-on: https://gerrit.libreoffice.org/48189 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 88d5f8c0a393..a0c85e8c85e9 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -157,7 +157,7 @@ class SwTaggedPDFHelper void EndStructureElements(); bool CheckReopenTag(); - bool CheckRestoreTag() const; + void CheckRestoreTag() const; public: diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 9f4674ff2953..5ba9b1a6d3fc 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -115,7 +115,7 @@ public: /** Delete a range SwFlyFrameFormat. */ - virtual bool DeleteRange(SwPaM&) = 0; + virtual void DeleteRange(SwPaM&) = 0; /** Delete full paragraphs. */ @@ -214,7 +214,7 @@ public: virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, const SetAttrMode nFlags = SetAttrMode::DEFAULT, bool bExpandCharToPara=false) = 0; - virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, + virtual void InsertItemSet (const SwPaM &rRg, const SfxItemSet&, const SetAttrMode nFlags = SetAttrMode::DEFAULT) = 0; /** Removes any leading white space from the paragraph diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index c78e5a249b3b..78d0e190b4a2 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -73,7 +73,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } @retval true putting of value was successful @retval false else */ - virtual bool PutValueToField(const SwPosition & rPos, const css::uno::Any& rVal, sal_uInt16 nWhich) = 0; + virtual void PutValueToField(const SwPosition & rPos, const css::uno::Any& rVal, sal_uInt16 nWhich) = 0; // Call update of expression fields. All expressions are re-evaluated. diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index e221dd031bbc..d861ddd0fd8b 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -80,14 +80,14 @@ public: virtual SwFieldType* Copy() const override; - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhichId ) const override; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhichId ) override; + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhichId ) const override; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhichId ) override; void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; } SwDoc* GetDoc(){ return m_pDoc; } void RemoveField(sal_IntPtr nHandle); sal_IntPtr AddField(const OUString& rFieldContents); - bool AddField(sal_IntPtr nHandle); + void AddField(sal_IntPtr nHandle); void DelSequenceArray() { m_SequArr.clear(); diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index fd75609f057f..515ee873e9e2 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -303,7 +303,7 @@ public: SwPaM * CreateCursor(); ///< delete the current cursor and make the following into the current - bool DestroyCursor(); + void DestroyCursor(); ///< transform TableCursor to normal cursor, nullify Tablemode void TableCursorToCursor(); ///< enter block mode, change normal cursor into block cursor @@ -358,7 +358,7 @@ public: bool MovePara( SwWhichPara, SwMoveFnCollection const & ); bool MoveSection( SwWhichSection, SwMoveFnCollection const & ); bool MoveTable( SwWhichTable, SwMoveFnCollection const & ); - bool MoveColumn( SwWhichColumn, SwPosColumn ); + void MoveColumn( SwWhichColumn, SwPosColumn ); bool MoveRegion( SwWhichRegion, SwMoveFnCollection const & ); sal_uLong Find( const i18nutil::SearchOptions2& rSearchOpt, @@ -518,7 +518,7 @@ public: /* * Returns SwRect, at which the character is located. */ - bool GetCharRectAt(SwRect& rRect, const SwPosition* pPos); + void GetCharRectAt(SwRect& rRect, const SwPosition* pPos); // Return current page number: // true: in which cursor is located. @@ -593,8 +593,8 @@ public: bool SelTable(); - bool GotoNextNum(); - bool GotoPrevNum(); + void GotoNextNum(); + void GotoPrevNum(); bool GotoOutline( const OUString& rName ); // to the next/previous or the given OutlineNode @@ -641,7 +641,7 @@ public: bool GotoPrevFootnoteAnchor(); bool GotoNextFootnoteAnchor(); - bool GotoFlyAnchor(); ///< jump from the frame to the anchor + void GotoFlyAnchor(); ///< jump from the frame to the anchor bool GotoHeaderText(); ///< jump from the content to the header bool GotoFooterText(); ///< jump from the content to the footer // jump to the header/footer of the given or current PageDesc @@ -652,7 +652,7 @@ public: bool GotoNextTOXBase( const OUString* = nullptr ); bool GotoPrevTOXBase( const OUString* = nullptr ); - bool GotoTOXMarkBase(); + void GotoTOXMarkBase(); // jump to the next or previous index entry bool GotoNxtPrvTOXMark( bool bNext = true ); // jump to the next/previous index mark of this type @@ -714,7 +714,7 @@ public: bool GoStartSentence(); bool GoEndSentence(); bool SelectWord( const Point* pPt ); - bool ExpandToSentenceBorders(); + void ExpandToSentenceBorders(); // get position from current cursor bool IsStartWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const; diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index cb7ed9c266bf..214d3d9acec3 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -47,8 +47,8 @@ public: const OUString& GetColumnName() const {return sColumn;} const SwDBData& GetDBData() const {return aDBData;} - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; // Classes derived from SwFields. They overlay the expand-function. diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 555d4dc9079f..b4a6f9e8abfe 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -372,7 +372,7 @@ public: OUString &rResult, double *pNumber); bool FillCalcWithMergeData(SvNumberFormatter *pDocFormatter, LanguageType nLanguage, SwCalc &aCalc); - bool ToNextRecord(const OUString& rDataSource, const OUString& rTableOrQuery); + void ToNextRecord(const OUString& rDataSource, const OUString& rTableOrQuery); sal_uInt32 GetSelectedRecordId(); bool ToRecordId(sal_Int32 nSet); diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index a583f247a966..e8c444676e16 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -52,8 +52,8 @@ public: virtual SwFieldType* Copy() const override; virtual OUString GetName() const override; - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; OUString const & GetCmd() const; void SetCmd( const OUString& aStr ); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 49cc1bd41551..903cd5b910de 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -513,7 +513,7 @@ public: ::sw::DocumentContentOperationsManager & GetDocumentContentOperationsManager(); bool UpdateParRsid( SwTextNode *pTextNode, sal_uInt32 nVal = 0 ); - bool UpdateRsid( const SwPaM &rRg, sal_Int32 nLen ); + void UpdateRsid( const SwPaM &rRg, sal_Int32 nLen ); // IDocumentStylePoolAccess IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const; @@ -1183,19 +1183,19 @@ public: bool TableToText( const SwTableNode* pTableNd, sal_Unicode cCh ); // Create columns / rows in table. - bool InsertCol( const SwCursor& rCursor, + void InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt = 1, bool bBehind = true ); bool InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt = 1, bool bBehind = true ); - bool InsertRow( const SwCursor& rCursor, + void InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt = 1, bool bBehind = true ); bool InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt = 1, bool bBehind = true ); // Delete Columns/Rows in table. bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false ); - bool DeleteRow( const SwCursor& rCursor ); - bool DeleteCol( const SwCursor& rCursor ); + void DeleteRow( const SwCursor& rCursor ); + void DeleteCol( const SwCursor& rCursor ); // Split / concatenate boxes in table. bool SplitTable( const SwSelBoxes& rBoxes, bool bVert, @@ -1265,9 +1265,9 @@ public: const SwTable* pCpyTable, bool bCpyName = false, bool bCorrPos = false ); - bool UnProtectCells( const OUString& rTableName ); + void UnProtectCells( const OUString& rTableName ); bool UnProtectCells( const SwSelBoxes& rBoxes ); - bool UnProtectTables( const SwPaM& rPam ); + void UnProtectTables( const SwPaM& rPam ); bool HasTableAnyProtection( const SwPosition* pPos, const OUString* pTableName, bool* pFullTableProtection ); @@ -1390,7 +1390,7 @@ public: const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const; // Call into intransparent Basic; expect possible Return String. - bool ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ); + void ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ); // Call into intransparent Basic / JavaScript. sal_uInt16 CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCallEvent, diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 7f0aeb772f69..d616a0b839a7 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -340,7 +340,7 @@ public: bool InsertWithValidRanges(SwRangeRedlinePtr& p, size_type* pInsPos = nullptr); void Remove( size_type nPos ); - bool Remove( const SwRangeRedline* p ); + void Remove( const SwRangeRedline* p ); void DeleteAndDestroy( size_type nPos, size_type nLen = 1 ); void DeleteAndDestroyAll(); @@ -383,7 +383,7 @@ private: public: ~SwExtraRedlineTable(); - bool Insert( SwExtraRedline* p ); + void Insert( SwExtraRedline* p ); void DeleteAndDestroy( sal_uInt16 nPos, sal_uInt16 nLen = 1 ); void DeleteAndDestroyAll(); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 197d3b274525..d290fd814130 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -222,7 +222,7 @@ public: /** If cursor is in a INetAttribute it will be deleted completely including the descriptive text (needed at drag & drop). */ - bool DelINetAttrWithText(); + void DelINetAttrWithText(); /** If Cursor is at the end of a character style in which the DontExpand-flag is not yet set, the latter will be set (==> return TRUE). */ @@ -258,11 +258,8 @@ public: * @param rSet * output parameter - the SfxItemSet where the automatic paragraph format attribute(s) will be store. * The attributes aren't invalidated or cleared if the function reach the getMaxLookup limit. - * - * @return true if the function inspect all the nodes point by the pPaM parameter, - * false if the function reach the limit of getMaxLookup number of nodes inspected. */ - bool GetCurParAttr( SfxItemSet& rSet ) const; + void GetCurParAttr( SfxItemSet& rSet ) const; /** * Get the paragraph format attribute(s) of the selection(s) described by a SwPaM. * @@ -523,12 +520,12 @@ public: const bool bResetIndentAttrs = false ); /// Paragraphs without enumeration but with indents. - bool NoNum(); + void NoNum(); /// Delete, split enumeration list. void DelNumRules(); - bool NumUpDown( bool bDown = true ); + void NumUpDown( bool bDown = true ); bool MoveParagraph( long nOffset = 1); bool MoveNumParas( bool bUpperLower, bool bUpperLeft ); @@ -575,7 +572,7 @@ public: sal_uInt16 GetNodeNumStart( SwPaM* pPaM ) const; - bool ReplaceNumRule( const OUString& rOldRule, const OUString& rNewRule ); + void ReplaceNumRule( const OUString& rOldRule, const OUString& rNewRule ); /** Searches for a text node with a numbering rule. in case a list style is found, <sListId> holds the list id, to which the @@ -612,9 +609,9 @@ public: /// should only be called by sw::UndoManager! void HandleUndoRedoContext(::sw::UndoRedoContext & rContext); - bool Undo(sal_uInt16 const nCount = 1); - bool Redo(sal_uInt16 const nCount = 1); - bool Repeat(sal_uInt16 const nCount); + void Undo(sal_uInt16 const nCount = 1); + void Redo(sal_uInt16 const nCount = 1); + void Repeat(sal_uInt16 const nCount); /// For all views of this document. void StartAllAction(); @@ -750,7 +747,7 @@ public: void SetTableChgMode( TableChgMode eMode ); /// Split table at cursor position. - bool SplitTable( SplitTable_HeadlineOption eMode ); + void SplitTable( SplitTable_HeadlineOption eMode ); /** Merge tables. @@ -886,7 +883,7 @@ public: section/table. The purpose of the method is to allow users to inert text at certain 'impossible' position, e.g. before a table at the document start or between to sections. */ - bool DoSpecialInsert(); + void DoSpecialInsert(); bool CanSpecialInsert() const; /// Optimizing UI. @@ -911,17 +908,17 @@ public: void SetGlblDocSaveLinks( bool bFlag ); bool IsGlblDocSaveLinks() const; void GetGlobalDocContent( SwGlblDocContents& rArr ) const; - bool InsertGlobalDocContent( const SwGlblDocContent& rPos, + void InsertGlobalDocContent( const SwGlblDocContent& rPos, SwSectionData & rNew ); bool InsertGlobalDocContent( const SwGlblDocContent& rPos, const SwTOXBase& rTOX ); bool InsertGlobalDocContent( const SwGlblDocContent& rPos ); - bool DeleteGlobalDocContent( const SwGlblDocContents& rArr, + void DeleteGlobalDocContent( const SwGlblDocContents& rArr, size_t nPos ); bool MoveGlobalDocContent( const SwGlblDocContents& rArr , size_t nFromPos, size_t nToPos, size_t nNewPos ); - bool GotoGlobalDocContent( const SwGlblDocContent& rPos ); + void GotoGlobalDocContent( const SwGlblDocContent& rPos ); /// For Redlining. RedlineFlags GetRedlineFlags() const; diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 0b55cb8d8ca1..aefbbdbcbe0e 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -188,8 +188,8 @@ public: const SwNode* GetOutlineChgNd() const { return pOutlChgNd; } void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; } - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp ) diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 3e5b719d5a9f..9923aad5bff6 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -255,11 +255,11 @@ public: virtual ~SwFEShell() override; /// Copy and Paste methods for internal clipboard. - bool Copy( SwDoc* pClpDoc, const OUString* pNewClpText = nullptr ); + void Copy( SwDoc* pClpDoc, const OUString* pNewClpText = nullptr ); bool Paste( SwDoc* pClpDoc ); /// Paste some pages into another doc - used in mailmerge. - bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage); + void PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage); /// Copy-Method for Drag&Drop bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, @@ -382,7 +382,7 @@ public: bool GetFlyFrameAttr( SfxItemSet &rSet ) const; bool SetFlyFrameAttr( SfxItemSet &rSet ); static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor); - bool ResetFlyFrameAttr( const SfxItemSet* pSet ); + void ResetFlyFrameAttr( const SfxItemSet* pSet ); const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false, SwFrameFormat *pParent = nullptr ); void SetFlyPos( const Point &rAbsPos); @@ -494,7 +494,7 @@ public: /// Attention: Ambiguities if multiple selections. bool GetObjAttr( SfxItemSet &rSet ) const; - bool SetObjAttr( const SfxItemSet &rSet ); + void SetObjAttr( const SfxItemSet &rSet ); const SdrObject* GetBestObject( bool bNext, GotoObjFlags eType, bool bFlat = true, const svx::ISdrObjectFilter* pFilter = nullptr ); bool GotoObj( bool bNext, GotoObjFlags eType = GotoObjFlags::DrawAny); @@ -579,7 +579,7 @@ public: void InsertDrawObj( SdrObject& rDrawObj, const Point& rInsertPosition ); - bool ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ); + void ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ); // --> #i972# /** for starmath formulas anchored 'as char' it aligns it baseline to baseline @@ -635,10 +635,10 @@ public: /// Is content of a table cell or at least a table cell completely selected? bool HasBoxSelection() const; - bool InsertRow( sal_uInt16 nCnt, bool bBehind ); - bool InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end. + void InsertRow( sal_uInt16 nCnt, bool bBehind ); + void InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end. bool DeleteCol(); - bool DeleteTable(); + void DeleteTable(); bool DeleteRow(bool bCompleteTable = false); bool DeleteTableSel(); ///< Current selection, may be whole table. @@ -646,7 +646,7 @@ public: TableMergeErr MergeTab(); /**< Merge selected parts of table */ /// Split cell vertically or horizontally. - bool SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ); + void SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ); bool Sort(const SwSortOptions&); //Sortieren. void SetRowHeight( const SwFormatFrameSize &rSz ); @@ -733,9 +733,9 @@ public: bool GetTableAutoFormat( SwTableAutoFormat& rGet ); - bool SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff ); + void SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff ); - bool GetAutoSum( OUString& rFormula ) const; + void GetAutoSum( OUString& rFormula ) const; /** Phy: real page count. Virt: consider offset that may have been set by user. */ diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index a71fdb715a15..e3fed4461a70 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -257,8 +257,8 @@ public: /// Only in derived classes. virtual OUString GetName() const; virtual SwFieldType* Copy() const = 0; - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ); + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ); SwFieldIds Which() const { return m_nWhich; } diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index e7bdfbbd4375..81074d8fabca 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -211,11 +211,8 @@ public: rItem is not found the selection will be empty. @param rItem the item to be set - - @retval true the selected item was successfully set - @retval false failure (empty selection) */ - bool SetSelectedItem(const OUString & rItem); + void SetSelectedItem(const OUString & rItem); /** Sets the name of the field. diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index 80172c827de4..48cbedb3d99e 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -217,7 +217,7 @@ public: const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const; const SwFormatCollConditions& GetCondColls() const { return m_CondColls; } void InsertCondition( const SwCollCondition& rCond ); - bool RemoveCondition( const SwCollCondition& rCond ); + void RemoveCondition( const SwCollCondition& rCond ); void SetConditions( const SwFormatCollConditions& ); }; diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 1401abdc10a9..d77b291e85b0 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -53,7 +53,7 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion /// from SvxSpellWrapper copied and modified bool ConvNext_impl(); ///< former SpellNext - bool FindConvText_impl(); ///< former FindSpellError + void FindConvText_impl(); ///< former FindSpellError void ConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea eSpell ); ///< former SpellStart void ConvEnd_impl( SwConversionArgs const *pConvArgs ); ///< former SpellEnd diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 78e9921ce6e0..941115235e56 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -193,7 +193,7 @@ public: SwGrammarMarkUp* GetGrammarCheck(); void SetSmartTags( SwWrongList* pNew, bool bDelete = true ); SwWrongList* GetSmartTags(); - bool TryCharSetExpandToNum(const SfxItemSet& pCharSet); + void TryCharSetExpandToNum(const SfxItemSet& pCharSet); /// End: Data collected during idle time diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index 810ca1e8cc22..cf5227a1c1bf 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -180,10 +180,8 @@ private: @param _opPreviewPage output parameter - calculated preview data. - - @return boolean, indicating, if calculation was successful. */ - bool CalcPreviewDataForPage( const SwPageFrame& _rPage, + void CalcPreviewDataForPage( const SwPageFrame& _rPage, const Point& _rPreviewOffset, PreviewPage* _opPreviewPage ); @@ -266,10 +264,8 @@ public: @param _rPxWinSize input parameter - window size in which the preview will be displayed and for which the scaling will be calculated. - - @return boolean, indicating, if preview layout is successful initialized. */ - bool Init( const sal_uInt16 _nCols, + void Init( const sal_uInt16 _nCols, const sal_uInt16 _nRows, const Size& _rPxWinSize ); @@ -277,10 +273,8 @@ public: /** method to adjust page preview layout to document changes @author OD - - @return boolean, indicating, if preview layout is successful initialized. */ - bool ReInit(); + void ReInit(); /** prepare paint of page preview @@ -427,10 +421,8 @@ public: @param _orNewStartPos output parameter - new start position in document preview - - @return boolean - indicating, that move was successful. */ - bool CalcStartValuesForSelectedPageMove( const sal_Int16 _nHoriMove, + void CalcStartValuesForSelectedPageMove( const sal_Int16 _nHoriMove, const sal_Int16 _nVertMove, sal_uInt16& _orNewSelectedPage, sal_uInt16& _orNewStartPage, diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 61e64265dfe3..615b40552fb8 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -371,7 +371,7 @@ protected: virtual ~AbstractMailMergeWizard() override = default; public: virtual OUString GetReloadDocument() const = 0; - virtual bool ShowPage( sal_uInt16 nLevel ) = 0; + virtual void ShowPage( sal_uInt16 nLevel ) = 0; virtual sal_uInt16 GetRestartPage() const = 0; }; diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx index 539f430ddee2..4f922e698f95 100644 --- a/sw/inc/swbaslnk.hxx +++ b/sw/inc/swbaslnk.hxx @@ -49,7 +49,7 @@ public: // For graphics only. bool SwapIn( bool bWaitForData = false, bool bNativFormat = false ); - bool Connect() { return nullptr != SvBaseLink::GetRealObject(); } + void Connect() { SvBaseLink::GetRealObject(); } // Only for graphics-links (for switching between DDE / Grf-link). using SvBaseLink::SetObjType; diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 1d240de469ba..b41e9990f502 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -289,7 +289,7 @@ public: bool InsNewTable( const SwTable& rCpyTable, const SwSelBoxes&, SwUndoTableCpyTable* pUndo ); // Copy headline of table (with content!) into an other one. - bool CopyHeadlineIntoTable( SwTableNode& rTableNd ); + void CopyHeadlineIntoTable( SwTableNode& rTableNd ); // Get box, whose start index is set on nBoxStt. SwTableBox* GetTableBox( sal_uLong nSttIdx ); diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index 797989fa58b9..11ea7488cd73 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -188,7 +188,7 @@ public: bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer ); bool Save( SvStream& rStream, sal_uInt16 fileVersion ) const; - bool SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const; + void SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const; }; /* @@ -366,7 +366,7 @@ public: /// Find table style with the provided name, return nullptr when not found. SwTableAutoFormat* FindAutoFormat(const OUString& rName) const; - bool Load(); + void Load(); bool Save() const; }; diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 6827d73191c8..96e4c296c3f3 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -41,7 +41,7 @@ public: SwScriptIterator( const OUString& rStr, sal_Int32 nStart, bool bFrwrd = true ); - bool Next(); + void Next(); sal_uInt16 GetCurrScript() const { return nCurScript; } sal_Int32 GetScriptChgPos() const { return (m_nChgPos == -1) ? COMPLETE_STRING : m_nChgPos; } diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index 4ad0b0caaf8c..17708e6f69f7 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -321,7 +321,7 @@ public: bool DeleteBox( const SwTableBox &rBox ); void FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const; - bool ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount ); + void ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount ); std::vector< css::uno::Reference< css::table::XCell > > GetCells(); }; diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index 63ebabc2f220..d523964b97c3 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -58,8 +58,8 @@ public: bool IsDeleted() const { return bDeleted; } void SetDeleted( bool b ) { bDeleted = b; } - virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nMId ) const override; - virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nMId ) override; + virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nMId ) const override; + virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nMId ) override; protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 055891bd99c9..3a0aef4fa6de 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -142,21 +142,20 @@ SwPaM * SwCursorShell::CreateCursor() * Note, this function does not delete anything if there is no other cursor. * @return - returns true if there was another cursor and we deleted one. */ -bool SwCursorShell::DestroyCursor() +void SwCursorShell::DestroyCursor() { // don't delete Cursor with active table Selection assert(!IsTableMode()); // Is there a next one? Don't do anything if not. if(!m_pCurrentCursor->IsMultiSelection()) - return false; + return; SwCallLink aLk( *this ); // watch Cursor-Moves SwCursor* pNextCursor = static_cast<SwCursor*>(m_pCurrentCursor->GetNext()); delete m_pCurrentCursor; m_pCurrentCursor = dynamic_cast<SwShellCursor*>(pNextCursor); UpdateCursor(); - return true; } /** @@ -1084,10 +1083,10 @@ bool SwCursorShell::GotoPage( sal_uInt16 nPage ) return bRet; } -bool SwCursorShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos) +void SwCursorShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos) { SwContentFrame* pFrame = GetCurrFrame(); - return pFrame->GetCharRect( rRect, *pPos ); + pFrame->GetCharRect( rRect, *pPos ); } void SwCursorShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 6f8b26f55c19..ad156de3c4b7 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -108,20 +108,18 @@ void SwCursorShell::MoveCursorToNum() } /// go to next/previous point on the same level -bool SwCursorShell::GotoNextNum() +void SwCursorShell::GotoNextNum() { if (!SwDoc::GotoNextNum( *m_pCurrentCursor->GetPoint() )) - return false; + return; MoveCursorToNum(); - return true; } -bool SwCursorShell::GotoPrevNum() +void SwCursorShell::GotoPrevNum() { if (!SwDoc::GotoPrevNum( *m_pCurrentCursor->GetPoint() )) - return false; + return; MoveCursorToNum(); - return true; } /// jump from content to header @@ -362,7 +360,7 @@ bool SwCursorShell::GotoPrevTOXBase( const OUString* pName ) } /// jump to index of TOXMark -bool SwCursorShell::GotoTOXMarkBase() +void SwCursorShell::GotoTOXMarkBase() { bool bRet = false; @@ -406,7 +404,6 @@ bool SwCursorShell::GotoTOXMarkBase() } } } - return bRet; } /// Jump to next/previous table formula diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index 87844660d3ef..8c69bb97b288 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -80,9 +80,9 @@ bool SwCursorShell::SelectWord( const Point* pPt ) return m_pCurrentCursor->SelectWord( this, pPt ); } -bool SwCursorShell::ExpandToSentenceBorders() +void SwCursorShell::ExpandToSentenceBorders() { - return m_pCurrentCursor->ExpandToSentenceBorders(); + m_pCurrentCursor->ExpandToSentenceBorders(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx index 8e4f469428fb..5ac1997f8d00 100644 --- a/sw/source/core/crsr/trvlcol.cxx +++ b/sw/source/core/crsr/trvlcol.cxx @@ -64,9 +64,8 @@ SwContentFrame* GetColumnEnd( const SwLayoutFrame* pColFrame ) return pRet; } -bool SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ) +void SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ) { - bool bRet = false; if( !m_pTableCursor ) { SwLayoutFrame* pLayFrame = GetCurrFrame()->GetUpper(); @@ -94,12 +93,10 @@ bool SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ) !m_pCurrentCursor->IsSelOvr() ) { UpdateCursor(); - bRet = true; } } } } - return bRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 24561ebd9e51..a46eb7c367b5 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -301,7 +301,7 @@ bool SwCursorShell::GotoPrevFootnoteAnchor() } /// jump from border to anchor -bool SwCursorShell::GotoFlyAnchor() +void SwCursorShell::GotoFlyAnchor() { SET_CURR_SHELL( this ); const SwFrame* pFrame = GetCurrFrame(); @@ -310,7 +310,7 @@ bool SwCursorShell::GotoFlyAnchor() } while( pFrame && !pFrame->IsFlyFrame() ); if( !pFrame ) // no FlyFrame - return false; + return; SwCallLink aLk( *this ); // watch Cursor-Moves SwCursorSaveState aSaveState( *m_pCurrentCursor ); @@ -333,7 +333,6 @@ bool SwCursorShell::GotoFlyAnchor() if( bRet ) UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | SwCursorShell::READONLY ); - return bRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index e0c763f0f37c..2f0edac02349 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1757,9 +1757,9 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode ) m_rDoc.GetNodes().DelNodes( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() + 1 ); } -bool DocumentContentOperationsManager::DeleteRange( SwPaM & rPam ) +void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam ) { - return lcl_DoWithBreaks( *this, rPam, &DocumentContentOperationsManager::DeleteRangeImpl ); + lcl_DoWithBreaks( *this, rPam, &DocumentContentOperationsManager::DeleteRangeImpl ); } bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) @@ -3103,7 +3103,7 @@ bool DocumentContentOperationsManager::InsertPoolItem( return bRet; } -bool DocumentContentOperationsManager::InsertItemSet ( const SwPaM &rRg, const SfxItemSet &rSet, +void DocumentContentOperationsManager::InsertItemSet ( const SwPaM &rRg, const SfxItemSet &rSet, const SetAttrMode nFlags ) { SwDataChanged aTmp( rRg ); @@ -3123,7 +3123,6 @@ bool DocumentContentOperationsManager::InsertItemSet ( const SwPaM &rRg, const S if( bRet ) m_rDoc.getIDocumentState().SetModified(); - return bRet; } void DocumentContentOperationsManager::RemoveLeadingWhiteSpace(const SwPosition & rPos ) diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index f6a8bc90a39f..15b7c5a8313e 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -452,7 +452,7 @@ void DocumentFieldsManager::InsDeletedFieldType( SwFieldType& rFieldTyp ) } } -bool DocumentFieldsManager::PutValueToField(const SwPosition & rPos, +void DocumentFieldsManager::PutValueToField(const SwPosition & rPos, const Any& rVal, sal_uInt16 nWhich) { Any aOldVal; @@ -465,7 +465,7 @@ bool DocumentFieldsManager::PutValueToField(const SwPosition & rPos, m_rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo); } - return pField->PutValue(rVal, nWhich); + pField->PutValue(rVal, nWhich); } bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & rSrcField, diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 5917905a9139..dba0e27a94d7 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -72,7 +72,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs ) return pRet; } -bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ) +void SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ) { ErrCode eErr = ERRCODE_NONE; switch( rMacro.GetScriptType() ) @@ -125,8 +125,6 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ) break; } } - - return ERRCODE_NONE == eErr; } sal_uInt16 SwDoc::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCallEvent, diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index c4bbf0b78ce3..85fb36c27b8f 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -414,15 +414,15 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, } /// Set the rsid of the next nLen symbols of rRg to the current session number -bool SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen ) +void SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen ) { if (!SW_MOD()->GetModuleConfig()->IsStoreRsid()) - return false; + return; SwTextNode *pTextNode = rRg.GetPoint()->nNode.GetNode().GetTextNode(); if (!pTextNode) { - return false; + return; } const sal_Int32 nStart(rRg.GetPoint()->nContent.GetIndex() - nLen); SvxRsidItem aRsid( mnRsid, RES_CHRATR_RSID ); @@ -443,7 +443,6 @@ bool SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen ) pUndoInsert->SetWithRsid(); } } - return bRet; } bool SwDoc::UpdateParRsid( SwTextNode *pTextNode, sal_uInt32 nVal ) diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index f91a1cde76b4..2519c0e99850 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -579,13 +579,12 @@ SwRedlineTable::size_type SwRedlineTable::GetPos(const SwRangeRedline* p) const return it - maVector.begin(); } -bool SwRedlineTable::Remove( const SwRangeRedline* p ) +void SwRedlineTable::Remove( const SwRangeRedline* p ) { const size_type nPos = GetPos(p); if (nPos == npos) - return false; + return; Remove(nPos); - return true; } void SwRedlineTable::Remove( size_type nP ) @@ -1848,11 +1847,10 @@ void SwRangeRedline::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } -bool SwExtraRedlineTable::Insert( SwExtraRedline* p ) +void SwExtraRedlineTable::Insert( SwExtraRedline* p ) { m_aExtraRedlines.push_back( p ); //p->CallDisplayFunc(); - return true; } void SwExtraRedlineTable::DeleteAndDestroy( sal_uInt16 nPos, sal_uInt16 nLen ) diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 1a3ca6e7755e..5b6ed7522253 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -544,19 +544,15 @@ void SwConditionTextFormatColl::InsertCondition( const SwCollCondition& rCond ) m_CondColls.push_back( o3tl::make_unique<SwCollCondition> (rCond) ); } -bool SwConditionTextFormatColl::RemoveCondition( const SwCollCondition& rCond ) +void SwConditionTextFormatColl::RemoveCondition( const SwCollCondition& rCond ) { - bool bRet = false; for (SwFormatCollConditions::size_type n = 0; n < m_CondColls.size(); ++n) { if (*m_CondColls[ n ] == rCond) { m_CondColls.erase( m_CondColls.begin() + n ); - bRet = true; } } - - return bRet; } void SwConditionTextFormatColl::SetConditions( const SwFormatCollConditions& rCndClls ) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 8491a9c6f360..8e4a253ded88 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -556,7 +556,7 @@ bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 fileVersion ) const return ERRCODE_NONE == rStream.GetError(); } -bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const +void SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const { rStream.WriteUInt16( m_aFont.GetVersion( fileVersion ) ); rStream.WriteUInt16( m_aHeight.GetVersion( fileVersion ) ); @@ -591,8 +591,6 @@ bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) rStream.WriteUInt16( m_aRotateMode.GetVersion( fileVersion ) ); rStream.WriteUInt16( 0 ); // NumberFormat - - return ERRCODE_NONE == rStream.GetError(); } SwTableAutoFormat::SwTableAutoFormat( const OUString& rName ) @@ -1256,21 +1254,17 @@ SwTableAutoFormatTable::SwTableAutoFormatTable() m_pImpl->m_AutoFormats.push_back(std::move(pNew)); } -bool SwTableAutoFormatTable::Load() +void SwTableAutoFormatTable::Load() { if (utl::ConfigManager::IsFuzzing()) - return false; - bool bRet = false; + return; OUString sNm(AUTOTABLE_FORMAT_NAME); SvtPathOptions aOpt; if( aOpt.SearchFile( sNm )) { SfxMedium aStream( sNm, StreamMode::STD_READ ); - bRet = Load( *aStream.GetInStream() ); + Load( *aStream.GetInStream() ); } - else - bRet = false; - return bRet; } bool SwTableAutoFormatTable::Save() const diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 6650616aef31..889aea171ce1 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1994,7 +1994,7 @@ lcl_CopyLineToDoc(const FndLine_& rFndLine, CpyPara *const pCpyPara) ++pCpyPara->nLnIdx; } -bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) +void SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) { // Find all Boxes/Lines SwSelBoxes aSelBoxes; @@ -2008,7 +2008,7 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) ForEach_FndLineCopyCol( GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return false; + return; { // Convert Table formulas to their relative representation @@ -2037,8 +2037,6 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) pTableBox->setRowSpan( 1 ); } } - - return true; } bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 69dc8686084b..d1a990b45a19 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1693,19 +1693,17 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, /** * Inserting Columns/Rows */ -bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) +void SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) { if( !::CheckSplitCells( rCursor, nCnt + 1, SwTableSearchType::Col ) ) - return false; + return; // Find the Boxes via the Layout SwSelBoxes aBoxes; ::GetTableSel( rCursor, aBoxes, SwTableSearchType::Col ); - bool bRet = false; if( !aBoxes.empty() ) - bRet = InsertCol( aBoxes, nCnt, bBehind ); - return bRet; + InsertCol( aBoxes, nCnt, bBehind ); } bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) @@ -1758,16 +1756,14 @@ bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) return bRet; } -bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) +void SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) { // Find the Boxes via the Layout SwSelBoxes aBoxes; GetTableSel( rCursor, aBoxes, SwTableSearchType::Row ); - bool bRet = false; if( !aBoxes.empty() ) - bRet = InsertRow( aBoxes, nCnt, bBehind ); - return bRet; + InsertRow( aBoxes, nCnt, bBehind ); } bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) @@ -1824,13 +1820,13 @@ bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) /** * Deleting Columns/Rows */ -bool SwDoc::DeleteRow( const SwCursor& rCursor ) +void SwDoc::DeleteRow( const SwCursor& rCursor ) { // Find the Boxes via the Layout SwSelBoxes aBoxes; GetTableSel( rCursor, aBoxes, SwTableSearchType::Row ); if( ::HasProtectedCells( aBoxes )) - return false; + return; // Remove the Cursor from the to-be-deleted Section. // The Cursor is placed after the table, except for @@ -1840,7 +1836,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) SwTableNode* pTableNd = rCursor.GetNode().FindTableNode(); if(dynamic_cast<const SwDDETable*>( & pTableNd->GetTable()) != nullptr) - return false; + return; // Find all Boxes/Lines FndBox_ aFndBox( nullptr, nullptr ); @@ -1850,7 +1846,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) } if( aFndBox.GetLines().empty() ) - return false; + return; SwEditShell* pESh = GetEditShell(); if( pESh ) @@ -1920,19 +1916,17 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) // Thus delete the Rows GetIDocumentUndoRedo().StartUndo(SwUndoId::ROW_DELETE, nullptr); - bool bResult = DeleteRowCol( aBoxes ); + DeleteRowCol( aBoxes ); GetIDocumentUndoRedo().EndUndo(SwUndoId::ROW_DELETE, nullptr); - - return bResult; } -bool SwDoc::DeleteCol( const SwCursor& rCursor ) +void SwDoc::DeleteCol( const SwCursor& rCursor ) { // Find the Boxes via the Layout SwSelBoxes aBoxes; GetTableSel( rCursor, aBoxes, SwTableSearchType::Col ); if( ::HasProtectedCells( aBoxes )) - return false; + return; // The Cursors need to be removed from the to-be-deleted range. // Always place them after/on top of the Table; they are always set @@ -1946,10 +1940,8 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor ) // Thus delete the Columns GetIDocumentUndoRedo().StartUndo(SwUndoId::COL_DELETE, nullptr); - bool bResult = DeleteRowCol( aBoxes, true ); + DeleteRowCol( aBoxes, true ); GetIDocumentUndoRedo().EndUndo(SwUndoId::COL_DELETE, nullptr); - - return bResult; } bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) @@ -4450,7 +4442,7 @@ bool SwDoc::UnProtectTableCells( SwTable& rTable ) return bChgd; } -bool SwDoc::UnProtectCells( const OUString& rName ) +void SwDoc::UnProtectCells( const OUString& rName ) { bool bChgd = false; SwTableFormat* pFormat = FindTableFormatByName( rName ); @@ -4460,8 +4452,6 @@ bool SwDoc::UnProtectCells( const OUString& rName ) if( bChgd ) getIDocumentState().SetModified(); } - - return bChgd; } bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes ) @@ -4508,7 +4498,7 @@ bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes ) return bChgd; } -bool SwDoc::UnProtectTables( const SwPaM& rPam ) +void SwDoc::UnProtectTables( const SwPaM& rPam ) { GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr); @@ -4547,8 +4537,6 @@ bool SwDoc::UnProtectTables( const SwPaM& rPam ) GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr); if( bChgd ) getIDocumentState().SetModified(); - - return bChgd; } bool SwDoc::HasTableAnyProtection( const SwPosition* pPos, diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index b44374de6241..485737ff574a 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -225,10 +225,9 @@ class SwAutoFormat SetRedlineText_( nId ); return true; } - bool ClearRedlineText() { + void ClearRedlineText() { if( m_aFlags.bWithRedlining ) m_pDoc->GetDocumentRedlineManager().SetAutoFormatRedlineComment(nullptr); - return true; } public: diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index d17dc1b2c634..5e867d92d919 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -175,9 +175,9 @@ bool SwEditShell::GetCurAttr( SfxItemSet& rSet, return GetPaMAttr( GetCursor(), rSet, bMergeIndentValuesOfNumRule ); } -bool SwEditShell::GetCurParAttr( SfxItemSet& rSet) const +void SwEditShell::GetCurParAttr( SfxItemSet& rSet) const { - return GetPaMParAttr( GetCursor(), rSet ); + GetPaMParAttr( GetCursor(), rSet ); } bool SwEditShell::GetPaMParAttr( SwPaM* pPaM, SfxItemSet& rSet ) const diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index dd303cfbd812..ec77cb82287a 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -133,11 +133,11 @@ void SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const } } -bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, +void SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, SwSectionData & rNew) { if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) ) - return false; + return; SET_CURR_SHELL( this ); StartAllAction(); @@ -170,8 +170,6 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, pMyDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr ); } EndAllAction(); - - return true; } bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, @@ -237,11 +235,11 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos ) return true; } -bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , +void SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , size_t nDelPos ) { if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) ) - return false; + return; SET_CURR_SHELL( this ); StartAllAction(); @@ -299,7 +297,6 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , EndUndo( SwUndoId::END ); EndAllAction(); - return true; } bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr , @@ -339,10 +336,10 @@ bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr , return bRet; } -bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos ) +void SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos ) { if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) ) - return false; + return; SET_CURR_SHELL( this ); SttCursorMove(); @@ -362,7 +359,6 @@ bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos ) rCursorPos.nContent.Assign( pCNd, 0 ); EndCursorMove(); - return true; } SwGlblDocContent::SwGlblDocContent( sal_uLong nPos ) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 0cd05f4e1d0f..a3f53c734522 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -694,12 +694,11 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) /// If the cursor is in a INetAttribute then it will be deleted completely (incl. hint text, the /// latter is needed for drag & drop) -bool SwEditShell::DelINetAttrWithText() +void SwEditShell::DelINetAttrWithText() { bool bRet = SelectTextAttr( RES_TXTATR_INETFMT, false ); if( bRet ) DeleteSel( *GetCursor() ); - return bRet; } /// Set the DontExpand flag at the text character attributes diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index d5c58b022cef..efff4b427ef4 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -125,7 +125,7 @@ const SwNumRule* SwEditShell::GetOutlineNumRule() const // Works with old and new rules. Update only differences. // paragraphs without numbering, with indentations -bool SwEditShell::NoNum() +void SwEditShell::NoNum() { bool bRet = true; StartAllAction(); @@ -144,7 +144,6 @@ bool SwEditShell::NoNum() bRet = GetDoc()->NoNum( *pCursor ); EndAllAction(); - return bRet; } bool SwEditShell::SelectionHasNumber() const @@ -301,7 +300,7 @@ void SwEditShell::DelNumRules() } // up- & downgrading -bool SwEditShell::NumUpDown( bool bDown ) +void SwEditShell::NumUpDown( bool bDown ) { StartAllAction(); @@ -327,7 +326,6 @@ bool SwEditShell::NumUpDown( bool bDown ) CallChgLnk(); EndAllAction(); - return bRet; } bool SwEditShell::IsFirstOfNumRuleAtCursorPos() const @@ -787,12 +785,11 @@ void SwEditShell::ChgNumRuleFormats( const SwNumRule& rRule ) EndAllAction(); } -bool SwEditShell::ReplaceNumRule( const OUString& rOldRule, const OUString& rNewRule ) +void SwEditShell::ReplaceNumRule( const OUString& rOldRule, const OUString& rNewRule ) { StartAllAction(); - bool bRet = GetDoc()->ReplaceNumRule( *GetCursor()->GetPoint(), rOldRule, rNewRule ); + GetDoc()->ReplaceNumRule( *GetCursor()->GetPoint(), rOldRule, rNewRule ); EndAllAction(); - return bRet; } void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM ) diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index eebced1e1962..d816896dd7e4 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -392,10 +392,8 @@ bool SwEditShell::CanSpecialInsert() const /** check whether a node can be special-inserted (alt-Enter), and do so. Return whether insertion was possible. */ -bool SwEditShell::DoSpecialInsert() +void SwEditShell::DoSpecialInsert() { - bool bRet = false; - // get current node SwPosition* pCursorPos = GetCursor()->GetPoint(); const SwNode* pInsertNode = lcl_SpecialInsertNode( pCursorPos ); @@ -410,7 +408,7 @@ bool SwEditShell::DoSpecialInsert() SwPosition aInsertPos( aInsertIndex ); // insert a new text node, and set the cursor - bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aInsertPos ); + GetDoc()->getIDocumentContentOperations().AppendTextNode( aInsertPos ); *pCursorPos = aInsertPos; // call AttrChangeNotify for the UI @@ -418,8 +416,6 @@ bool SwEditShell::DoSpecialInsert() EndAllAction(); } - - return bRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 57440eec3bc9..a7f20c31e757 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -424,22 +424,20 @@ OUString SwEditShell::GetTableBoxText() const return sRet; } -bool SwEditShell::SplitTable( SplitTable_HeadlineOption eMode ) +void SwEditShell::SplitTable( SplitTable_HeadlineOption eMode ) { - bool bRet = false; SwPaM *pCursor = GetCursor(); if( pCursor->GetNode().FindTableNode() ) { StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr); - bRet = GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true ); + GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true ); GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr); ClearFEShellTabCols(*GetDoc(), nullptr); EndAllAction(); } - return bRet; } bool SwEditShell::MergeTable( bool bWithPrev ) diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 1decb5dc36a3..05f6f45c177c 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -94,7 +94,7 @@ void SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext) } } -bool SwEditShell::Undo(sal_uInt16 const nCount) +void SwEditShell::Undo(sal_uInt16 const nCount) { SET_CURR_SHELL( this ); @@ -148,11 +148,9 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) SaveTableBoxContent(); } EndAllAction(); - - return bRet; } -bool SwEditShell::Redo(sal_uInt16 const nCount) +void SwEditShell::Redo(sal_uInt16 const nCount) { SET_CURR_SHELL( this ); @@ -200,27 +198,22 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) } EndAllAction(); - - return bRet; } -bool SwEditShell::Repeat(sal_uInt16 const nCount) +void SwEditShell::Repeat(sal_uInt16 const nCount) { SET_CURR_SHELL( this ); - bool bRet = false; StartAllAction(); try { ::sw::RepeatContext context(*GetDoc(), *GetCursor()); - bRet = GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount ) - || bRet; + GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount ); } catch (const css::uno::Exception & e) { SAL_WARN("sw.core", "SwEditShell::Repeat(): exception caught: " << e); } EndAllAction(); - return bRet; } static void lcl_SelectSdrMarkList( SwEditShell* pShell, diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 35c31ecd529e..35a94a6dfb8b 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -133,7 +133,7 @@ sal_IntPtr SwAuthorityFieldType::AddField(const OUString& rFieldContents) return nRet; } -bool SwAuthorityFieldType::AddField(sal_IntPtr nHandle) +void SwAuthorityFieldType::AddField(sal_IntPtr nHandle) { for (auto &rpTemp : m_DataArr) { @@ -143,11 +143,10 @@ bool SwAuthorityFieldType::AddField(sal_IntPtr nHandle) rpTemp->AddRef(); //re-generate positions of the fields DelSequenceArray(); - return true; + return; } } OSL_FAIL("SwAuthorityFieldType::AddField(sal_IntPtr) failed"); - return false; } const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(sal_IntPtr nHandle) const @@ -335,7 +334,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle) return 0; } -bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const +void SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -385,10 +384,9 @@ bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const default: assert(false); } - return true; } -bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) +void SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) { bool bRet = true; switch( nWhichId ) @@ -466,7 +464,6 @@ bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) default: assert(false); } - return bRet; } void SwAuthorityFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 71fb67b21a3f..f74ac04bb843 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -100,7 +100,7 @@ void SwDBFieldType::ReleaseRef() } } -bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const +void SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -119,10 +119,9 @@ bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const default: assert(false); } - return true; } -bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) +void SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -162,7 +161,6 @@ bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) default: assert(false); } - return true; } // database field diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index d9c9993dcdd5..557124dcf7f2 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -313,7 +313,7 @@ void SwDDEFieldType::RefCntChgd() } } -bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const +void SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const { sal_Int32 nPart = -1; switch( nWhichId ) @@ -332,10 +332,9 @@ bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const } if ( nPart>=0 ) rVal <<= GetCmd().getToken(nPart, sfx2::cTokenSeparator); - return true; } -bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) +void SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) { sal_Int32 nPart = -1; switch( nWhichId ) @@ -371,7 +370,6 @@ bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) } SetCmd( sNewCmd ); } - return true; } SwDDEField::SwDDEField( SwDDEFieldType* pInitType ) diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 47ebfabd28b2..e3de87396a88 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -633,7 +633,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rField, const SwNode& rNd ) } } -bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const +void SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -655,10 +655,9 @@ bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const default: assert(false); } - return true; } -bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) +void SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -692,7 +691,6 @@ bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) default: assert(false); } - return true; } bool SwSeqFieldList::InsertSort( SeqFieldLstElem* pNew ) diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index cb602c7567a3..a68c1f7bc61e 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -147,13 +147,11 @@ OUString SwFieldType::GetName() const return OUString(); } -bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const +void SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const { - return false; } -bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 ) +void SwFieldType::PutValue( const uno::Any& , sal_uInt16 ) { - return false; } void SwFieldTypes::dumpAsXml(xmlTextWriterPtr pWriter) const diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx index 59e5ea6bad22..3ebad4c236cc 100644 --- a/sw/source/core/fields/flddropdown.cxx +++ b/sw/source/core/fields/flddropdown.cxx @@ -124,7 +124,7 @@ uno::Sequence<OUString> SwDropDownField::GetItemSequence() const } -bool SwDropDownField::SetSelectedItem(const OUString & rItem) +void SwDropDownField::SetSelectedItem(const OUString & rItem) { vector<OUString>::const_iterator aIt = std::find(aValues.begin(), aValues.end(), rItem); @@ -133,8 +133,6 @@ bool SwDropDownField::SetSelectedItem(const OUString & rItem) aSelectedItem = *aIt; else aSelectedItem.clear(); - - return (aIt != aValues.end()); } void SwDropDownField::SetName(const OUString & rName) diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index 1d9048dd2b49..fe7265df7982 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -275,7 +275,7 @@ void SwUserFieldType::SetContent( const OUString& rStr, sal_uInt32 nFormat ) } } -bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const +void SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -291,10 +291,9 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const default: assert(false); } - return true; } -bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) +void SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -328,7 +327,6 @@ bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) default: assert(false); } - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index f6be7c2e167a..fd44d6ea09e7 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -83,7 +83,7 @@ using namespace ::com::sun::star; // Copy for the internal clipboard. Copies all selections to the clipboard. -bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) +void SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) { OSL_ENSURE( pClpDoc, "No Clipboard document" ); @@ -125,12 +125,11 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) if( pNewClpText ) { pTextNd->InsertText( *pNewClpText, SwIndex( pTextNd ) ); - return true; // that's it + return; // that's it } pClpDoc->getIDocumentFieldsAccess().LockExpFields(); pClpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::DeleteRedlines ); - bool bRet; // do we want to copy a FlyFrame? if( IsFrameSelected() ) @@ -182,7 +181,6 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) pTextNd->EraseText( rIdx, 1 ); } } - bRet = true; } else if ( IsObjSelected() ) { @@ -223,17 +221,14 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) pClpDoc->getIDocumentLayoutAccess().CopyLayoutFormat( *pFormat, aAnchor, true, true ); } } - bRet = true; } else - bRet = CopySelToDoc( pClpDoc ); // copy the selections + CopySelToDoc( pClpDoc ); // copy the selections pClpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::NONE ); pClpDoc->getIDocumentFieldsAccess().UnlockExpFields(); if( !pClpDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() ) pClpDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true); - - return bRet; } static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt ) @@ -1099,13 +1094,13 @@ bool SwFEShell::Paste( SwDoc* pClpDoc ) return bRet; } -bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage) +void SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage) { Push(); if(!GotoPage(nStartPage)) { Pop(PopMode::DeleteCurrent); - return false; + return; } MovePage( GetThisFrame, GetFirstSub ); SwPaM aCpyPam( *GetCursor()->GetPoint() ); @@ -1117,7 +1112,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 if(!GotoPage(nEndPage)) { Pop(PopMode::DeleteCurrent); - return false; + return; } //if the page starts with a table a paragraph has to be inserted before SwNode* pTableNode = aCpyPam.GetNode().FindTableNode(); @@ -1181,8 +1176,6 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 GetDoc()->getIDocumentFieldsAccess().UpdateFields(false); Pop(PopMode::DeleteCurrent); EndAllAction(); - - return true; } bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 4f07014e2fc8..e965f746160d 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1125,10 +1125,8 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } // Reset attributes contained in the set. -bool SwFEShell::ResetFlyFrameAttr( const SfxItemSet* pSet ) +void SwFEShell::ResetFlyFrameAttr( const SfxItemSet* pSet ) { - bool bRet = false; - SET_CURR_SHELL( this ); SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); @@ -1150,11 +1148,9 @@ bool SwFEShell::ResetFlyFrameAttr( const SfxItemSet* pSet ) pItem = aIter.NextItem(); } - bRet = true; EndAllActionAndCall(); GetDoc()->getIDocumentState().SetModified(); } - return bRet; } // Returns frame-format if frame, otherwise 0 @@ -1743,11 +1739,10 @@ ObjCntType SwFEShell::GetObjCntTypeOfSelection() const return eType; } -bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ) +void SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ) { SET_CURR_SHELL( this ); - bool bRet = false; const SdrMarkList *pMrkList; if( Imp()->HasDrawView() && 1 == ( pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList())->GetMarkCount() ) @@ -1794,9 +1789,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ) EndUndo(); EndAllAction(); - bRet = true; } - return bRet; } static sal_uInt16 SwFormatGetPageNum(const SwFlyFrameFormat * pFormat) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 637a8fd44fa6..f515fb4260c9 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2635,13 +2635,13 @@ bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const return true; } -bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) +void SwFEShell::SetObjAttr( const SfxItemSet& rSet ) { SET_CURR_SHELL( this ); if ( !rSet.Count() ) { OSL_ENSURE( false, "SetObjAttr, empty set." ); - return false; + return; } StartAllAction(); @@ -2658,7 +2658,6 @@ bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) EndUndo( SwUndoId::INSATTR ); EndAllActionAndCall(); GetDoc()->getIDocumentState().SetModified(); - return true; } bool SwFEShell::IsAlignPossible() const diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index e5a7728c9f19..4334c08a76f2 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -167,18 +167,18 @@ void SwFEShell::ParkCursorInTab() } } -bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) +void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table SwFrame *pFrame = GetCurrFrame(); if( !pFrame || !pFrame->IsInTab() ) - return false; + return; if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } SET_CURR_SHELL( this ); @@ -200,26 +200,24 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); - bool bRet = false; if ( aBoxes.size() ) - bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind ); + GetDoc()->InsertRow( aBoxes, nCnt, bBehind ); EndAllActionAndCall(); - return bRet; } -bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) +void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table SwFrame *pFrame = GetCurrFrame(); if( !pFrame || !pFrame->IsInTab() ) - return false; + return; if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } SET_CURR_SHELL( this ); @@ -228,7 +226,7 @@ bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) { ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } StartAllAction(); @@ -238,12 +236,10 @@ bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); - bool bRet = false; if( !aBoxes.empty() ) - bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind ); + GetDoc()->InsertCol( aBoxes, nCnt, bBehind ); EndAllActionAndCall(); - return bRet; } // Determines if the current cursor is in the last row of the table. @@ -309,9 +305,9 @@ bool SwFEShell::DeleteCol() return bRet; } -bool SwFEShell::DeleteTable() +void SwFEShell::DeleteTable() { - return DeleteRow(true); + DeleteRow(true); } bool SwFEShell::DeleteRow(bool bCompleteTable) @@ -464,18 +460,18 @@ TableMergeErr SwFEShell::MergeTab() return nRet; } -bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) +void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) { // check if Point/Mark of current cursor are in a table SwFrame *pFrame = GetCurrFrame(); if( !pFrame || !pFrame->IsInTab() ) - return false; + return; if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } SET_CURR_SHELL( this ); @@ -484,11 +480,10 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) { ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } StartAllAction(); // search boxes via the layout - bool bRet; SwSelBoxes aBoxes; GetTableSel( *this, aBoxes ); if( !aBoxes.empty() ) @@ -496,14 +491,11 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); // now delete the columns - bRet = GetDoc()->SplitTable( aBoxes, bVert, nCnt, bSameHeight ); + GetDoc()->SplitTable( aBoxes, bVert, nCnt, bSameHeight ); ClearFEShellTabCols(*GetDoc(), nullptr); } - else - bRet = false; EndAllActionAndCall(); - return bRet; } void SwFEShell::GetTabCols_(SwTabCols &rToFill, const SwFrame *pBox) const @@ -2162,18 +2154,18 @@ static bool lcl_GoTableRow( SwCursorShell* pShell, bool bUp ) } // change a cell width/cell height/column width/row height -bool SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff ) +void SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff ) { SwFrame *pFrame = GetCurrFrame(); if( !pFrame || !pFrame->IsInTab() ) - return false; + return; if( (TableChgWidthHeightType::InsertDeleteMode & eType) && dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); - return false; + return; } SET_CURR_SHELL( this ); @@ -2264,8 +2256,6 @@ bool SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 default: break; } } - - return bRet; } static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormula& rFormula, @@ -2290,12 +2280,12 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul } // ask formula for auto-sum -bool SwFEShell::GetAutoSum( OUString& rFormula ) const +void SwFEShell::GetAutoSum( OUString& rFormula ) const { SwFrame *pFrame = GetCurrFrame(); SwTabFrame *pTab = pFrame ? pFrame->ImplFindTabFrame() : nullptr; if( !pTab ) - return false; + return; SwCellFrames aCells; OUString sFields; @@ -2384,8 +2374,6 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const { rFormula += "(" + sFields + ")"; } - - return true; } bool SwFEShell::IsTableRightToLeft() const diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index 23615fb0b408..a56971f2ecc0 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -41,7 +41,7 @@ public: void DeleteSection(SwNode* pNode) override; - bool DeleteRange(SwPaM&) override; + void DeleteRange(SwPaM&) override; bool DelFullPara(SwPaM&) override; @@ -89,7 +89,7 @@ public: bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, const SetAttrMode nFlags = SetAttrMode::DEFAULT, bool bExpandCharToPara=false) override; - bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, + void InsertItemSet (const SwPaM &rRg, const SfxItemSet&, const SetAttrMode nFlags = SetAttrMode::DEFAULT) override; void RemoveLeadingWhiteSpace(const SwPosition & rPos ) override; diff --git a/sw/source/core/inc/DocumentFieldsManager.hxx b/sw/source/core/inc/DocumentFieldsManager.hxx index cda9b99421b4..c0dbb6303e60 100644 --- a/sw/source/core/inc/DocumentFieldsManager.hxx +++ b/sw/source/core/inc/DocumentFieldsManager.hxx @@ -41,7 +41,7 @@ public: virtual void RemoveFieldType(size_t nField) override; virtual void UpdateFields(bool bCloseDB) override; virtual void InsDeletedFieldType(SwFieldType &) override; - virtual bool PutValueToField(const SwPosition & rPos, const css::uno::Any& rVal, sal_uInt16 nWhich) override; + virtual void PutValueToField(const SwPosition & rPos, const css::uno::Any& rVal, sal_uInt16 nWhich) override; virtual bool UpdateField(SwTextField * rDstFormatField, SwField & rSrcField, SwMsgPoolItem * pMsgHint, bool bUpdateTableFields) override; virtual void UpdateRefFields() override; virtual void UpdateTableFields(SfxPoolItem* pHt) override; diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index 394c93d67876..174ff7dabeda 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -55,7 +55,7 @@ class SAL_DLLPUBLIC_RTTI SwContentFrame: public SwFrame, public SwFlowFrame const SwContentFrame* ImplGetNextContentFrame( bool bFwd ) const; protected: - bool MakePrtArea( const SwBorderAttrs & ); + void MakePrtArea( const SwBorderAttrs & ); virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 7ecbefc600a9..77c7b9802c80 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -1355,7 +1355,7 @@ public: long BottomDist(const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnBottomDist) (nPos); } long LeftDist (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnLeftDist) (nPos); } long RightDist (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnRightDist) (nPos); } - bool SetLimit (SwFrame& rFrame, long nNew) const { return (rFrame.*m_fnRect->fnSetLimit) (nNew); } + void SetLimit (SwFrame& rFrame, long nNew) const { (rFrame.*m_fnRect->fnSetLimit) (nNew); } bool OverStep (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnOverStep) (nPos); } void SetPos(SwRect& rRect, const Point& rNew) const { (rRect.*m_fnRect->fnSetPos)(rNew); } diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 9a36627ab46a..3912a696ea92 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -170,9 +170,9 @@ public: // #i28701# - method is now public; // delete 2nd parameter, because it's not used; - bool FormatLayoutFly( SwFlyFrame * ); + void FormatLayoutFly( SwFlyFrame * ); // #i28701# - method is now public - bool FormatFlyContent( const SwFlyFrame * ); + void FormatFlyContent( const SwFlyFrame * ); }; diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 7601a9699e73..95ffbee7253c 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -288,7 +288,7 @@ public: /** Marks nCnt kashida positions as invalid pKashidaPositions: array of char indices relative to the paragraph */ - bool MarkKashidasInvalid(sal_Int32 nCnt, const sal_Int32* pKashidaPositions); + void MarkKashidasInvalid(sal_Int32 nCnt, const sal_Int32* pKashidaPositions); /** Marks nCnt kashida positions as invalid in the given text range diff --git a/sw/source/core/inc/sortedobjs.hxx b/sw/source/core/inc/sortedobjs.hxx index 0e9075917e52..0fd6a9cb9d71 100644 --- a/sw/source/core/inc/sortedobjs.hxx +++ b/sw/source/core/inc/sortedobjs.hxx @@ -70,7 +70,7 @@ class SwSortedObjs bool Insert( SwAnchoredObject& _rAnchoredObj ); - bool Remove( SwAnchoredObject& _rAnchoredObj ); + void Remove( SwAnchoredObject& _rAnchoredObj ); bool Contains( const SwAnchoredObject& _rAnchoredObj ) const; @@ -79,7 +79,7 @@ class SwSortedObjs @return boolean, indicating success of the update. */ - bool Update(SwAnchoredObject& _rAnchoredObj); + void Update(SwAnchoredObject& _rAnchoredObj); void UpdateAll(); /** Position of object <_rAnchoredObj> in sorted list diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx index ad1788f3dd83..6d74eba5733f 100644 --- a/sw/source/core/inc/txtfly.hxx +++ b/sw/source/core/inc/txtfly.hxx @@ -254,7 +254,7 @@ public: DrawText() takes over the on optimization! */ - bool DrawTextOpaque( SwDrawTextInfo &rInf ); + void DrawTextOpaque( SwDrawTextInfo &rInf ); /** Two subtleties needs to be mentioned: diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 16f30d320444..af4ab0515fab 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1006,10 +1006,8 @@ bool SwFrame::IsCollapse() const return pTextNode && pTextNode->IsCollapse(); } -bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs ) +void SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs ) { - bool bSizeChgd = false; - if ( !isFramePrintAreaValid() ) { setFramePrintAreaValid(true); @@ -1138,10 +1136,8 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs ) GrowFrame( nUpper ); else ShrinkFrame( -nUpper ); - bSizeChgd = true; } } - return bSizeChgd; } #define STOP_FLY_FORMAT 10 diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 00dde9506a08..c472a90f51ba 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -139,8 +139,8 @@ public: // logging void Record( const SwFrame* pFrame, PROT nFunction, DbgAction nAct, void* pParam ) { if( pStream ) Record_( pFrame, nFunction, nAct, pParam ); } - bool InsertFrame( sal_uInt16 nFrameId ); // take FrameId for logging - bool DeleteFrame( sal_uInt16 nFrameId ); // remove FrameId; don't log him anymore + void InsertFrame( sal_uInt16 nFrameId ); // take FrameId for logging + void DeleteFrame( sal_uInt16 nFrameId ); // remove FrameId; don't log him anymore void FileInit(); // read the INI file void ChkStream() { if( !pStream ) NewStream(); } }; @@ -705,22 +705,21 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, DbgAction nAct, void const * * @param nId new FrameId for logging * @return TRUE if newly added, FALSE if FrameId is already under control */ -bool SwImplProtocol::InsertFrame( sal_uInt16 nId ) +void SwImplProtocol::InsertFrame( sal_uInt16 nId ) { if( !pFrameIds ) pFrameIds = new std::set<sal_uInt16>; if( pFrameIds->count( nId ) ) - return false; + return; pFrameIds->insert( nId ); - return true; } /// Removes a FrameId from the pFrameIds array, so that it won't be logged anymore. -bool SwImplProtocol::DeleteFrame( sal_uInt16 nId ) +void SwImplProtocol::DeleteFrame( sal_uInt16 nId ) { if( !pFrameIds ) - return false; - return pFrameIds->erase(nId) != 0; + return; + pFrameIds->erase(nId); } /* SwEnterLeave::Ctor(..) is called from the (inline-)CTor if the function should diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index af53d9e7a32e..ca12cc96c7da 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1384,12 +1384,12 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa return bChanged || bTabChanged; } -bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly ) +void SwLayAction::FormatLayoutFly( SwFlyFrame* pFly ) { vcl::RenderContext* pRenderContext = m_pImp->GetShell()->GetOut(); OSL_ENSURE( !IsAgain(), "Attention to the invalid page." ); if ( IsAgain() ) - return false; + return; bool bChanged = false; bool bAddRect = true; @@ -1415,7 +1415,7 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly ) } if ( IsAgain() ) - return false; + return; // Now, deal with the lowers that are LayoutFrames bool bTabChanged = false; @@ -1431,7 +1431,6 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly ) } pLow = pLow->GetNext(); } - return bChanged || bTabChanged; } // Implement vertical layout support @@ -1796,9 +1795,7 @@ void SwLayAction::FormatContent_( const SwContentFrame *pContent, const SwPageFr } } -// Returns true if all Contents of the Fly have been processed completely. -// Returns false if processing has been interrupted prematurely. -bool SwLayAction::FormatFlyContent( const SwFlyFrame *pFly ) +void SwLayAction::FormatFlyContent( const SwFlyFrame *pFly ) { const SwContentFrame *pContent = pFly->ContainsContent(); @@ -1828,7 +1825,7 @@ bool SwLayAction::FormatFlyContent( const SwFlyFrame *pFly ) } if ( IsAgain() ) - return false; + return; // If there's input, we interrupt processing. if ( !pFly->IsFlyInContentFrame() ) @@ -1836,13 +1833,11 @@ bool SwLayAction::FormatFlyContent( const SwFlyFrame *pFly ) CheckIdleEnd(); // consider interrupt formatting. if ( IsInterrupt() && !mbFormatContentOnInterrupt ) - return false; + return; } pContent = pContent->GetNextContentFrame(); } CheckWaitCursor(); - // consider interrupt formatting. - return !(IsInterrupt() && !mbFormatContentOnInterrupt); } bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index ec13fdc99ea9..a1977c68b287 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -1056,9 +1056,8 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, bool bWrtMd ) : .ReadUInt16( nMinorVersion ); } -bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) +void SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) { - bool bRes = true; sal_uInt32 nPos = pStream->Tell(); if( bWriteMode ) { @@ -1075,7 +1074,6 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" ); OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" ); aRecords.emplace_back(0, pStream->Tell() ); - bRes = false; bError = true; } else @@ -1084,11 +1082,10 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) aRecords.emplace_back(cRecTyp, nPos+nSize ); } } - return bRes; } // Close record -bool SwLayCacheIoImpl::CloseRec() +void SwLayCacheIoImpl::CloseRec() { bool bRes = true; OSL_ENSURE( !aRecords.empty(), "CloseRec: no levels" ); @@ -1124,8 +1121,6 @@ bool SwLayCacheIoImpl::CloseRec() if( !bRes ) bError = true; - - return bRes; } sal_uInt32 SwLayCacheIoImpl::BytesLeft() diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 51218c35bfbd..162669798f36 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -165,11 +165,11 @@ public: SvStream& GetStream() const { return *pStream; } /// Open a record of type "nType" - bool OpenRec( sal_uInt8 nType ); + void OpenRec( sal_uInt8 nType ); /// Close a record. This skips any unread data that /// remains in the record. - bool CloseRec(); + void CloseRec(); /// Return the number of bytes contained in the current record that /// haven't been read by now. diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx index 9382ac051dd8..40d87c43b7bf 100644 --- a/sw/source/core/layout/sortedobjs.cxx +++ b/sw/source/core/layout/sortedobjs.cxx @@ -224,25 +224,20 @@ bool SwSortedObjs::Insert( SwAnchoredObject& _rAnchoredObj ) return Contains( _rAnchoredObj ); } -bool SwSortedObjs::Remove( SwAnchoredObject& _rAnchoredObj ) +void SwSortedObjs::Remove( SwAnchoredObject& _rAnchoredObj ) { - bool bRet = true; - std::vector< SwAnchoredObject* >::iterator aDelPosIter = std::find( maSortedObjLst.begin(), maSortedObjLst.end(), &_rAnchoredObj ); if ( aDelPosIter == maSortedObjLst.end() ) { // object not found. - bRet = false; OSL_FAIL( "<SwSortedObjs::Remove()> - object not found" ); } else { maSortedObjLst.erase( aDelPosIter ); } - - return bRet; } bool SwSortedObjs::Contains( const SwAnchoredObject& _rAnchoredObj ) const @@ -253,25 +248,23 @@ bool SwSortedObjs::Contains( const SwAnchoredObject& _rAnchoredObj ) const return aIter != maSortedObjLst.end(); } -bool SwSortedObjs::Update( SwAnchoredObject& _rAnchoredObj ) +void SwSortedObjs::Update( SwAnchoredObject& _rAnchoredObj ) { if ( !Contains( _rAnchoredObj ) ) { // given anchored object not found in list OSL_FAIL( "<SwSortedObjs::Update(..) - sorted list doesn't contain given anchored object" ); - return false; + return; } if ( size() == 1 ) { // given anchored object is the only one in the list. - return true; + return; } Remove( _rAnchoredObj ); Insert( _rAnchoredObj ); - - return Contains( _rAnchoredObj ); } void SwSortedObjs::UpdateAll() diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 9960fd863f3c..e9bb428a56ec 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -155,7 +155,7 @@ public: virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( const OUString& rMimeType, const css::uno::Any & rValue ) override; - bool Connect() { return GetRealObject() != nullptr; } + void Connect() { GetRealObject(); } }; SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 276c5f80a30d..7c027284db4c 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -384,9 +384,8 @@ bool SwTaggedPDFHelper::CheckReopenTag() return bRet && !bContinue; } -bool SwTaggedPDFHelper::CheckRestoreTag() const +void SwTaggedPDFHelper::CheckRestoreTag() const { - bool bRet = false; if ( nRestoreCurrentTag != -1 ) { const bool bSuccess = mpPDFExtOutDevData->SetCurrentStructureElement( nRestoreCurrentTag ); @@ -395,11 +394,7 @@ bool SwTaggedPDFHelper::CheckRestoreTag() const #if OSL_DEBUG_LEVEL > 1 aStructStack.pop_back(); #endif - - bRet = true; } - - return bRet; } void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUString& rString ) diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 4fdb596890a8..cb134beb479a 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1929,7 +1929,7 @@ void SwScriptInfo::ClearNoKashidaLine(sal_Int32 nStt, sal_Int32 nLen) } // mark the given character indices as invalid kashida positions -bool SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, const sal_Int32* pKashidaPositions) +void SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, const sal_Int32* pKashidaPositions) { SAL_WARN_IF( !pKashidaPositions || nCnt == 0, "sw.core", "Where are kashidas?" ); @@ -1945,12 +1945,11 @@ bool SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, const sal_Int32* pKashida } if ( pKashidaPositions [nKashidaPosIdx] != GetKashida( nCntKash ) || !IsKashidaValid ( nCntKash ) ) - return false; // something is wrong + return; // something is wrong MarkKashidaInvalid ( nCntKash ); nKashidaPosIdx++; } - return true; } sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rText, long* pKernArray, diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index cf3a49147db0..d15a398ffa43 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -463,7 +463,7 @@ const SwContentFrame* SwTextFly::GetMaster_() return pMaster; } -bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) +void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) { SwSaveClip aClipSave( rInf.GetpOut() ); SwRect aRect( rInf.GetPos(), rInf.GetSize() ); @@ -564,7 +564,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) else rInf.GetFont()->DrawText_( rInf ); rInf.SetPos(aOldPos); - return false; + return; } else if( !aRegion.empty() ) { @@ -582,7 +582,6 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) } } rInf.SetPos(aOldPos); - return true; } void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect ) diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 111c873b352c..bd57ad920f13 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1783,23 +1783,22 @@ bool lcl_IsIgnoredCharFormatForBullets(const sal_uInt16 nWhich) //The node should be counted in a list, if not, make it to be; //The item should not conflict to any exist and non-default item inside the character of specified number rule level; //The item should not be ignored depend on the exact number rule type; -bool SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) +void SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) { - bool bRet = false; SfxItemIter aIter( aCharSet ); const SfxPoolItem* pItem = aIter.FirstItem(); if (!pItem) - return bRet; + return; const sal_uInt16 nWhich = pItem->Which(); const SfxPoolItem& rInnerItem = GetAttr(nWhich,false); if (!IsDefaultItem(&rInnerItem) && !IsInvalidItem(&rInnerItem)) - return bRet; + return; if (!IsInList() && GetNumRule() && !GetListId().isEmpty()) { - return bRet; + return; } SwNumRule* pCurrNum = GetNumRule(false); @@ -1812,9 +1811,9 @@ bool SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) if (pCurrNumFormat) { if (pCurrNumFormat->IsItemize() && lcl_IsIgnoredCharFormatForBullets(nWhich)) - return bRet; + return; if (pCurrNumFormat->IsEnumeration() && SwTextNode::IsIgnoredCharFormatForNumbering(nWhich)) - return bRet; + return; SwCharFormat* pCurrCharFormat =pCurrNumFormat->GetCharFormat(); if (pCurrCharFormat && pCurrCharFormat->GetItemState(nWhich,false) != SfxItemState::SET) @@ -1823,12 +1822,9 @@ bool SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) SwNumFormat aNewNumFormat(*pCurrNumFormat); aNewNumFormat.SetCharFormat(pCurrCharFormat); pCurrNum->Set(nLevel,aNewNumFormat); - bRet = true; } } } - - return bRet; } // Set these attributes on SwTextNode. If they apply to the entire paragraph diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index a977fc3df73c..8433d8292344 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -63,17 +63,15 @@ SwScriptIterator::SwScriptIterator( m_rText, nStt, nCurScript); } -bool SwScriptIterator::Next() +void SwScriptIterator::Next() { assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is()); - bool bRet = false; if (bForward && m_nChgPos >= 0 && m_nChgPos < m_rText.getLength()) { nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText, m_nChgPos); m_nChgPos = g_pBreakIt->GetBreakIter()->endOfScript( m_rText, m_nChgPos, nCurScript); - bRet = true; } else if (!bForward && m_nChgPos > 0) { @@ -82,9 +80,7 @@ bool SwScriptIterator::Next() g_pBreakIt->GetBreakIter()->getScriptType(m_rText, m_nChgPos); m_nChgPos = g_pBreakIt->GetBreakIter()->beginOfScript( m_rText, m_nChgPos, nCurScript); - bRet = true; } - return bRet; } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits