diff options
author | Wastack <btomi96@gmail.com> | 2016-03-31 08:47:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-01 06:46:33 +0000 |
commit | 9af411abce1e22d55b73d5bbac3b7a6a8535eb3b (patch) | |
tree | 1f4ae767e429af067f97bd07c305b1f9ed35839f /sw | |
parent | cb495d71063d60da46215a2510736eccd910fa7a (diff) |
tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks
Change-Id: Ie3160af9decf04ceeda02dc20a6518afaa80f972
Reviewed-on: https://gerrit.libreoffice.org/23677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
28 files changed, 99 insertions, 99 deletions
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 6e969d5e2a3f..bf03a07ae852 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1502,7 +1502,7 @@ OUString SwCalc::GetDBName(const OUString& rName) namespace { - static bool lcl_Str2Double( const OUString& rCommand, sal_Int32& rCommandPos, + bool lcl_Str2Double( const OUString& rCommand, sal_Int32& rCommandPos, double& rVal, const LocaleDataWrapper* const pLclData ) { diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 39d1a480a581..2f3002167b77 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::uno; namespace { - static void lcl_FixPosition(SwPosition& rPos) + void lcl_FixPosition(SwPosition& rPos) { // make sure the position has 1) the proper node, and 2) a proper index SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode(); @@ -64,7 +64,7 @@ namespace } } - static void lcl_AssureFieldMarksSet(Fieldmark* const pField, + void lcl_AssureFieldMarksSet(Fieldmark* const pField, SwDoc* const io_pDoc, const sal_Unicode aStartMark, const sal_Unicode aEndMark) @@ -101,7 +101,7 @@ namespace io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, nullptr); }; - static void lcl_RemoveFieldMarks(Fieldmark* const pField, + void lcl_RemoveFieldMarks(Fieldmark* const pField, SwDoc* const io_pDoc, const sal_Unicode aStartMark, const sal_Unicode aEndMark) diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 9b0b2947c768..1aee7002a4ef 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -53,7 +53,7 @@ namespace static const int BEHIND_SAME_NODE = 3; // Same node index but content index behind given content index static const int BEHIND_NODE = 4; // Position behind the given node index - static int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, sal_Int32 nContent ) + int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, sal_Int32 nContent ) { sal_uLong nIndex = rPos.nNode.GetIndex(); int nReturn = BEFORE_NODE; @@ -187,7 +187,7 @@ namespace static inline void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) { bOther ? pMark->SetOtherMarkPos(*pPos) : pMark->SetMarkPos(*pPos); }; }; - static inline void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bPoint) + inline void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bPoint) { const SwPosition* pPos = &rPaM.GetBound( bPoint ); if( pPos->nNode.GetIndex() == nNode && pPos->nContent.GetIndex() < nContent ) @@ -196,7 +196,7 @@ namespace rPaMEntries.push_back(aEntry); } } - static inline void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) + inline void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) { lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, true); lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, false); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index d54498edfc8b..7dfdd8e52aa4 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -83,7 +83,7 @@ namespace { // Copy method from SwDoc // Prevent copying in Flys that are anchored in the area - static bool lcl_ChkFlyFly( SwDoc* pDoc, sal_uLong nSttNd, sal_uLong nEndNd, + bool lcl_ChkFlyFly( SwDoc* pDoc, sal_uLong nSttNd, sal_uLong nEndNd, sal_uLong nInsNd ) { const SwFrameFormats& rFrameFormatTable = *pDoc->GetSpzFrameFormats(); @@ -134,7 +134,7 @@ namespace nNewIdx is the new position of interest. */ - static void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const sal_uLong nNewIdx, sal_uLong& rDelCount ) + void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const sal_uLong nNewIdx, sal_uLong& rDelCount ) { sal_uLong nStart = rPam.Start()->nNode.GetIndex(); sal_uLong nEnd = rPam.End()->nNode.GetIndex(); @@ -171,7 +171,7 @@ namespace } } - static void lcl_SetCpyPos( const SwPosition& rOrigPos, + void lcl_SetCpyPos( const SwPosition& rOrigPos, const SwPosition& rOrigStt, const SwPosition& rCpyStt, SwPosition& rChgPos, @@ -197,7 +197,7 @@ namespace } // TODO: use SaveBookmark (from _DelBookmarks) - static void lcl_CopyBookmarks( + void lcl_CopyBookmarks( const SwPaM& rPam, SwPaM& rCpyPam ) { @@ -296,7 +296,7 @@ namespace } } - static void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam ) + void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam ) { const SwDoc* pSrcDoc = rPam.GetDoc(); const SwRedlineTable& rTable = pSrcDoc->getIDocumentRedlineAccess().GetRedlineTable(); @@ -376,7 +376,7 @@ namespace } } - static void lcl_DeleteRedlines( const SwNodeRange& rRg, SwNodeRange& rCpyRg ) + void lcl_DeleteRedlines( const SwNodeRange& rRg, SwNodeRange& rCpyRg ) { SwDoc* pSrcDoc = rRg.aStart.GetNode().GetDoc(); if( !pSrcDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) @@ -387,7 +387,7 @@ namespace } } - static void lcl_ChainFormats( SwFlyFrameFormat *pSrc, SwFlyFrameFormat *pDest ) + void lcl_ChainFormats( SwFlyFrameFormat *pSrc, SwFlyFrameFormat *pDest ) { SwFormatChain aSrc( pSrc->GetChain() ); if ( !aSrc.GetNext() ) @@ -404,7 +404,7 @@ namespace } // #i86492# - static bool lcl_ContainsOnlyParagraphsInList( const SwPaM& rPam ) + bool lcl_ContainsOnlyParagraphsInList( const SwPaM& rPam ) { bool bRet = false; @@ -432,7 +432,7 @@ namespace return bRet; } - static bool lcl_MarksWholeNode(const SwPaM & rPam) + bool lcl_MarksWholeNode(const SwPaM & rPam) { bool bResult = false; const SwPosition* pStt = rPam.Start(); @@ -458,7 +458,7 @@ namespace //local functions originally from sw/source/core/doc/docedt.cxx namespace { - static void + void lcl_CalcBreaks( ::std::vector<sal_Int32> & rBreaks, SwPaM const & rPam ) { SwTextNode const * const pTextNode( @@ -486,7 +486,7 @@ namespace } } - static bool lcl_DoWithBreaks(::sw::DocumentContentOperationsManager & rDocumentContentOperations, SwPaM & rPam, + bool lcl_DoWithBreaks(::sw::DocumentContentOperationsManager & rDocumentContentOperations, SwPaM & rPam, bool (::sw::DocumentContentOperationsManager::*pFunc)(SwPaM&, bool), const bool bForceJoinNext = false) { ::std::vector<sal_Int32> Breaks; @@ -532,7 +532,7 @@ namespace return bRet; } - static bool lcl_StrLenOverflow( const SwPaM& rPam ) + bool lcl_StrLenOverflow( const SwPaM& rPam ) { // If we try to merge two paragraphs we have to test if afterwards // the string doesn't exceed the allowed string length @@ -630,7 +630,7 @@ namespace typedef std::vector< _SaveRedline > SaveRedlines_t; - static void lcl_SaveRedlines(const SwPaM& aPam, SaveRedlines_t& rArr) + void lcl_SaveRedlines(const SwPaM& aPam, SaveRedlines_t& rArr) { SwDoc* pDoc = aPam.GetNode().GetDoc(); @@ -696,7 +696,7 @@ namespace pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); } - static void lcl_RestoreRedlines(SwDoc* pDoc, const SwPosition& rPos, SaveRedlines_t& rArr) + void lcl_RestoreRedlines(SwDoc* pDoc, const SwPosition& rPos, SaveRedlines_t& rArr) { RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode(); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); @@ -710,7 +710,7 @@ namespace pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); } - static void lcl_SaveRedlines(const SwNodeRange& rRg, SaveRedlines_t& rArr) + void lcl_SaveRedlines(const SwNodeRange& rRg, SaveRedlines_t& rArr) { SwDoc* pDoc = rRg.aStart.GetNode().GetDoc(); sal_uInt16 nRedlPos; @@ -793,7 +793,7 @@ namespace pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); } - static void lcl_RestoreRedlines(SwDoc *const pDoc, sal_uInt32 const nInsPos, SaveRedlines_t& rArr) + void lcl_RestoreRedlines(SwDoc *const pDoc, sal_uInt32 const nInsPos, SaveRedlines_t& rArr) { RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode(); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); @@ -807,7 +807,7 @@ namespace pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); } - static bool lcl_SaveFootnote( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd, + bool lcl_SaveFootnote( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd, const SwNodeIndex& rInsPos, SwFootnoteIdxs& rFootnoteArr, SwFootnoteIdxs& rSaveArr, const SwIndex* pSttCnt = nullptr, const SwIndex* pEndCnt = nullptr ) @@ -921,7 +921,7 @@ namespace return bUpdateFootnote; } - static bool lcl_MayOverwrite( const SwTextNode *pNode, const sal_Int32 nPos ) + bool lcl_MayOverwrite( const SwTextNode *pNode, const sal_Int32 nPos ) { sal_Unicode const cChr = pNode->GetText()[nPos]; switch (cChr) @@ -938,7 +938,7 @@ namespace } } - static void lcl_SkipAttr( const SwTextNode *pNode, SwIndex &rIdx, sal_Int32 &rStart ) + void lcl_SkipAttr( const SwTextNode *pNode, SwIndex &rIdx, sal_Int32 &rStart ) { if( !lcl_MayOverwrite( pNode, rStart ) ) { @@ -951,7 +951,7 @@ namespace } } - static bool lcl_GetTokenToParaBreak( OUString& rStr, OUString& rRet, bool bRegExpRplc ) + bool lcl_GetTokenToParaBreak( OUString& rStr, OUString& rRet, bool bRegExpRplc ) { if( bRegExpRplc ) { @@ -994,7 +994,7 @@ namespace //local functions originally from docfmt.cxx /// Insert Hints according to content types; // Is used in SwDoc::Insert(..., SwFormatHint &rHt) - static bool lcl_InsAttr( + bool lcl_InsAttr( SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index e071f6f8f839..ea5350fca740 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -57,7 +57,7 @@ namespace { #if HAVE_FEATURE_DBCONNECTIVITY - static OUString lcl_GetDBVarName( SwDoc& rDoc, SwDBNameInfField& rDBField ) + OUString lcl_GetDBVarName( SwDoc& rDoc, SwDBNameInfField& rDBField ) { SwDBData aDBData( rDBField.GetDBData( &rDoc )); OUString sDBNumNm; @@ -77,7 +77,7 @@ namespace #endif - static void lcl_CalcField( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpField& rSGEField, + void lcl_CalcField( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpField& rSGEField, SwDBManager* pMgr ) { const SwTextField* pTextField = rSGEField.GetTextField(); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 58551bd916dc..4c3d9fd63d62 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -112,7 +112,7 @@ using namespace com::sun::star; namespace { - static inline bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) + inline bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) { const SwContentNode* pCNd; return 0 == rPos2.nContent.GetIndex() && @@ -121,7 +121,7 @@ namespace rPos1.nContent.GetIndex() == pCNd->Len(); } - static bool lcl_AcceptRedline( SwRedlineTable& rArr, sal_uInt16& rPos, + bool lcl_AcceptRedline( SwRedlineTable& rArr, sal_uInt16& rPos, bool bCallDelete, const SwPosition* pSttRng = nullptr, const SwPosition* pEndRng = nullptr ) @@ -280,7 +280,7 @@ namespace return bRet; } - static bool lcl_RejectRedline( SwRedlineTable& rArr, sal_uInt16& rPos, + bool lcl_RejectRedline( SwRedlineTable& rArr, sal_uInt16& rPos, bool bCallDelete, const SwPosition* pSttRng = nullptr, const SwPosition* pEndRng = nullptr ) @@ -490,7 +490,7 @@ namespace const SwPosition* pEndRng); - static int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject, + int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject, SwRedlineTable& rArr, bool bCallDelete, const SwPaM& rPam) { @@ -535,7 +535,7 @@ namespace return nCount; } - static void lcl_AdjustRedlineRange( SwPaM& rPam ) + void lcl_AdjustRedlineRange( SwPaM& rPam ) { // The Selection is only in the ContentSection. If there are Redlines // to Non-ContentNodes before or after that, then the Selections diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 6b255e9975a3..a4a31be608fd 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -98,7 +98,7 @@ namespace PT_7, PT_7, PT_7, PT_7, PT_7 // HTML mode }; - static long lcl_GetRightMargin( SwDoc& rDoc ) + long lcl_GetRightMargin( SwDoc& rDoc ) { // Make sure that the printer settings are taken over to the standard // page style @@ -110,7 +110,7 @@ namespace return nWidth - nLeft - nRight; } - static void lcl_SetDfltFont( DefaultFontType nFntType, SfxItemSet& rSet ) + void lcl_SetDfltFont( DefaultFontType nFntType, SfxItemSet& rSet ) { static struct { sal_uInt16 nResLngId; @@ -133,7 +133,7 @@ namespace } } - static void lcl_SetDfltFont( DefaultFontType nLatinFntType, DefaultFontType nCJKFntType, + void lcl_SetDfltFont( DefaultFontType nLatinFntType, DefaultFontType nCJKFntType, DefaultFontType nCTLFntType, SfxItemSet& rSet ) { static struct { @@ -162,7 +162,7 @@ namespace } } - static void lcl_SetHeadline( SwDoc* pDoc, SwTextFormatColl* pColl, + void lcl_SetHeadline( SwDoc* pDoc, SwTextFormatColl* pColl, SfxItemSet& rSet, sal_uInt16 nOutLvlBits, sal_uInt8 nLevel, bool bItalic ) { @@ -220,7 +220,7 @@ namespace pColl->SetNextTextFormatColl( *pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT )); } - static void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, sal_uInt16 nFact, + void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, sal_uInt16 nFact, bool bHeader, bool bTab ) { SvxLRSpaceItem aLR( RES_LR_SPACE ); @@ -244,7 +244,7 @@ namespace } } - static void lcl_SetNumBul( SwDoc* pDoc, SwTextFormatColl* pColl, + void lcl_SetNumBul( SwDoc* pDoc, SwTextFormatColl* pColl, SfxItemSet& rSet, sal_uInt16 nNxt, SwTwips nEZ, SwTwips nLeft, SwTwips nUpper, SwTwips nLower ) @@ -263,7 +263,7 @@ namespace pColl->SetNextTextFormatColl( *pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nNxt )); } - static void lcl_PutStdPageSizeIntoItemSet( SwDoc* pDoc, SfxItemSet& rSet ) + void lcl_PutStdPageSizeIntoItemSet( SwDoc* pDoc, SfxItemSet& rSet ) { SwPageDesc* pStdPgDsc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD ); SwFormatFrameSize aFrameSz( pStdPgDsc->GetMaster().GetFrameSize() ); diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 28de8c47602b..1e5ac689e0ae 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -312,7 +312,7 @@ const struct SwTableEntry NumRuleProgNameTable [] = }; #undef ENTRY -static ::std::vector<OUString>* +::std::vector<OUString>* lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd) { ::std::vector<OUString> *const pNameArray = new ::std::vector<OUString>; @@ -326,7 +326,7 @@ lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd) return pNameArray; } -static ::std::vector<OUString>* +::std::vector<OUString>* lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount) { ::std::vector<OUString> *const pProgNameArray = new ::std::vector<OUString>; @@ -340,7 +340,7 @@ lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount) return pProgNameArray; } -static OUString +OUString lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName ) { const ::std::vector<OUString>& rExtraArr = bIsUIName @@ -367,7 +367,7 @@ lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName ) return rExtraName; } -static bool lcl_SuffixIsUser(const OUString & rString) +bool lcl_SuffixIsUser(const OUString & rString) { const sal_Unicode *pChar = rString.getStr(); sal_Int32 nLen = rString.getLength(); @@ -384,7 +384,7 @@ static bool lcl_SuffixIsUser(const OUString & rString) return bRet; } -static void lcl_CheckSuffixAndDelete(OUString & rString) +void lcl_CheckSuffixAndDelete(OUString & rString) { if (lcl_SuffixIsUser(rString)) { @@ -394,7 +394,7 @@ static void lcl_CheckSuffixAndDelete(OUString & rString) typedef std::tuple<sal_uInt16, sal_uInt16, const std::vector<OUString>& (*)() > NameArrayIndexTuple_t; -static sal_uInt16 lcl_AccumulateIndexCount( sal_uInt16 nSum, const NameArrayIndexTuple_t& tuple ){ +sal_uInt16 lcl_AccumulateIndexCount( sal_uInt16 nSum, const NameArrayIndexTuple_t& tuple ){ // Return running sum + (index end) - (index start) return nSum + std::get<1>( tuple ) - std::get<0>( tuple ); } diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 544f45ac1fc7..d5dafda28ec2 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -57,7 +57,7 @@ using namespace ::sw::mark; namespace { - static bool lcl_GreaterThan( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) + bool lcl_GreaterThan( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) { return pIdx != nullptr ? ( rPos.nNode > rNdIdx @@ -66,7 +66,7 @@ namespace : rPos.nNode >= rNdIdx; } - static bool lcl_Lower( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) + bool lcl_Lower( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) { return rPos.nNode < rNdIdx || ( pIdx != nullptr @@ -74,19 +74,19 @@ namespace && rPos.nContent < pIdx->GetIndex() ); } - static bool lcl_MarkOrderingByStart(const IDocumentMarkAccess::pMark_t& rpFirst, + bool lcl_MarkOrderingByStart(const IDocumentMarkAccess::pMark_t& rpFirst, const IDocumentMarkAccess::pMark_t& rpSecond) { return rpFirst->GetMarkStart() < rpSecond->GetMarkStart(); } - static bool lcl_MarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst, + bool lcl_MarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst, const IDocumentMarkAccess::pMark_t& rpSecond) { return rpFirst->GetMarkEnd() < rpSecond->GetMarkEnd(); } - static void lcl_InsertMarkSorted(IDocumentMarkAccess::container_t& io_vMarks, + void lcl_InsertMarkSorted(IDocumentMarkAccess::container_t& io_vMarks, const IDocumentMarkAccess::pMark_t& pMark) { io_vMarks.insert( @@ -98,7 +98,7 @@ namespace pMark); } - static inline ::std::unique_ptr<SwPosition> lcl_PositionFromContentNode( + inline ::std::unique_ptr<SwPosition> lcl_PositionFromContentNode( SwContentNode * const pContentNode, const bool bAtEnd=false) { @@ -111,7 +111,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 - static inline ::std::unique_ptr<SwPosition> lcl_FindExpelPosition( + inline ::std::unique_ptr<SwPosition> lcl_FindExpelPosition( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, const SwPosition& rOtherPosition) @@ -138,7 +138,7 @@ namespace return ::std::unique_ptr<SwPosition>(new SwPosition(rOtherPosition)); } - static IMark* lcl_getMarkAfter(const IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos) + IMark* lcl_getMarkAfter(const IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos) { IDocumentMarkAccess::const_iterator_t pMarkAfter = upper_bound( rMarks.begin(), @@ -149,7 +149,7 @@ namespace return pMarkAfter->get(); }; - static IMark* lcl_getMarkBefore(const IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos) + IMark* lcl_getMarkBefore(const IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos) { // candidates from which to choose the mark before IDocumentMarkAccess::container_t vCandidates; @@ -172,7 +172,7 @@ namespace return max_element(vCandidates.begin(), vCandidates.end(), &lcl_MarkOrderingByEnd)->get(); } - static bool lcl_FixCorrectedMark( + bool lcl_FixCorrectedMark( const bool bChangedPos, const bool bChangedOPos, MarkBase* io_pMark ) @@ -205,7 +205,7 @@ namespace return false; } - static IDocumentMarkAccess::iterator_t lcl_FindMark( + IDocumentMarkAccess::iterator_t lcl_FindMark( IDocumentMarkAccess::container_t& rMarks, const IDocumentMarkAccess::pMark_t& rpMarkToFind) { @@ -230,7 +230,7 @@ namespace return rMarks.end(); }; - static IDocumentMarkAccess::iterator_t lcl_FindMarkAtPos( + IDocumentMarkAccess::iterator_t lcl_FindMarkAtPos( IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos, const IDocumentMarkAccess::MarkType eType) @@ -258,7 +258,7 @@ namespace return rMarks.end(); }; - static IDocumentMarkAccess::const_iterator_t lcl_FindMarkByName( + IDocumentMarkAccess::const_iterator_t lcl_FindMarkByName( const OUString& rName, IDocumentMarkAccess::const_iterator_t ppMarksBegin, IDocumentMarkAccess::const_iterator_t ppMarksEnd) @@ -1178,7 +1178,7 @@ void MarkManager::dumpAsXml(xmlTextWriterPtr pWriter) const namespace { - static inline bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) + inline 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 9160825fd90a..0e2ee5e37e1e 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -952,7 +952,7 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1, namespace { - static inline void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData* const pOtherData) + inline void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData* const pOtherData) { sal_uLong i = 0; sal_uLong j = 0; @@ -1092,7 +1092,7 @@ bool SwCompareLine::Compare( const SwCompareLine& rLine ) const namespace { - static OUString SimpleTableToText(const SwNode &rNode) + OUString SimpleTableToText(const SwNode &rNode) { OUStringBuffer sRet; const SwNode* pEndNd = rNode.EndOfSectionNode(); diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index b78d308edd46..3b88d7d95440 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -37,7 +37,7 @@ namespace { /// find the relevant section in which the SwUnoCursor may wander. /// returns NULL if no restrictions apply - static const SwStartNode* lcl_FindUnoCursorSection( const SwNode& rNode ) + const SwStartNode* lcl_FindUnoCursorSection( const SwNode& rNode ) { const SwStartNode* pStartNode = rNode.StartOfSectionNode(); while( ( pStartNode != nullptr ) && @@ -48,7 +48,7 @@ namespace return pStartNode; } - static inline bool lcl_PosCorrAbs(SwPosition & rPos, + inline bool lcl_PosCorrAbs(SwPosition & rPos, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -61,7 +61,7 @@ namespace return false; }; - static inline bool lcl_PaMCorrAbs(SwPaM & rPam, + inline bool lcl_PaMCorrAbs(SwPaM & rPam, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -72,7 +72,7 @@ namespace return bRet; }; - static inline void lcl_PaMCorrRel1(SwPaM * pPam, + inline void lcl_PaMCorrRel1(SwPaM * pPam, SwNode const * const pOldNode, const SwPosition& rNewPos, const sal_Int32 nCntIdx) diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 770e91ce5165..b4d652781b7f 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -61,7 +61,7 @@ #include <map> namespace { - static void lcl_ResetIndentAttrs(SwDoc *pDoc, const SwPaM &rPam, sal_uInt16 marker ) + void lcl_ResetIndentAttrs(SwDoc *pDoc, const SwPaM &rPam, sal_uInt16 marker ) { std::set<sal_uInt16> aResetAttrsArray; aResetAttrsArray.insert( marker ); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index bc7b4f8c54e9..95c75a16047d 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1417,7 +1417,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, namespace { - static const SwFormatAnchor* lcl_getAnchorFormat( const SfxPoolItem& _rItem ) + const SwFormatAnchor* lcl_getAnchorFormat( const SfxPoolItem& _rItem ) { sal_uInt16 nWhich = _rItem.Which(); const SwFormatAnchor* pAnchorFormat = nullptr; diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index cafb5c30403d..398c17a884c6 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star; namespace { -static inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) +inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) { if ( bVert ) { diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index ebdf61be2289..b9f8d3038f1b 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -70,15 +70,15 @@ using namespace ::com::sun::star; namespace { //! Calculates and sets optimal repaint offset for the current line - static long lcl_CalcOptRepaint( SwTextFormatter &rThis, + long lcl_CalcOptRepaint( SwTextFormatter &rThis, SwLineLayout &rCurr, const sal_Int32 nOldLineEnd, const std::vector<long> &rFlyStarts ); //! Determine if we need to build hidden portions - static bool lcl_BuildHiddenPortion( const SwTextSizeInfo& rInf, sal_Int32 &rPos ); + bool lcl_BuildHiddenPortion( const SwTextSizeInfo& rInf, sal_Int32 &rPos ); // Check whether the two font has the same border - static bool lcl_HasSameBorder(const SwFont& rFirst, const SwFont& rSecond); + bool lcl_HasSameBorder(const SwFont& rFirst, const SwFont& rSecond); } inline void ClearFly( SwTextFormatInfo &rInf ) diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 1acfb02eeb6a..f13961a3a6f6 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -50,7 +50,7 @@ const OUString S_PAGE_DELI(", "); namespace { -static void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId) +void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId) { rAuthTokens.reserve(9); // Worst case: Start+Sep1+Auth+3*(Sep2+Auth) diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 455ac7254334..fe7c97ce1df6 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -42,7 +42,7 @@ namespace { /// @param[in] pExclude A footnote whose reference number should be excluded from the set. /// @param[out] rUsedRef The set of used reference numbers. /// @param[out] rInvalid A returned list of all items that had an invalid reference number. - static void lcl_FillUsedFootnoteRefNumbers(SwDoc &rDoc, + void lcl_FillUsedFootnoteRefNumbers(SwDoc &rDoc, SwTextFootnote *pExclude, std::set<sal_uInt16> &rUsedRef, std::vector<SwTextFootnote*> &rInvalid) @@ -72,7 +72,7 @@ namespace { /// @param[in] rUsedNums Set of used reference numbers. /// @param[in] requested The requested reference number. /// @returns true if the number is available, false if not. - static bool lcl_IsRefNumAvailable(std::set<sal_uInt16> &rUsedNums, + bool lcl_IsRefNumAvailable(std::set<sal_uInt16> &rUsedNums, sal_uInt16 requested) { if ( USHRT_MAX == requested ) @@ -86,7 +86,7 @@ namespace { /// @param[out] rLowestUnusedNums The lowest unused sequential reference numbers. /// @param[in] rUsedNums The set of used sequential reference numbers. /// @param[in] numRequired The number of reference number required. - static void lcl_FillUnusedSeqRefNums(std::vector<sal_uInt16> &rLowestUnusedNums, + void lcl_FillUnusedSeqRefNums(std::vector<sal_uInt16> &rLowestUnusedNums, const std::set<sal_uInt16> &rUsedNums, size_t numRequired) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index cf08c69ec0f3..d9faf9d104be 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3355,7 +3355,7 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, } namespace { - static void lcl_ResetParAttrs( SwTextNode &rTextNode ) + void lcl_ResetParAttrs( SwTextNode &rTextNode ) { std::set<sal_uInt16> aAttrs; aAttrs.insert( aAttrs.end(), RES_PARATR_LIST_ID ); diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index ca5a12bd86f7..ae9a0a7ffd46 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1025,13 +1025,13 @@ namespace }; template<FlyCntType T> - static uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat) + uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat) { return UnoFrameWrap_traits<T>::wrapFrame(*pFormat); } // runtime adapter for lcl_UnoWrapFrame - static uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat, FlyCntType eType) throw(uno::RuntimeException) + uno::Any lcl_UnoWrapFrame(SwFrameFormat* pFormat, FlyCntType eType) throw(uno::RuntimeException) { switch(eType) { diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 165b1525ef7c..0d3d94926228 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -913,7 +913,7 @@ sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId } namespace { - static void lcl_addShapePropertyEventFactories( SdrObject& _rObj, SwXShape& _rShape ) + void lcl_addShapePropertyEventFactories( SdrObject& _rObj, SwXShape& _rShape ) { svx::PPropertyValueProvider pProvider( new svx::PropertyValueProvider( _rShape, "AnchorType" ) ); _rObj.getShapePropertyChangeNotifier().registerProvider( svx::eTextShapeAnchorType, pProvider ); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index a26e970cccb0..918d1f7b7722 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -131,7 +131,7 @@ namespace typedef std::multiset < SwXBookmarkPortion_ImplSharedPtr, BookmarkCompareStruct > SwXBookmarkPortion_ImplList; /// Inserts pBkmk to rBkmArr in case it starts or ends at nOwnNode - static void lcl_FillBookmark(sw::mark::IMark* const pBkmk, const SwNodeIndex& nOwnNode, SwDoc& rDoc, SwXBookmarkPortion_ImplList& rBkmArr) + void lcl_FillBookmark(sw::mark::IMark* const pBkmk, const SwNodeIndex& nOwnNode, SwDoc& rDoc, SwXBookmarkPortion_ImplList& rBkmArr) { bool const hasOther = pBkmk->IsExpanded(); @@ -175,7 +175,7 @@ namespace } } - static void lcl_FillBookmarkArray(SwDoc& rDoc, SwUnoCursor& rUnoCursor, SwXBookmarkPortion_ImplList& rBkmArr) + void lcl_FillBookmarkArray(SwDoc& rDoc, SwUnoCursor& rUnoCursor, SwXBookmarkPortion_ImplList& rBkmArr) { IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess(); if(!pMarkAccess->getBookmarksCount()) @@ -260,7 +260,7 @@ namespace }; typedef std::multiset < SwAnnotationStartPortion_ImplSharedPtr, AnnotationStartCompareStruct > SwAnnotationStartPortion_ImplList; - static void lcl_FillAnnotationStartArray( + void lcl_FillAnnotationStartArray( SwDoc& rDoc, SwUnoCursor& rUnoCursor, SwAnnotationStartPortion_ImplList& rAnnotationStartArr ) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index ca54e3004ec0..e64c5d6874c8 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2273,7 +2273,7 @@ uno::Reference<table::XCell> SwXTextTable::getCellByPosition(sal_Int32 nColumn, namespace { -static uno::Reference<table::XCellRange> GetRangeByName( +uno::Reference<table::XCellRange> GetRangeByName( SwFrameFormat* pFormat, SwTable* pTable, const OUString& rTLName, const OUString& rBRName, SwRangeDescriptor& rDesc) diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 8fd5335abbc9..84a0622aed69 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -179,7 +179,7 @@ OString lclConvToHex(sal_uInt16 nHex) return OString(aNToABuf, 2); } -static OString lclGetCSS1Color(const Color& rColor) +OString lclGetCSS1Color(const Color& rColor) { return "#" + lclConvToHex(rColor.GetRed()) + lclConvToHex(rColor.GetGreen()) + lclConvToHex(rColor.GetBlue()); } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 792ba9645e3a..0ff7eb307f09 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -322,7 +322,7 @@ namespace /// @param rWrt The containing WW8Export. /// @param pObj pointer to the drawing object. /// @returns The ordering number. - static sal_uLong lcl_getSdrOrderNumber(const WW8Export& rWrt, DrawObj *pObj) + sal_uLong lcl_getSdrOrderNumber(const WW8Export& rWrt, DrawObj *pObj) { return rWrt.GetSdrOrdNum(pObj->maContent.GetFrameFormat()); }; @@ -348,7 +348,7 @@ namespace /// @param rWrt The containing WW8Export. /// @param rSrcArr The source array. /// @param rDstArr The destination array. - static void lcl_makeZOrderArray(const WW8Export& rWrt, + void lcl_makeZOrderArray(const WW8Export& rWrt, std::vector<DrawObj> &rSrcArr, std::vector<DrawObj*> &rDstArr) { diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index a7183f1299d0..7fb511a6f66d 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -60,7 +60,7 @@ namespace { /// @returns A vector containing one element for each item covered by the /// ranges. This is not guaranteed to be sorted and may contain /// duplicates if the original ranges contained overlaps. - static std::vector<sal_uInt16> lcl_convertRangesToList(const sal_uInt16 aRanges[]) { + std::vector<sal_uInt16> lcl_convertRangesToList(const sal_uInt16 aRanges[]) { std::vector<sal_uInt16> aVec; int i = 0; while (aRanges[i]) @@ -83,7 +83,7 @@ namespace { /// is two consecutive entries that specify the start and end /// points of the range. This list will be sorted and will not /// contain any overlapping ranges. - static sal_uInt16* lcl_convertListToRanges(std::vector<sal_uInt16> &rElements) { + sal_uInt16* lcl_convertListToRanges(std::vector<sal_uInt16> &rElements) { std::sort(rElements.begin(), rElements.end()); std::vector<sal_uInt16> aRanges; size_t i; diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 745399066df8..c623d484a117 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -123,7 +123,7 @@ using namespace ::com::sun::star; namespace { - static bool lcl_hasAllComponentsAvailable() + bool lcl_hasAllComponentsAvailable() { try { diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 25f706049841..54ccf57235d8 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -60,7 +60,7 @@ using namespace drawinglayer::attribute; namespace { - static basegfx::BColor lcl_GetFillColor(const basegfx::BColor& rLineColor) + basegfx::BColor lcl_GetFillColor(const basegfx::BColor& rLineColor) { basegfx::BColor aHslLine = basegfx::tools::rgb2hsl(rLineColor); double nLuminance = aHslLine.getZ() * 2.5; @@ -72,7 +72,7 @@ namespace return basegfx::tools::hsl2rgb( aHslLine ); } - static basegfx::BColor lcl_GetLighterGradientColor(const basegfx::BColor& rDarkColor) + basegfx::BColor lcl_GetLighterGradientColor(const basegfx::BColor& rDarkColor) { basegfx::BColor aHslDark = basegfx::tools::rgb2hsl(rDarkColor); double nLuminance = aHslDark.getZ() * 255 + 20; @@ -80,7 +80,7 @@ namespace return basegfx::tools::hsl2rgb( aHslDark ); } - static B2DPolygon lcl_GetPolygon( const Rectangle& rRect, bool bHeader ) + B2DPolygon lcl_GetPolygon( const Rectangle& rRect, bool bHeader ) { const double nRadius = 3; const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index ae0bf5c2a009..b1668522694d 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -118,17 +118,17 @@ bool SwContentTree::bIsInDrag = false; namespace { - static bool lcl_IsContent(const SvTreeListEntry* pEntry) + bool lcl_IsContent(const SvTreeListEntry* pEntry) { return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CNT; } - static bool lcl_IsContentType(const SvTreeListEntry* pEntry) + bool lcl_IsContentType(const SvTreeListEntry* pEntry) { return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CTT; } - static bool lcl_FindShell(SwWrtShell* pShell) + bool lcl_FindShell(SwWrtShell* pShell) { bool bFound = false; SwView *pView = SwModule::GetFirstView(); @@ -144,7 +144,7 @@ namespace return bFound; } - static bool lcl_IsUiVisibleBookmark(const IDocumentMarkAccess::pMark_t& rpMark) + bool lcl_IsUiVisibleBookmark(const IDocumentMarkAccess::pMark_t& rpMark) { return IDocumentMarkAccess::GetType(*rpMark) == IDocumentMarkAccess::MarkType::BOOKMARK; } |