diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 10:28:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 14:47:17 +0200 |
commit | 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch) | |
tree | 616ab419fe0f01e94740de7faacb393775420589 /sw | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (diff) |
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
50 files changed, 87 insertions, 90 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index eb6557db7bea..7e70c1821719 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -3171,7 +3171,7 @@ Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const return aPoint; } -static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, +static long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, long aRefValue, bool bToLower) { long aResult = aCoarseValue; @@ -3190,7 +3190,7 @@ static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, return aResult; } -static inline void lcl_CorrectRectangle(tools::Rectangle & rRect, +static void lcl_CorrectRectangle(tools::Rectangle & rRect, const tools::Rectangle & rSource, const tools::Rectangle & rInGrid) { diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index a7edab8c1452..6084df6abb5a 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -181,7 +181,7 @@ CalcOp* FindOperator( const OUString& rSrch ) OperatorCompare )); } -static inline LanguageType GetDocAppScriptLang( SwDoc const & rDoc ) +static LanguageType GetDocAppScriptLang( SwDoc const & rDoc ) { return static_cast<const SvxLanguageItem&>(rDoc.GetDefault( GetWhichOfScript( RES_CHRATR_LANGUAGE, diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx index 8462cd90f252..a97d1e6bb822 100644 --- a/sw/source/core/bastyp/swregion.cxx +++ b/sw/source/core/bastyp/swregion.cxx @@ -135,7 +135,7 @@ void SwRegionRects::Invert() swap( aInvRegion ); } -static inline SwTwips CalcArea( const SwRect &rRect ) +static SwTwips CalcArea( const SwRect &rRect ) { return rRect.Width() * rRect.Height(); } diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 7971195a6052..4bd824f67f8b 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -46,7 +46,7 @@ #include <editsh.hxx> // for the dump "MSC-" compiler -static inline sal_Int32 GetSttOrEnd( bool bCondition, const SwContentNode& rNd ) +static sal_Int32 GetSttOrEnd( bool bCondition, const SwContentNode& rNd ) { return bCondition ? 0 : rNd.Len(); } diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 359e63319d53..6115e918be4f 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -173,13 +173,13 @@ bool SwCursorShell::GotoFootnoteAnchor() return bRet; } -static inline bool CmpLE( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) +static bool CmpLE( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) { const sal_uLong nTNd = rFootnote.GetTextNode().GetIndex(); return nTNd < nNd || ( nTNd == nNd && rFootnote.GetStart() <= nCnt ); } -static inline bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) +static bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) { const sal_uLong nTNd = rFootnote.GetTextNode().GetIndex(); return nTNd < nNd || ( nTNd == nNd && rFootnote.GetStart() < nCnt ); diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 0fdc1937ecae..6d8a8b8bf5dd 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -187,22 +187,22 @@ namespace } private: - inline void SaveBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreBkmks(SwDoc* pDoc, updater_t const & rUpdater); - inline void SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreRedlines(SwDoc* pDoc, updater_t const & rUpdater); - inline void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); - inline void RestoreFlys(SwDoc* pDoc, updater_t const & rUpdater, bool bAuto); - inline void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreUnoCursors(updater_t const & rUpdater); - inline void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreShellCursors(updater_t const & rUpdater); + void SaveBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreBkmks(SwDoc* pDoc, updater_t const & rUpdater); + void SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreRedlines(SwDoc* pDoc, updater_t const & rUpdater); + void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); + void RestoreFlys(SwDoc* pDoc, updater_t const & rUpdater, bool bAuto); + void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreUnoCursors(updater_t const & rUpdater); + void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreShellCursors(updater_t const & rUpdater); static const SwPosition& GetRightMarkPos(::sw::mark::IMark const * pMark, bool bOther) { return bOther ? pMark->GetOtherMarkPos() : pMark->GetMarkPos(); }; static void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) { bOther ? pMark->SetOtherMarkPos(*pPos) : pMark->SetMarkPos(*pPos); }; }; - inline void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark) + void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark) { const SwPosition* pPos = &rPaM.GetBound(bGetPoint); if( pPos->nNode.GetIndex() == nNode && pPos->nContent.GetIndex() < nContent ) @@ -211,12 +211,12 @@ namespace rPaMEntries.push_back(aEntry); } } - inline void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) + void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) { lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, true, true); lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, false, false); } - inline void lcl_ChkUnoCrsrPaMBoth(std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) + void lcl_ChkUnoCrsrPaMBoth(std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) { lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, true, false); lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, false, true); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 5f94d27311c1..076428024811 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -206,7 +206,7 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) namespace { - inline bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) + bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) { const SwContentNode* pCNd; return 0 == rPos2.nContent.GetIndex() && diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 7782dfe290f6..5fdaa58590e1 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -119,7 +119,7 @@ namespace pMark); } - inline std::unique_ptr<SwPosition> lcl_PositionFromContentNode( + std::unique_ptr<SwPosition> lcl_PositionFromContentNode( SwContentNode * const pContentNode, const bool bAtEnd) { @@ -132,7 +132,7 @@ namespace // else set it to the begin of the Node after rEnd, if there is one // else set it to the end of the node before rStt // else set it to the ContentNode of the Pos outside the Range - inline std::unique_ptr<SwPosition> lcl_FindExpelPosition( + std::unique_ptr<SwPosition> lcl_FindExpelPosition( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, const SwPosition& rOtherPosition) @@ -1205,7 +1205,7 @@ void MarkManager::dumpAsXml(xmlTextWriterPtr pWriter) const namespace { - inline bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) + bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) { return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && rPos.nContent > pIdx->GetIndex() ); } diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index b322e36d7cba..6aadff92cf86 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -912,7 +912,7 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1, namespace { - inline void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData) + void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData) { sal_uLong i = 0; sal_uLong j = 0; diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index c62ceb64cb4b..895d523e0403 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -48,7 +48,7 @@ namespace return pStartNode; } - inline bool lcl_PosCorrAbs(SwPosition & rPos, + bool lcl_PosCorrAbs(SwPosition & rPos, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -61,7 +61,7 @@ namespace return false; }; - inline bool lcl_PaMCorrAbs(SwPaM & rPam, + bool lcl_PaMCorrAbs(SwPaM & rPam, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -72,7 +72,7 @@ namespace return bRet; }; - inline void lcl_PaMCorrRel1(SwPaM * pPam, + void lcl_PaMCorrRel1(SwPaM * pPam, SwNode const * const pOldNode, const SwPosition& rNewPos, const sal_Int32 nCntIdx) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index db1d7351e7c3..3affc7cdd901 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -679,7 +679,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames, namespace { -inline OUString lcl_CutOffDBCommandType(const OUString& rName) +OUString lcl_CutOffDBCommandType(const OUString& rName) { return rName.replaceFirst(OUStringLiteral1(DB_DELIM), ".").getToken(0, DB_DELIM); } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index efd13d4fda10..92a49b7c5205 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -85,7 +85,7 @@ namespace { } } -static inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask ) +static sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask ) { if( 1 < nLevel ) { diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 55e00d45e104..fcc2cef19805 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -25,7 +25,7 @@ using namespace ::editeng; -static inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop ) +static const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop ) { return bTop ? pBox->GetTop() : pBox->GetBottom(); } @@ -110,7 +110,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTableLineBoxes& rCollTL return nLastPos; } -static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox, +static const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox, bool bTop, const SfxPoolItem** ppItem ) { diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index e90b0454aa5a..9b84ca53b1e1 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -84,7 +84,7 @@ using namespace com::sun::star; -static inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) +static bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) { bool bRet = rNd.GetFileFilterNms( &rText, nullptr ); if( bRet ) diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index e37646e8822b..28ec60d97d43 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -774,7 +774,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) } } -static inline bool lcl_IsTOXSection(SwSectionData const& rSectionData) +static bool lcl_IsTOXSection(SwSectionData const& rSectionData) { return (TOX_CONTENT_SECTION == rSectionData.GetType()) || (TOX_HEADER_SECTION == rSectionData.GetType()); diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index c6a6e0a19207..a5ee3f383cce 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -59,7 +59,7 @@ using namespace ::com::sun::star; // See swtable.cxx too #define COLFUZZY 20L -static inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } +static bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } // SwTableLine::ChgFrameFormat may delete old format which doesn't have writer listeners anymore. // This may invalidate my pointers, and lead to use-after-free. For this reason, I register myself @@ -159,7 +159,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, return !rBoxes.empty(); } -static inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine ) +static void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine ) { if( rLineArr.end() == std::find( rLineArr.begin(), rLineArr.end(), pLine ) ) rLineArr.push_back( pLine ); @@ -535,7 +535,7 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) return bRet; } -static inline void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame ) +static void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame ) { if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrame ) ) rCellArr.push_back( pCellFrame ); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index d592796fd248..acafa528ac01 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -815,7 +815,7 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const return pRet; } -static inline bool IsValidNextPrevNd( const SwNode& rNd ) +static bool IsValidNextPrevNd( const SwNode& rNd ) { return SwNodeType::Table == rNd.GetNodeType() || ( SwNodeType::ContentMask & rNd.GetNodeType() ) || diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 8319df67ed10..c37bc375b5da 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1312,7 +1312,7 @@ SwContentNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) return static_cast<SwContentNode*>(pNd); } -static inline bool TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd ) +static bool TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd ) { return nStt < nSttIdx && nEnd >= nSttIdx && nStt < nEndIdx && nEnd >= nEndIdx; diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 6d9bcab5fcc8..36e401a2e4c6 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -55,7 +55,7 @@ // if selection is bigger as max nodes or more than max selections // => no attributes -static inline sal_uInt16 getMaxLookup() +static sal_uInt16 getMaxLookup() { return 1000; } @@ -548,7 +548,7 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus ) EndAllAction(); } -static inline SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType ) +static SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType ) { switch( nType ) { diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 5bf6dd468477..3a21ae2ccdfe 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star; // also see swtable.cxx #define COLFUZZY 20L -static inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } +static bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } class TableWait { diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 0b0de1ed1076..7f9b462159f6 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; namespace { -inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) +SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) { if ( bVert ) { diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 88d7a4e38e2c..e379c01c8375 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2143,7 +2143,7 @@ void SwBorderAttrs::IsLine_() * pre-/succeeding paragraph. */ -static inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 ) +static bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 ) { return ( ((pL1 && pL2) && (*pL1 == *pL2)) || (!pL1 && !pL2) ); } diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index de19e6ffec2e..542247a8500a 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1737,7 +1737,7 @@ void SwFootnoteBossFrame::CollectFootnotes( const SwContentFrame* _pRef, CollectFootnotes_( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrame ); } -static inline void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote ) +static void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote ) { if ( rFootnoteArr.end() == std::find( rFootnoteArr.begin(), rFootnoteArr.end(), pFootnote ) ) rFootnoteArr.push_back( pFootnote ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 487f6247b948..3c621722b3f5 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1591,7 +1591,7 @@ static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, * @param _bBackgrdAlreadyDrawn * boolean (optional; default: false) indicating, if the background is already drawn. */ -static inline void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, +static void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, OutputDevice* _pOut, const SwRect& _rAlignedPaintRect, const GraphicObject& _rGraphicObj, diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 8c8574d3be21..8ca24da7f0ae 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1976,14 +1976,14 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) return bRet; } -static inline void Sub( SwRegionRects& rRegion, const SwRect& rRect ) +static void Sub( SwRegionRects& rRegion, const SwRect& rRect ) { if( rRect.Width() > 1 && rRect.Height() > 1 && rRect.IsOver( rRegion.GetOrigin() )) rRegion -= rRect; } -static inline void Add( SwRegionRects& rRegion, const SwRect& rRect ) +static void Add( SwRegionRects& rRegion, const SwRect& rRect ) { if( rRect.Width() > 1 && rRect.Height() > 1 ) rRegion += rRect; diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 82060a833d06..e77c7a657606 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -265,7 +265,7 @@ namespace { template<class T> -inline T lcl_MulDiv64(sal_uInt64 nA, sal_uInt64 nM, sal_uInt64 nD) +T lcl_MulDiv64(sal_uInt64 nA, sal_uInt64 nM, sal_uInt64 nD) { return static_cast<T>((nA*nM)/nD); } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index da7f5ce7066a..3bee295c6bd9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -173,7 +173,7 @@ static void ChkOutDev( const SwTextSizeInfo &rInf ) } #endif -static inline TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf ) +static TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf ) { const TextFrameIndex nTextLen(rInf.GetText().getLength()); if (rInf.GetLen() == TextFrameIndex(COMPLETE_STRING)) diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 28933fa55922..f0f3646a38da 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -77,7 +77,7 @@ namespace { bool lcl_HasSameBorder(const SwFont& rFirst, const SwFont& rSecond); } -static inline void ClearFly( SwTextFormatInfo &rInf ) +static void ClearFly( SwTextFormatInfo &rInf ) { delete rInf.GetFly(); rInf.SetFly(nullptr); diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index b87396701d8d..a2d8761e968f 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -45,7 +45,7 @@ namespace { // A Follow on the same page as its master is nasty. -inline bool IsNastyFollow( const SwTextFrame *pFrame ) +bool IsNastyFollow( const SwTextFrame *pFrame ) { OSL_ENSURE( !pFrame->IsFollow() || !pFrame->GetPrev() || static_cast<const SwTextFrame*>(pFrame->GetPrev())->GetFollow() == pFrame, diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index e0e6d4223840..d5aa051ef7fb 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3094,7 +3094,7 @@ SwTextAttr * SwTextNode::GetTextAttrForCharAt( namespace { -inline sal_uInt16 lcl_BoundListLevel(const int nActualLevel) +sal_uInt16 lcl_BoundListLevel(const int nActualLevel) { return static_cast<sal_uInt16>( std::min( std::max(nActualLevel, 0), MAXLEVEL-1 ) ); } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index a2c43e2824aa..96b7da931ea1 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -963,7 +963,7 @@ SwFrameProperties_Impl::SwFrameProperties_Impl(): { } -static inline void lcl_FillCol ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pAny) +static void lcl_FillCol ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pAny) { if ( pAny ) { @@ -1027,7 +1027,7 @@ SwGraphicProperties_Impl::SwGraphicProperties_Impl( ) : { } -static inline void lcl_FillMirror ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, bool &rRet ) +static void lcl_FillMirror ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, bool &rRet ) { if(pHEvenMirror || pHOddMirror || pVMirror ) { diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index d16972e71e3c..83bd9f22c850 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1764,7 +1764,7 @@ void SwUnoCursorHelper::SetPropertyValue( // SwUnoCursorHelper::SetTextFormatColl, instead of extending item set. // We need to get them from nodes in next call to GetCursorAttr. // The rest could cause similar problems in theory, so we just list them here. -static inline bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID) +static bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID) { return nWID == FN_UNO_PARA_STYLE || nWID == FN_UNO_CHARFMT_SEQUENCE || diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index ee146bb68d7f..eeb39421f96b 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -87,7 +87,7 @@ using namespace ::com::sun::star::style; namespace { - inline SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc) + SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc) { return pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier(); } diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index a2eec2792551..16756e475729 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -109,7 +109,7 @@ SwRead SwGetReaderXML() // SW_DLLPUBLIC return ReadXML; } -static inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader ) +static void SetFltPtr( sal_uInt16 rPos, SwRead pReader ) { aReaderWriter[ rPos ].pReader = pReader; } diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 65a1ca26e45c..0c9e4a04c63b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6316,7 +6316,7 @@ void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, Fo EmbedFontStyle( name, XML_embedBoldItalic, family, ITALIC_NORMAL, WEIGHT_BOLD, pitch ); } -static inline char toHexChar( int value ) +static char toHexChar( int value ) { return value >= 10 ? value + 'A' - 10 : value + '0'; } diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 819e14c4ef21..6d2ed207fff6 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -101,15 +101,15 @@ void RtfSdrExport::AddShape(sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uI m_nShapeFlags = nShapeFlags; } -static inline sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal) +static sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal) { sal_uInt16 nRet = *pVal++; nRet += (*pVal++) << 8; return nRet; } -static inline sal_Int32 impl_GetPointComponent(const sal_uInt8*& pVal, std::size_t& rVerticesPos, - sal_uInt16 nPointSize) +static sal_Int32 impl_GetPointComponent(const sal_uInt8*& pVal, std::size_t& rVerticesPos, + sal_uInt16 nPointSize) { sal_Int32 nRet = 0; if ((nPointSize == 0xfff0) || (nPointSize == 4)) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 447083d83ab6..02f90c9123fb 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3632,7 +3632,7 @@ void WW8RStyle::ImportSprms(std::size_t nPosFc, short nLen, bool bPap) } } -static inline short WW8SkipOdd(SvStream* pSt ) +static short WW8SkipOdd(SvStream* pSt ) { if ( pSt->Tell() & 0x1 ) { @@ -3642,7 +3642,7 @@ static inline short WW8SkipOdd(SvStream* pSt ) return 0; } -static inline short WW8SkipEven(SvStream* pSt ) +static short WW8SkipEven(SvStream* pSt ) { if (!(pSt->Tell() & 0x1)) { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 3cb699a0a0d3..0547fb105046 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -130,7 +130,7 @@ Color SwWW8ImplReader::GetCol(sal_uInt8 nIco) return nIco < SAL_N_ELEMENTS(eSwWW8ColA) ? eSwWW8ColA[nIco] : COL_AUTO; } -static inline sal_uInt32 MSRoundTweak(sal_uInt32 x) +static sal_uInt32 MSRoundTweak(sal_uInt32 x) { return x; } @@ -1542,7 +1542,7 @@ static void FlySecur1(short& rSize, const bool bBorder) rSize = nMin; } -static inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId ) +static bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId ) { SprmResult aS = pPap->HasSprm(nId); if (aS.pSprm && aS.nRemainingData >= 2) @@ -1550,7 +1550,7 @@ static inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt1 return aS.pSprm != nullptr; } -static inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId ) +static bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId ) { SprmResult aS = pStyle->HasParaSprm(nId); if (aS.pSprm && aS.nRemainingData >= 2) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 13c4999c0f46..0200cc99e4b9 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -838,33 +838,33 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const //-end -static inline sal_uInt8 Get_Byte( sal_uInt8 *& p ) +static sal_uInt8 Get_Byte( sal_uInt8 *& p ) { sal_uInt8 n = *p; p += 1; return n; } -static inline sal_uInt16 Get_UShort( sal_uInt8 *& p ) +static sal_uInt16 Get_UShort( sal_uInt8 *& p ) { const sal_uInt16 n = SVBT16ToShort( *reinterpret_cast<SVBT16*>(p) ); p += 2; return n; } -static inline sal_Int16 Get_Short( sal_uInt8 *& p ) +static sal_Int16 Get_Short( sal_uInt8 *& p ) { return Get_UShort(p); } -static inline sal_uInt32 Get_ULong( sal_uInt8 *& p ) +static sal_uInt32 Get_ULong( sal_uInt8 *& p ) { sal_uInt32 n = SVBT32ToUInt32( *reinterpret_cast<SVBT32*>(p) ); p += 4; return n; } -static inline sal_Int32 Get_Long( sal_uInt8 *& p ) +static sal_Int32 Get_Long( sal_uInt8 *& p ) { return Get_ULong(p); } diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 6fef435bd6a9..8c8b155b3a46 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -75,7 +75,7 @@ using namespace ::com::sun::star; // static data static const sal_uInt16 nVisCols = 3; -static inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) +static bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) { rWrtSh.SwapPam(); bool bRet = pSect == rWrtSh.GetCurrSection(); @@ -348,9 +348,6 @@ SfxItemSet* SwColumnDlg::EvalCurrentSelection(void) } static -#if OSL_DEBUG_LEVEL < 2 -inline -#endif sal_uInt16 GetMaxWidth( SwColMgr const * pColMgr, sal_uInt16 nCols ) { sal_uInt16 nMax = pColMgr->GetActualSize(); diff --git a/sw/source/ui/table/autoformatpreview.cxx b/sw/source/ui/table/autoformatpreview.cxx index f89f33b3396b..d5e13e58b99f 100644 --- a/sw/source/ui/table/autoformatpreview.cxx +++ b/sw/source/ui/table/autoformatpreview.cxx @@ -370,8 +370,8 @@ void AutoFormatPreview::CalcCellArray(bool _bFitWidth) maPreviousSize.setHeight(maArray.GetHeight() + 4); } -static inline void lclSetStyleFromBorder(svx::frame::Style& rStyle, - const ::editeng::SvxBorderLine* pBorder) +static void lclSetStyleFromBorder(svx::frame::Style& rStyle, + const ::editeng::SvxBorderLine* pBorder) { rStyle.Set(pBorder, 0.05, 5); } diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 88caae484258..73b8b52ce965 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -31,7 +31,7 @@ using namespace utl; using namespace com::sun::star::uno; -static inline LanguageType lcl_LanguageOfType(sal_Int16 nType, LanguageType eWestern, LanguageType eCJK, LanguageType eCTL) +static LanguageType lcl_LanguageOfType(sal_Int16 nType, LanguageType eWestern, LanguageType eCJK, LanguageType eCTL) { return nType < FONT_STANDARD_CJK ? eWestern diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 702ea43077cc..61abefb4ffaa 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1070,7 +1070,7 @@ bool SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr return true; } -static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::Reference < XTransferable > &xRef ) +static uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::Reference < XTransferable > &xRef ) { return &xRef; } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 2c2b01533628..9bc9fe208798 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -313,7 +313,7 @@ struct QuickHelpData #define HIT_PIX 2 /* hit tolerance in pixel */ #define MIN_MOVE 4 -static inline bool IsMinMove(const Point &rStartPos, const Point &rLPt) +static bool IsMinMove(const Point &rStartPos, const Point &rLPt) { return std::abs(rStartPos.X() - rLPt.X()) > MIN_MOVE || std::abs(rStartPos.Y() - rLPt.Y()) > MIN_MOVE; @@ -325,7 +325,7 @@ static inline bool IsMinMove(const Point &rStartPos, const Point &rLPt) * in selecting, with DrawObjects; at SwgFlys to trigger * hyperlinks if applicable (Download/NewWindow!) */ -static inline bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) +static bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) { bool bRet = true; SdrObject* pObj; diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index 838789b4b6af..bb1a7191485c 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -33,7 +33,7 @@ using namespace utl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader) +static void lcl_assertEndingItem(xmlreader::XmlReader& reader) { int nsId; xmlreader::Span name; @@ -43,7 +43,7 @@ static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader) (void) res; } -static inline OUString lcl_getValue(xmlreader::XmlReader& reader, +static OUString lcl_getValue(xmlreader::XmlReader& reader, const xmlreader::Span& span) { int nsId; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 30dfbed969c2..52c8a12bd17e 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -364,7 +364,7 @@ static SwWrtShell* lcl_GetShell() return nullptr; } -static inline sal_uInt16 GetPackCount() { return SAL_N_ELEMENTS(aSwFields); } +static sal_uInt16 GetPackCount() { return SAL_N_ELEMENTS(aSwFields); } // FieldManager controls inserting and updating of fields SwFieldMgr::SwFieldMgr(SwWrtShell* pSh ) : diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 111b4e9703a8..8e945ddfc5c3 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -98,7 +98,7 @@ using namespace ::com::sun::star; /// selected text. Or in other words, the language a spell checker would use. /// If there is more than one language LANGUAGE_DONTKNOW will be returned. // check if nScriptType includes the script type associated to nLang -static inline bool lcl_checkScriptType( SvtScriptType nScriptType, LanguageType nLang ) +static bool lcl_checkScriptType( SvtScriptType nScriptType, LanguageType nLang ) { return bool(nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); } diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 60a9bdcb6aa6..5adc7629a37c 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::uno; namespace { -inline OUString lcl_FullPathName(const OUString& sPath, const OUString& sName) +OUString lcl_FullPathName(const OUString& sPath, const OUString& sName) { return sPath + "/" + sName + SwGlossaries::GetExtension(); } diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 061ae5dc1bbc..e52c3c778940 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -70,7 +70,7 @@ bool SwView::IsDocumentBorder() SvxZoomType::PAGEWIDTH_NOBORDER == m_pWrtShell->GetViewOptions()->GetZoomType(); } -static inline long GetLeftMargin( SwView const &rView ) +static long GetLeftMargin( SwView const &rView ) { SvxZoomType eType = rView.GetWrtShell().GetViewOptions()->GetZoomType(); long lRet = rView.GetWrtShell().GetAnyCurRect(CurRectType::PagePrt).Left(); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 59436decddf1..074cb0c23b62 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -45,14 +45,14 @@ inline void SwWrtShell::CloseMark( bool bOkFlag ) namespace { -inline bool isUnicodeVariationSequenceSelector( sal_uInt32 nCode ) +bool isUnicodeVariationSequenceSelector( sal_uInt32 nCode ) { return ( nCode >= 0xFE00 && nCode <= 0xFE0F ) // Variation Selectors block || ( nCode >= 0xE0100 && nCode <= 0xE01EF );// Variation Selectors Supplement block } // Return if the character might be a base character of a CJK ideographic variation sequence -inline bool isCJKIVSCharacters( sal_uInt32 nCode ) +bool isCJKIVSCharacters( sal_uInt32 nCode ) { return ( nCode >= 0x4E00 && nCode <= 0x9FFF ) // CJK Unified Ideographs || ( nCode >= 0x3400 && nCode <= 0x4DBF ) // CJK Unified Ideographs Extension A |