summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-15 19:13:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-09-17 09:05:38 +0200
commit206b5b2661be37efdff3c6aedb6f248c4636be79 (patch)
treeaf385e5b4725dcfea23988d9113cced8e9ccaf3c /sw/source
parenta85d3ba1c0de313b60324b9ecfa488bb99d69d06 (diff)
New loplugin:external
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accpara.cxx4
-rw-r--r--sw/source/core/bastyp/calc.cxx2
-rw-r--r--sw/source/core/bastyp/swregion.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx2
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/crsr/pam.cxx2
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx4
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/docglbl.cxx8
-rw-r--r--sw/source/core/doc/docnum.cxx2
-rw-r--r--sw/source/core/doc/docredln.cxx2
-rw-r--r--sw/source/core/doc/gctable.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx4
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx10
-rw-r--r--sw/source/core/docnode/node.cxx18
-rw-r--r--sw/source/core/docnode/node2lay.cxx4
-rw-r--r--sw/source/core/docnode/nodes.cxx4
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx22
-rw-r--r--sw/source/core/edit/edtab.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx6
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/core/layout/hffrm.cxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx8
-rw-r--r--sw/source/core/layout/tabfrm.cxx4
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/layout/virtoutp.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx6
-rw-r--r--sw/source/core/text/frmform.cxx2
-rw-r--r--sw/source/core/text/frminf.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx4
-rw-r--r--sw/source/core/text/itratr.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx6
-rw-r--r--sw/source/core/text/porlin.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx4
-rw-r--r--sw/source/core/text/txtftn.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/txtnode/swfont.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/core/unocore/unoidx.cxx6
-rw-r--r--sw/source/core/unocore/unoobj.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx8
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx8
-rw-r--r--sw/source/filter/html/htmlatr.cxx4
-rw-r--r--sw/source/filter/html/htmlftn.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx6
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx6
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx20
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx18
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx2
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx3
-rw-r--r--sw/source/ui/table/autoformatpreview.cxx4
-rw-r--r--sw/source/ui/vba/vbaborders.cxx2
-rw-r--r--sw/source/ui/vba/vbavariables.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.cxx4
-rw-r--r--sw/source/uibase/uiview/viewport.cxx4
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx6
97 files changed, 205 insertions, 202 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8d7b01d4da53..c7bd35214480 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1066,7 +1066,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNam
return aRet;
}
-uno::Sequence< OUString > const & getAttributeNames()
+static uno::Sequence< OUString > const & getAttributeNames()
{
static uno::Sequence< OUString >* pNames = nullptr;
@@ -1099,7 +1099,7 @@ uno::Sequence< OUString > const & getAttributeNames()
return *pNames;
}
-uno::Sequence< OUString > const & getSupplementalAttributeNames()
+static uno::Sequence< OUString > const & getSupplementalAttributeNames()
{
static uno::Sequence< OUString >* pNames = nullptr;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 73d0a5050f93..770dffbf47c8 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 ));
}
-inline LanguageType GetDocAppScriptLang( SwDoc const & rDoc )
+static inline 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 cd87db46817a..8462cd90f252 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -135,7 +135,7 @@ void SwRegionRects::Invert()
swap( aInvRegion );
}
-inline SwTwips CalcArea( const SwRect &rRect )
+static inline SwTwips CalcArea( const SwRect &rRect )
{
return rRect.Width() * rRect.Height();
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index e65bafc8fec8..6dc236921d9b 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -79,7 +79,7 @@ using namespace util;
* Check if pCurrentCursor points into already existing ranges and delete those.
* @param Pointer to SwCursor object
*/
-void CheckRange( SwCursor* pCurrentCursor )
+static void CheckRange( SwCursor* pCurrentCursor )
{
const SwPosition *pStt = pCurrentCursor->Start(),
*pEnd = pCurrentCursor->GetPoint() == pStt ? pCurrentCursor->GetMark() : pCurrentCursor->GetPoint();
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index ac00e8742990..5c74dd1eccaf 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -638,7 +638,7 @@ const SwTOXMark& SwCursorShell::GotoTOXMark( const SwTOXMark& rStart,
}
/// jump to next/previous field type
-void lcl_MakeFieldLst(
+static void lcl_MakeFieldLst(
SetGetExpFields& rLst,
const SwFieldType& rFieldType,
const bool bInReadOnly,
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 31d299a34fba..d0b38b1288df 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::util;
typedef std::set<SwFormat*> SwpFormats;
// Special case for SvxFontItem: only compare the name
-bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
+static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
{
switch( rItem1.Which() )
{
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 243699f5de91..4417ed395f48 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -197,7 +197,7 @@ lcl_CleanStr(const SwTextNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
}
// skip all non SwPostIts inside the array
-size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts)
+static size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts)
{
size_t aIndex = 0;
while (aCount)
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 9f5fc230841a..31e54222d064 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
-inline sal_Int32 GetSttOrEnd( bool bCondition, const SwContentNode& rNd )
+static inline 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 c0fa6a288320..b488f6b426d3 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -162,13 +162,13 @@ bool SwCursorShell::GotoFootnoteAnchor()
return bRet;
}
-inline bool CmpLE( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt )
+static inline 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 );
}
-inline bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt )
+static inline 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/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index aafd5fffab7f..d397be625b26 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -2538,7 +2538,7 @@ std::vector<OUString> *SwStyleNameMapper::s_pTextUINameArray = nullptr,
*SwStyleNameMapper::s_pTableStyleUINameArray = nullptr,
*SwStyleNameMapper::s_pCellStyleUINameArray = nullptr;
-std::vector<OUString>*
+static std::vector<OUString>*
lcl_NewUINameArray(const char** pIds, const size_t nLen, const size_t nSvxIds = 0)
{
assert(nSvxIds <= nLen);
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index bf51116f14c6..a670fc83ded4 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -92,7 +92,7 @@ const char * dbg_out(const OUString & aStr)
return aDbgOutResult.getStr();
}
-map<sal_uInt16,OUString> & GetItemWhichMap()
+static map<sal_uInt16,OUString> & GetItemWhichMap()
{
static map<sal_uInt16,OUString> aItemWhichMap;
static bool bInitialized = false;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 4484ff45dd2c..3ddbf4bc96ad 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -84,7 +84,7 @@ bool SwDoc::GenerateHTMLDoc( const OUString& rPath,
}
// two helpers for outline mode
-SwNodePtr GetStartNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl )
+static SwNodePtr GetStartNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl )
{
SwNodePtr pNd;
@@ -97,7 +97,7 @@ SwNodePtr GetStartNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOu
return nullptr;
}
-SwNodePtr GetEndNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl )
+static SwNodePtr GetEndNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl )
{
SwNodePtr pNd;
@@ -117,7 +117,7 @@ SwNodePtr GetEndNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutl
}
// two helpers for collection mode
-SwNodePtr GetStartNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pSplitColl, SwOutlineNodes::size_type* nOutl )
+static SwNodePtr GetStartNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pSplitColl, SwOutlineNodes::size_type* nOutl )
{
SwNodePtr pNd;
for( ; *nOutl < pOutlNds->size(); ++(*nOutl) )
@@ -130,7 +130,7 @@ SwNodePtr GetStartNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl*
return nullptr;
}
-SwNodePtr GetEndNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pSplitColl, SwOutlineNodes::size_type* nOutl )
+static SwNodePtr GetEndNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pSplitColl, SwOutlineNodes::size_type* nOutl )
{
SwNodePtr pNd;
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 1b975dc48942..4300f5a3c2c8 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -85,7 +85,7 @@ namespace {
}
}
-inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask )
+static inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask )
{
if( 1 < nLevel )
{
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index e023f77f11ac..e8ad85df185d 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -107,7 +107,7 @@ void SwExtraRedlineTable::dumpAsXml(xmlTextWriterPtr pWriter) const
}
#if OSL_DEBUG_LEVEL > 0
-bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
+static bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
{
int nError = 0;
SwNode* pSttNode = &pStt->nNode.GetNode();
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index aeab4b21521a..55e00d45e104 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -25,7 +25,7 @@
using namespace ::editeng;
-inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop )
+static inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop )
{
return bTop ? pBox->GetTop() : pBox->GetBottom();
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 5755a37472bc..b0c228967859 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -83,7 +83,7 @@
using namespace com::sun::star;
-inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText )
+static inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText )
{
bool bRet = rNd.GetFileFilterNms( &rText, nullptr );
if( bRet )
@@ -880,7 +880,7 @@ static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInAr
}
}
-bool paintUsingPrimitivesHelper(
+static bool paintUsingPrimitivesHelper(
vcl::RenderContext& rOutputDevice,
const drawinglayer::primitive2d::Primitive2DContainer& rSequence,
const basegfx::B2DRange& rSourceRange,
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 9551e4480f9d..384ae1e3adbe 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -469,7 +469,7 @@ static void lcl_InsCol( FndLine_* pFndLn, CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
}
}
-SwRowFrame* GetRowFrame( SwTableLine& rLine )
+static SwRowFrame* GetRowFrame( SwTableLine& rLine )
{
SwIterator<SwRowFrame,SwFormat> aIter( *rLine.GetFrameFormat() );
for( SwRowFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
@@ -2825,7 +2825,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
// SwComparePosition::Equal, // Box and start/end are the same
// SwComparePosition::OverlapBefore, // Box overlapps the start
// SwComparePosition::OverlapBehind // Box overlapps the end
-SwComparePosition CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
+static SwComparePosition CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
sal_uInt16 nBoxStt, sal_uInt16 nBoxEnd )
{
// Still treat COLFUZZY!
@@ -3898,7 +3898,7 @@ static FndBox_* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
return pFndBox;
}
-void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
+static void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
bool bMinSize )
{
SwLayoutFrame* pLineFrame = GetRowFrame( rLine );
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index acd112c17c2b..45fce1328985 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -258,7 +258,7 @@ SwFrameFormat* SwTextBoxHelper::getOtherTextBoxFormat(uno::Reference<drawing::XS
return getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
}
-template <typename T> void lcl_queryInterface(SwFrameFormat* pShape, uno::Any& rAny)
+template <typename T> static void lcl_queryInterface(SwFrameFormat* pShape, uno::Any& rAny)
{
if (SwFrameFormat* pFormat = SwTextBoxHelper::getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT))
{
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index ff35893cd1e2..fabde76a4c80 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
-inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; }
+static inline 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
@@ -157,7 +157,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
return !rBoxes.empty();
}
-inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine )
+static inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine )
{
if( rLineArr.end() == std::find( rLineArr.begin(), rLineArr.end(), pLine ) )
rLineArr.push_back( pLine );
@@ -186,9 +186,9 @@ struct LinesAndTable
m_rLines(rL), m_rTable(rTable), m_bInsertLines(true) {}
};
-bool FindLine_( FndLine_ & rLine, LinesAndTable* pPara );
+static bool FindLine_( FndLine_ & rLine, LinesAndTable* pPara );
-bool FindBox_( FndBox_ & rBox, LinesAndTable* pPara )
+static bool FindBox_( FndBox_ & rBox, LinesAndTable* pPara )
{
if (!rBox.GetLines().empty())
{
@@ -533,7 +533,7 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill )
return bRet;
}
-inline void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame )
+static inline 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 66bd7395d990..069e9bc9f9e3 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -84,7 +84,7 @@ using namespace ::com::sun::star::i18n;
namespace AttrSetHandleHelper
{
-void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode,
SwAttrSet const & rNewAttrSet )
{
@@ -99,7 +99,7 @@ void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet,
rNode.SetModifyAtAttr( bSetModifyAtAttr );
}
-void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode,
const SwFormat* pParentFormat,
const SwFormat* pConditionalFormat )
@@ -135,7 +135,7 @@ void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
}
}
-const SfxPoolItem* Put( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static const SfxPoolItem* Put( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode,
const SfxPoolItem& rAttr )
{
@@ -146,7 +146,7 @@ const SfxPoolItem* Put( std::shared_ptr<const SfxItemSet>& rpAttrSet,
return pRet;
}
-bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNode,
+static bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNode,
const SfxItemSet& rSet )
{
SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
@@ -173,7 +173,7 @@ bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNo
return bRet;
}
-bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode, const SfxPoolItem& rAttr,
SwAttrSet* pOld, SwAttrSet* pNew )
{
@@ -192,7 +192,7 @@ bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
return bRet;
}
-bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode, const SfxItemSet& rSet,
SwAttrSet* pOld, SwAttrSet* pNew )
{
@@ -225,7 +225,7 @@ bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
return bRet;
}
-sal_uInt16 ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static sal_uInt16 ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode, sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
@@ -238,7 +238,7 @@ sal_uInt16 ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
return nRet;
}
-sal_uInt16 ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
+static sal_uInt16 ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
const SwContentNode& rNode,
sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
@@ -814,7 +814,7 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
return pRet;
}
-inline bool IsValidNextPrevNd( const SwNode& rNd )
+static inline bool IsValidNextPrevNd( const SwNode& rNd )
{
return SwNodeType::Table == rNd.GetNodeType() ||
( SwNodeType::ContentMask & rNd.GetNodeType() ) ||
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 8957ca5780a7..f9cb83687a43 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -57,7 +57,7 @@ public:
SwFrame* GetFrame( const Point* pDocPos ) const;
};
-SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx)
+static SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx)
{
if( pIdx->GetIndex() >= rNodes.Count() - 1 )
return nullptr;
@@ -91,7 +91,7 @@ SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx)
return pNd;
}
-SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx)
+static SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx)
{
if( !pIdx->GetIndex() )
return nullptr;
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index e23f6b549847..55ad45d2b361 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -49,7 +49,7 @@
typedef std::vector<SwStartNode*> SwSttNdPtrs;
// function to determine the highest level in the given range
-sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
+static sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
/** Constructor
*
@@ -1312,7 +1312,7 @@ SwContentNode* SwNodes::GoPrevious(SwNodeIndex *pIdx)
return static_cast<SwContentNode*>(pNd);
}
-inline bool TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd )
+static inline 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/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index efe04fe60bc1..71a72a92d866 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1068,7 +1068,7 @@ class NestedUserCallHdl
};
/// Notify the format's textbox that it should reconsider its position / size.
-void lcl_textBoxSizeNotify(SwFrameFormat* pFormat)
+static void lcl_textBoxSizeNotify(SwFrameFormat* pFormat)
{
if (SwTextBoxHelper::isTextBox(pFormat, RES_DRAWFRMFMT))
{
@@ -2044,7 +2044,7 @@ namespace sdr
namespace contact
{
/// recursively collect primitive data from given VOC with given offset
- void impAddPrimitivesFromGroup(const ViewObjectContact& rVOC, const basegfx::B2DHomMatrix& rOffsetMatrix, const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DContainer& rxTarget)
+ static void impAddPrimitivesFromGroup(const ViewObjectContact& rVOC, const basegfx::B2DHomMatrix& rOffsetMatrix, const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DContainer& rxTarget)
{
const sal_uInt32 nSubHierarchyCount(rVOC.GetViewContact().GetObjectCount());
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 5ead2c022ca4..4a173ffa8dcf 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -93,7 +93,7 @@ SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, size_t nObjNum )
return FmFormPage::ReplaceObject( pNewObj, nObjNum );
}
-void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrame *pPg )
+static void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrame *pPg )
{
SwRect aPrt( pPg->getFramePrintArea() );
aPrt += pPg->getFrameArea().Pos();
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 94c384b57486..aeccb79f030e 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -130,7 +130,7 @@ bool SwDrawView::IsAntiAliasing() const
return getOptionsDrawinglayer().IsAntiAliasing();
}
-SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol, const SdrMarkList &rMrkList)
+static SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol, const SdrMarkList &rMrkList)
{
if(!nTol)
{
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 26e2593c9ca2..2328bf1fe205 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -217,7 +217,7 @@ public:
SwNodeIndex const * pSttNd = nullptr, SwNodeIndex const * pEndNd = nullptr );
};
-const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
+static const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
{
while( *pSrc && *pSrc != c )
++pSrc;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 4666ca93aaf0..3e1d3a74c778 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -691,7 +691,7 @@ SwTextFormatColl& SwEditShell::GetTextFormatColl(sal_uInt16 nFormatColl) const
return *((*(GetDoc()->GetTextFormatColls()))[nFormatColl]);
}
-void insertFieldToDocument(uno::Reference<lang::XMultiServiceFactory> const & rxMultiServiceFactory,
+static void insertFieldToDocument(uno::Reference<lang::XMultiServiceFactory> const & rxMultiServiceFactory,
uno::Reference<text::XText> const & rxText, uno::Reference<text::XParagraphCursor> const & rxParagraphCursor,
OUString const & rsKey)
{
@@ -702,7 +702,7 @@ void insertFieldToDocument(uno::Reference<lang::XMultiServiceFactory> const & rx
rxText->insertTextContent(rxParagraphCursor, xTextContent, false);
}
-void removeAllClassificationFields(OUString const & rPolicy, uno::Reference<text::XText> const & rxText)
+static void removeAllClassificationFields(OUString const & rPolicy, uno::Reference<text::XText> const & rxText)
{
uno::Reference<container::XEnumerationAccess> xParagraphEnumerationAccess(rxText, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParagraphs = xParagraphEnumerationAccess->createEnumeration();
@@ -735,7 +735,7 @@ void removeAllClassificationFields(OUString const & rPolicy, uno::Reference<text
}
}
-sal_Int32 getNumberOfParagraphs(uno::Reference<text::XText> const & xText)
+static sal_Int32 getNumberOfParagraphs(uno::Reference<text::XText> const & xText)
{
uno::Reference<container::XEnumerationAccess> xParagraphEnumAccess(xText, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParagraphEnum = xParagraphEnumAccess->createEnumeration();
@@ -748,7 +748,7 @@ sal_Int32 getNumberOfParagraphs(uno::Reference<text::XText> const & xText)
return nResult;
}
-void equaliseNumberOfParagraph(std::vector<svx::ClassificationResult> const & rResults, uno::Reference<text::XText> const & xText)
+static void equaliseNumberOfParagraph(std::vector<svx::ClassificationResult> const & rResults, uno::Reference<text::XText> const & xText)
{
sal_Int32 nNumberOfParagraphs = 0;
for (svx::ClassificationResult const & rResult : rResults)
@@ -1145,7 +1145,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli
}
}
-void lcl_ApplyParagraphClassification(SwDoc* pDoc,
+static void lcl_ApplyParagraphClassification(SwDoc* pDoc,
const uno::Reference<frame::XModel>& xModel,
const uno::Reference<text::XTextContent>& xParent,
std::vector<svx::ClassificationResult> aResults)
@@ -1273,7 +1273,7 @@ void SwEditShell::ApplyParagraphClassification(std::vector<svx::ClassificationRe
lcl_ApplyParagraphClassification(GetDoc(), xModel, xParent, std::move(aResults));
}
-std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification(const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph)
+static std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification(const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph)
{
std::vector<svx::ClassificationResult> aResult;
@@ -1348,7 +1348,7 @@ std::vector<svx::ClassificationResult> SwEditShell::CollectParagraphClassificati
return lcl_CollectParagraphClassification(xModel, xParent);
}
-sal_Int16 lcl_GetAngle(const drawing::HomogenMatrix3& rMatrix)
+static sal_Int16 lcl_GetAngle(const drawing::HomogenMatrix3& rMatrix)
{
basegfx::B2DHomMatrix aTransformation;
basegfx::B2DTuple aScale;
@@ -1427,7 +1427,7 @@ SfxWatermarkItem SwEditShell::GetWatermark()
return SfxWatermarkItem();
}
-void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
+static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
const uno::Reference<frame::XModel>& xModel,
const uno::Reference<beans::XPropertySet>& xPageStyle,
const uno::Reference<text::XText>& xHeaderText)
@@ -1859,7 +1859,7 @@ void SwEditShell::ValidateAllParagraphSignatures(bool updateDontRemove)
}
}
-uno::Reference<text::XTextField> lcl_GetParagraphMetadataFieldAtIndex(const SwDocShell* pDocSh, SwTextNode const * pNode, const sal_uLong index)
+static uno::Reference<text::XTextField> lcl_GetParagraphMetadataFieldAtIndex(const SwDocShell* pDocSh, SwTextNode const * pNode, const sal_uLong index)
{
uno::Reference<text::XTextField> xTextField;
if (pNode != nullptr && pDocSh != nullptr)
@@ -2050,7 +2050,7 @@ bool SwEditShell::RemoveParagraphMetadataFieldAtCursor()
return false;
}
-OUString lcl_GetParagraphClassification(SfxClassificationHelper & rHelper, sfx::ClassificationKeyCreator const & rKeyCreator,
+static OUString lcl_GetParagraphClassification(SfxClassificationHelper & rHelper, sfx::ClassificationKeyCreator const & rKeyCreator,
const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph)
{
uno::Reference<text::XTextField> xTextField;
@@ -2071,7 +2071,7 @@ OUString lcl_GetParagraphClassification(SfxClassificationHelper & rHelper, sfx::
return OUString();
}
-OUString lcl_GetHighestClassificationParagraphClass(SwPaM* pCursor)
+static OUString lcl_GetHighestClassificationParagraphClass(SwPaM* pCursor)
{
OUString sHighestClass;
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 28a5c05be494..c9432dd78015 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -54,9 +54,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
//Added for bug #i119954# Application crashed if undo/redo covert nest table to text
-bool ConvertTableToText( const SwTableNode *pTableNode, sal_Unicode cCh );
+static bool ConvertTableToText( const SwTableNode *pTableNode, sal_Unicode cCh );
-void ConvertNestedTablesToText( const SwTableLines &rTableLines, sal_Unicode cCh )
+static void ConvertNestedTablesToText( const SwTableLines &rTableLines, sal_Unicode cCh )
{
for (size_t n = 0; n < rTableLines.size(); ++n)
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 293ec2667ac6..9d68652b0573 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -135,7 +135,7 @@ OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
return sRes;
}
-SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
+static SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
const SwContentFrame *pCFrame, Point &rPt )
{
SwTextNode* pTextNode = nullptr;
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index fd19f87419e7..a46593d2a12b 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
-inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; }
+static inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; }
class TableWait
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 158ac489ecb1..da6d31b63d96 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1069,7 +1069,7 @@ static bool IsShown(sal_uLong const nIndex,
}
}
-void AppendObjsOfNode(SwFrameFormats const*const pTable, sal_uLong const nIndex,
+static void AppendObjsOfNode(SwFrameFormats const*const pTable, sal_uLong const nIndex,
SwFrame *const pFrame, SwPageFrame *const pPage, SwDoc *const pDoc,
std::vector<sw::Extent>::const_iterator *const pIter,
std::vector<sw::Extent>::const_iterator const*const pEnd)
@@ -1159,7 +1159,7 @@ void AppendObjs(const SwFrameFormats *const pTable, sal_uLong const nIndex,
}
}
-void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib)
+static void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib)
{
//Connecting of all Objects, which are described in the SpzTable with the
//layout.
@@ -2047,7 +2047,7 @@ void SwBorderAttrs::IsLine_()
* pre-/succeeding paragraph.
*/
-inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 )
+static inline 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 ed003618424e..0f3be5c45aaf 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1733,7 +1733,7 @@ void SwFootnoteBossFrame::CollectFootnotes( const SwContentFrame* _pRef,
CollectFootnotes_( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrame );
}
-inline void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote )
+static inline 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/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 26f8ea1a1f4f..da3442879815 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -660,7 +660,7 @@ bool SwHeadFootFrame::GetEatSpacing() const
return pFormat->GetHeaderAndFooterEatSpacing().GetValue();
}
-void DelFlys( SwLayoutFrame const *pFrame, SwPageFrame *pPage )
+static void DelFlys( SwLayoutFrame const *pFrame, SwPageFrame *pPage )
{
size_t i = 0;
while ( pPage->GetSortedObjs() &&
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 02502e82eff1..e5dffd9ba05f 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -49,13 +49,13 @@ bool SwRootFrame::s_isNoVirDev = false;
SwCache *SwFrame::mpCache = nullptr;
-long FirstMinusSecond( long nFirst, long nSecond )
+static long FirstMinusSecond( long nFirst, long nSecond )
{ return nFirst - nSecond; }
-long SecondMinusFirst( long nFirst, long nSecond )
+static long SecondMinusFirst( long nFirst, long nSecond )
{ return nSecond - nFirst; }
-long SwIncrement( long nA, long nAdd )
+static long SwIncrement( long nA, long nAdd )
{ return nA + nAdd; }
-long SwDecrement( long nA, long nSub )
+static long SwDecrement( long nA, long nSub )
{ return nA - nSub; }
static SwRectFnCollection aHorizontal = {
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 5513c8ec1a79..175e7d546f30 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -164,7 +164,7 @@ void SwTabFrame::RegistFlys()
}
}
-void SwInvalidateAll( SwFrame *pFrame, long nBottom );
+static void SwInvalidateAll( SwFrame *pFrame, long nBottom );
static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
// #i26945# - add parameter <_bOnlyRowsAndCells> to control
@@ -1339,7 +1339,7 @@ void SwTabFrame::Join()
}
}
-void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
+static void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 14887a9e274f..b31483b18f8f 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1975,14 +1975,14 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor )
return bRet;
}
-inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
+static inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
{
if( rRect.Width() > 1 && rRect.Height() > 1 &&
rRect.IsOver( rRegion.GetOrigin() ))
rRegion -= rRect;
}
-inline void Add( SwRegionRects& rRegion, const SwRect& rRect )
+static inline void Add( SwRegionRects& rRegion, const SwRect& rRect )
{
if( rRect.Width() > 1 && rRect.Height() > 1 )
rRegion += rRect;
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index c39055fea33b..389a2154cd24 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -68,7 +68,7 @@ bool SwRootFrame::HasSameRect( const SwRect& rRect )
*/
// define to control, if old or new solution for setting the mapping for
// an virtual output device is used.
-void SetMappingForVirtDev( const Point& _rNewOrigin,
+static void SetMappingForVirtDev( const Point& _rNewOrigin,
const vcl::RenderContext* _pOrgOutDev,
vcl::RenderContext* _pVirDev )
{
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 6fb13bae04e9..82060a833d06 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -71,7 +71,7 @@ using namespace com::sun::star;
#define COLFUZZY 20
-void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
+static void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
bool bChgAlign, sal_uLong nNdPos );
inline const Color* SwTableBox::GetSaveUserColor() const
@@ -1937,7 +1937,7 @@ void SwTable::SetHTMLTableLayout(std::shared_ptr<SwHTMLTableLayout> const& r)
m_xHTMLLayout = r;
}
-void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
+static void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
bool bChgAlign )
{
sal_uLong nNdPos = rBox.IsValidNumTextNd();
@@ -2069,7 +2069,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
}
-void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
+static void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
{
sal_uLong nNdPos = rBox.IsValidNumTextNd( false );
if( ULONG_MAX == nNdPos )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 2c9424bd6529..fd09c2632cfb 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -117,7 +117,7 @@ void SwTextFrame::ValidateFrame()
// After a RemoveFootnote the BodyFrame and all Frames contained within it, need to be
// recalculated, so that the DeadLine is right.
// First we search outwards, on the way back we calculate everything.
-void ValidateBodyFrame_( SwFrame *pFrame )
+static void ValidateBodyFrame_( SwFrame *pFrame )
{
vcl::RenderContext* pRenderContext = pFrame ? pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr;
if( pFrame && !pFrame->IsCellFrame() )
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index f3df1bbaa46c..303ca595487d 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -131,7 +131,7 @@ SwTwips SwTextFrameInfo::GetCharPos(TextFrameIndex const nChar, bool bCenter) co
return (( nNext + nStt ) / 2 ) - aRectFnSet.GetLeft(pFrame->getFrameArea());
}
-SwPaM *AddPam( SwPaM *pPam, const SwTextFrame* pTextFrame,
+static SwPaM *AddPam( SwPaM *pPam, const SwTextFrame* pTextFrame,
TextFrameIndex const nPos, TextFrameIndex const nLen)
{
if( nLen )
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 2c52ed892944..74a046232bcd 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -162,7 +162,7 @@ SwTextInfo::SwTextInfo( const SwTextInfo &rInf )
#if OSL_DEBUG_LEVEL > 0
-void ChkOutDev( const SwTextSizeInfo &rInf )
+static void ChkOutDev( const SwTextSizeInfo &rInf )
{
if ( !rInf.GetVsh() )
return;
@@ -173,7 +173,7 @@ void ChkOutDev( const SwTextSizeInfo &rInf )
}
#endif
-inline TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf )
+static inline TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf )
{
const TextFrameIndex nTextLen(rInf.GetText().getLength());
if (rInf.GetLen() == TextFrameIndex(COMPLETE_STRING))
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 44df9ea35304..178051ad1a51 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -435,7 +435,7 @@ static void InsertCharAttrs(SfxPoolItem const** pAttrs, SfxItemSet const& rItems
// if return false: portion ends at start of redline, indexes unchanged
// if return true: portion end not known (past end of redline), indexes point to first hint past end of redline
-bool CanSkipOverRedline(SwRangeRedline const& rRedline,
+static bool CanSkipOverRedline(SwRangeRedline const& rRedline,
size_t & rStartIndex, size_t & rEndIndex)
{
size_t nStartIndex(rStartIndex);
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index a0923601cce7..16d35e581131 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);
}
-inline void ClearFly( SwTextFormatInfo &rInf )
+static inline void ClearFly( SwTextFormatInfo &rInf )
{
delete rInf.GetFly();
rInf.SetFly(nullptr);
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 7e2458fcb2b9..4e65a4b9bedc 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -70,7 +70,7 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
SvxCaseMap::SmallCaps == rFnt.GetCaseMap();
}
-const Color GetUnderColor( const SwFont *pFont )
+static const Color GetUnderColor( const SwFont *pFont )
{
return pFont->GetUnderColor() == COL_AUTO ?
pFont->GetColor() : pFont->GetUnderColor();
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 28c69bb6960c..307f28ab0f30 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -89,7 +89,7 @@ using namespace i18n::ScriptType;
#define isSeenOrSadChar(c) (IS_JOINING_GROUP((c), SAD) || IS_JOINING_GROUP((c), SEEN))
// Beh and charters that behave like Beh in medial form.
-bool isBehChar(sal_Unicode cCh)
+static bool isBehChar(sal_Unicode cCh)
{
bool bRet = false;
switch (u_getIntPropertyValue(cCh, UCHAR_JOINING_GROUP))
@@ -114,7 +114,7 @@ bool isBehChar(sal_Unicode cCh)
}
// Yeh and charters that behave like Yeh in final form.
-bool isYehChar(sal_Unicode cCh)
+static bool isYehChar(sal_Unicode cCh)
{
bool bRet = false;
switch (u_getIntPropertyValue(cCh, UCHAR_JOINING_GROUP))
@@ -134,7 +134,7 @@ bool isYehChar(sal_Unicode cCh)
return bRet;
}
-bool isTransparentChar ( sal_Unicode cCh )
+static bool isTransparentChar ( sal_Unicode cCh )
{
return u_getIntPropertyValue( cCh, UCHAR_JOINING_TYPE ) == U_JT_TRANSPARENT;
}
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index ca4080becbac..7a9c81925fb7 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -28,7 +28,7 @@
#include <blink.hxx>
#if OSL_DEBUG_LEVEL > 0
-bool ChkChain( SwLinePortion *pStart )
+static bool ChkChain( SwLinePortion *pStart )
{
SwLinePortion *pPor = pStart->GetPortion();
sal_uInt16 nCount = 0;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 6d83d3285c97..38ce27805492 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -697,7 +697,7 @@ SwTextFrame::~SwTextFrame()
namespace sw {
-void UpdateMergedParaForInsert(MergedPara & rMerged,
+static void UpdateMergedParaForInsert(MergedPara & rMerged,
SwTextNode const& rNode, sal_Int32 const nIndex, sal_Int32 const nLen)
{
assert(nIndex <= rNode.Len());
@@ -747,7 +747,7 @@ void UpdateMergedParaForInsert(MergedPara & rMerged,
// 1. if real delete => correct nStart/nEnd for full nLen
// 2. if rl delete => do not correct nStart/nEnd but just exclude deleted
-TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
+static TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
bool const isRealDelete,
SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32 const nLen)
{
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index b67daa422b65..586750276517 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -954,7 +954,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo const
return pNewPor;
}
-OUString lcl_GetPageNumber( const SwPageFrame* pPage )
+static OUString lcl_GetPageNumber( const SwPageFrame* pPage )
{
OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrame" );
const sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 886e3b8ce5e6..df9b9ddddca9 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1483,7 +1483,7 @@ static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, cons
return nullptr;
}
-void lcl_CopyHint(
+static void lcl_CopyHint(
const sal_uInt16 nWhich,
const SwTextAttr * const pHt,
SwTextAttr *const pNewHt,
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index f028b973e601..fad6b64db17e 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -364,7 +364,7 @@ sal_uInt16 SwFont::CalcShadowSpace(
}
// maps directions for vertical layout
-sal_uInt16 MapDirection( sal_uInt16 nDir, const bool bVertFormat )
+static sal_uInt16 MapDirection( sal_uInt16 nDir, const bool bVertFormat )
{
if ( bVertFormat )
{
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index cf6cade9344e..6369912516cb 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1775,7 +1775,7 @@ bool SwTextNode::IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich)
//Font underline;
//Font Italic of Western, CJK and CTL;
//Font Bold of Wertern, CJK and CTL;
-bool lcl_IsIgnoredCharFormatForBullets(const sal_uInt16 nWhich)
+static bool lcl_IsIgnoredCharFormatForBullets(const sal_uInt16 nWhich)
{
return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_POSTURE || nWhich == RES_CHRATR_WEIGHT
|| nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 46fe039ee514..ff2d645c83da 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -682,7 +682,7 @@ void SwTextNode::RstTextAttr(
}
}
-sal_Int32 clipIndexBounds(const OUString &rStr, sal_Int32 nPos)
+static sal_Int32 clipIndexBounds(const OUString &rStr, sal_Int32 nPos)
{
if (nPos < 0)
return 0;
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index b7bf849e15ac..fd0031746ea4 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -177,7 +177,7 @@ public:
#if OSL_DEBUG_LEVEL > 0
#include <shellio.hxx>
-void CheckTable( const SwTable& );
+static void CheckTable( const SwTable& );
#define CHECKTABLE(t) CheckTable( t );
#else
#define CHECKTABLE(t)
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 05d70e6d5807..b6335a7b6a36 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -317,7 +317,7 @@ static sal_Int32 lcl_PropName2TokenPos(const OUString& rPropertyName)
return SAL_MAX_INT32;
}
-sal_uInt16 GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
+static sal_uInt16 GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
{
sal_uInt16 nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
const SfxItemPropertySet* pSet = aSwMapProvider.GetPropertySet( nId );
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index aded66619adf..9f5a070d4611 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -105,7 +105,7 @@ lcl_AnyToBool(uno::Any const& rVal)
/// @throws lang::IllegalArgumentException
template<typename T>
-void lcl_AnyToBitMask(uno::Any const& rValue,
+static void lcl_AnyToBitMask(uno::Any const& rValue,
T & rBitMask, const T nBit)
{
rBitMask = lcl_AnyToBool(rValue)
@@ -114,7 +114,7 @@ void lcl_AnyToBitMask(uno::Any const& rValue,
}
template<typename T>
-void lcl_BitMaskToAny(uno::Any & o_rValue,
+static void lcl_BitMaskToAny(uno::Any & o_rValue,
const T nBitMask, const T nBit)
{
const bool bRet(nBitMask & nBit);
@@ -1230,7 +1230,7 @@ SwXDocumentIndex::removeVetoableChangeListener(
OSL_FAIL("SwXDocumentIndex::removeVetoableChangeListener(): not implemented");
}
-void lcl_CalcLayout(SwDoc *pDoc)
+static void lcl_CalcLayout(SwDoc *pDoc)
{
SwViewShell *pViewShell = nullptr;
SwEditShell* pEditShell = nullptr;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index c1c91b365bf0..fdd42ce4c99f 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.
-inline bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID)
+static inline 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 c1b1529534a7..ee146bb68d7f 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -111,7 +111,7 @@ namespace
#define WID_BEGIN_NOTICE 10
#define WID_ANCHOR_CHARACTER_STYLE 11
-const SfxItemPropertySet* GetFootnoteSet()
+static const SfxItemPropertySet* GetFootnoteSet()
{
static const SfxItemPropertyMapEntry aFootnoteMap_Impl[] =
{
@@ -133,7 +133,7 @@ const SfxItemPropertySet* GetFootnoteSet()
return &aFootnoteSet_Impl;
}
-const SfxItemPropertySet* GetEndnoteSet()
+static const SfxItemPropertySet* GetEndnoteSet()
{
static const SfxItemPropertyMapEntry aEndnoteMap_Impl[] =
{
@@ -151,7 +151,7 @@ const SfxItemPropertySet* GetEndnoteSet()
return &aEndnoteSet_Impl;
}
-const SfxItemPropertySet* GetNumberingRulesSet()
+static const SfxItemPropertySet* GetNumberingRulesSet()
{
static const SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] =
{
@@ -178,7 +178,7 @@ const SfxItemPropertySet* GetNumberingRulesSet()
#define WID_COUNT_LINES_IN_FRAMES 9
#define WID_RESTART_AT_EACH_PAGE 10
-const SfxItemPropertySet* GetLineNumberingSet()
+static const SfxItemPropertySet* GetLineNumberingSet()
{
static const SfxItemPropertyMapEntry aLineNumberingMap_Impl[] =
{
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e58c1f01e535..db28a9ad84f8 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1560,7 +1560,7 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc()
-sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
+static sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
{
// check for needed metric translation
if(!(rEntry.nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
@@ -2458,7 +2458,7 @@ beans::PropertyState SwXStyle::getPropertyState(const OUString& rPropertyName)
// allow to retarget the SfxItemSet working on, default correctly. Only
// use pSourceSet below this point (except in header/footer processing)
-const SfxItemSet* lcl_GetItemsetForProperty(const SfxItemSet& rSet, SfxStyleFamily eFamily, const OUString& rPropertyName)
+static const SfxItemSet* lcl_GetItemsetForProperty(const SfxItemSet& rSet, SfxStyleFamily eFamily, const OUString& rPropertyName)
{
if(eFamily != SfxStyleFamily::Page)
return &rSet;
@@ -2572,7 +2572,7 @@ void SwXStyle::setPropertyToDefault(const OUString& rPropertyName)
setPropertiesToDefault(aSequence);
}
-SwFormat* lcl_GetFormatForStyle(SwDoc const * pDoc, const rtl::Reference<SwDocStyleSheet>& xStyle, const SfxStyleFamily eFamily)
+static SwFormat* lcl_GetFormatForStyle(SwDoc const * pDoc, const rtl::Reference<SwDocStyleSheet>& xStyle, const SfxStyleFamily eFamily)
{
if(!xStyle.is())
return nullptr;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 7f832ac8e0d4..9725815c5ed0 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -532,7 +532,7 @@ OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
@param i_bTopLeft if true, find top left box, otherwise find bottom
right box
*/
-const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft)
+static const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft)
{
const SwTableLines* pLines(&rTableLines);
while(true)
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 128a1478447d..784d86d2f8e9 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -63,9 +63,9 @@ using namespace com::sun::star;
SwRead ReadAscii = nullptr, ReadHTML = nullptr, ReadXML = nullptr;
-Reader* GetRTFReader();
-Reader* GetWW8Reader();
-Reader* GetDOCXReader();
+static Reader* GetRTFReader();
+static Reader* GetWW8Reader();
+static Reader* GetDOCXReader();
// Note: if editing, please don't forget to modify also the enum
// ReaderWriterEnum and aFilterDetect in iodetect.hxx & iodetect.cxx
@@ -109,7 +109,7 @@ SwRead SwGetReaderXML() // SW_DLLPUBLIC
return ReadXML;
}
-inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader )
+static inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader )
{
aReaderWriter[ rPos ].pReader = pReader;
}
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 96cd25a1e979..ef1b8d7bb636 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -416,7 +416,7 @@ SwHTMLFormatInfo::~SwHTMLFormatInfo()
{
}
-void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
+static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
const SfxItemSet *pNodeItemSet,
SwHTMLTextCollOutputInfo& rInfo )
{
@@ -963,7 +963,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rHWrt.m_nFirstLineIndent = 0;
}
-void OutHTML_SwFormatOff( Writer& rWrt, const SwHTMLTextCollOutputInfo& rInfo )
+static void OutHTML_SwFormatOff( Writer& rWrt, const SwHTMLTextCollOutputInfo& rInfo )
{
SwHTMLWriter & rHWrt = static_cast<SwHTMLWriter&>(rWrt);
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 2655f2756709..90f5aae2b9cc 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -31,7 +31,7 @@
#include "swhtml.hxx"
#include "wrthtml.hxx"
-sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
+static sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
sal_Int32 nPos )
{
rPart = aEmptyOUStr;
@@ -73,7 +73,7 @@ sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
return nPos;
}
-sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
+static sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
const OUString& rContent,
bool bEndNote )
{
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index e27e3393f3bd..ae6596f43b52 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -734,7 +734,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
return pNodeInfo;
}
-void updateFinalEndOfLine(RowEndInners_t &rLastRowEnds, WW8TableNodeInfo const * pEndOfCellInfo)
+static void updateFinalEndOfLine(RowEndInners_t &rLastRowEnds, WW8TableNodeInfo const * pEndOfCellInfo)
{
sal_Int32 nDepth = pEndOfCellInfo->getDepth();
WW8TableNodeInfoInner::Pointer_t pInner = pEndOfCellInfo->getInnerForDepth(nDepth);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a72f89a7d022..37d8e972a42c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8227,7 +8227,7 @@ void DocxAttributeOutput::FormatAnchor( const SwFormatAnchor& )
// Fly frames: anchors here aren't matching the anchors in docx
}
-boost::optional<sal_Int32> lcl_getDmlAlpha(const SvxBrushItem& rBrush)
+static boost::optional<sal_Int32> lcl_getDmlAlpha(const SvxBrushItem& rBrush)
{
boost::optional<sal_Int32> oRet;
sal_Int32 nTransparency = rBrush.GetColor().GetTransparency();
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 4069289670e0..92ec0d103da9 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -98,7 +98,7 @@ bool DocxExportFilter::exportDocument()
// UNO stuff so that the filter is registered
#define IMPL_NAME "com.sun.star.comp.Writer.DocxExport"
-OUString DocxExport_getImplementationName()
+static OUString DocxExport_getImplementationName()
{
return OUString( IMPL_NAME );
}
@@ -108,13 +108,13 @@ OUString DocxExportFilter::getImplementationName()
return DocxExport_getImplementationName();
}
-uno::Sequence< OUString > DocxExport_getSupportedServiceNames() throw()
+static uno::Sequence< OUString > DocxExport_getSupportedServiceNames() throw()
{
return uno::Sequence< OUString > { "com.sun.star.document.ExportFilter" };
}
/// @throws uno::Exception
-uno::Reference< uno::XInterface > DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx )
+static uno::Reference< uno::XInterface > DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx )
{
return static_cast<cppu::OWeakObject*>(new DocxExportFilter( xCtx ));
}
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 8a10ac8ae651..0335062cf984 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -775,7 +775,7 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat
m_pImpl->m_pSerializer->endElementNS(XML_w, XML_pict);
}
-bool lcl_isLockedCanvas(const uno::Reference<drawing::XShape>& xShape)
+static bool lcl_isLockedCanvas(const uno::Reference<drawing::XShape>& xShape)
{
bool bRet = false;
uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, "InteropGrabBag");
@@ -984,7 +984,7 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj,
}
// Converts ARGB transparency (0..255) to drawingml alpha (opposite, and 0..100000)
-OString lcl_ConvertTransparency(const Color& rColor)
+static OString lcl_ConvertTransparency(const Color& rColor)
{
if (rColor.GetTransparency() > 0)
{
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index e8218ff98a5e..819e14c4ef21 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;
}
-inline sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal)
+static inline sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal)
{
sal_uInt16 nRet = *pVal++;
nRet += (*pVal++) << 8;
return nRet;
}
-inline sal_Int32 impl_GetPointComponent(const sal_uInt8*& pVal, std::size_t& rVerticesPos,
- sal_uInt16 nPointSize)
+static inline 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/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 8c88c6461c8c..e7d4ee46f61a 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -54,7 +54,7 @@ using namespace css;
namespace myImplHelpers
{
- SwTwips CalcHdFtDist(const SwFrameFormat& rFormat, sal_uInt16 nSpacing)
+ static SwTwips CalcHdFtDist(const SwFrameFormat& rFormat, sal_uInt16 nSpacing)
{
/*
The normal case for reexporting word docs is to have dynamic spacing,
@@ -94,12 +94,12 @@ namespace myImplHelpers
return nDist;
}
- SwTwips CalcHdDist(const SwFrameFormat& rFormat)
+ static SwTwips CalcHdDist(const SwFrameFormat& rFormat)
{
return CalcHdFtDist(rFormat, rFormat.GetULSpace().GetUpper());
}
- SwTwips CalcFtDist(const SwFrameFormat& rFormat)
+ static SwTwips CalcFtDist(const SwFrameFormat& rFormat)
{
return CalcHdFtDist(rFormat, rFormat.GetULSpace().GetLower());
}
@@ -313,7 +313,7 @@ namespace myImplHelpers
return pColl ? 0 : maHelper.MakeStyle(aName);
}
- OUString FindBestMSSubstituteFont(const OUString &rFont)
+ static OUString FindBestMSSubstituteFont(const OUString &rFont)
{
if (IsStarSymbol(rFont))
return OUString("Arial Unicode MS");
@@ -756,7 +756,7 @@ namespace sw
/** Find cFind in rParams if not embedded in " double quotes.
Will NOT find '\\' or '"'.
*/
- sal_Int32 findUnquoted( const OUString& rParams, sal_Unicode cFind, sal_Int32 nFromPos )
+ static sal_Int32 findUnquoted( const OUString& rParams, sal_Unicode cFind, sal_Int32 nFromPos )
{
const sal_Int32 nLen = rParams.getLength();
if (nFromPos < 0 || nLen <= nFromPos)
@@ -789,7 +789,7 @@ namespace sw
/** Find all rFind in rParams if not embedded in " double quotes and
replace with rReplace. Will NOT find '\\' or '"'.
*/
- bool replaceUnquoted( OUString& rParams, const OUString& rFind, const OUString& rReplace )
+ static bool replaceUnquoted( OUString& rParams, const OUString& rFind, const OUString& rReplace )
{
bool bReplaced = false;
if (rFind.isEmpty())
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index aca4539fd21e..ac7815c13a6a 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -564,7 +564,7 @@ sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft,
return bRet;
}
-bool RTLDrawingsHack(long &rLeft,
+static bool RTLDrawingsHack(long &rLeft,
sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft,
SwTwips nPageRight, SwTwips nPageSize)
{
@@ -1531,7 +1531,7 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt3
CloseContainer(); // ESCHER_SpContainer
}
-ShapeFlag AddMirrorFlags(ShapeFlag nFlags, const SwMirrorGrf &rMirror)
+static ShapeFlag AddMirrorFlags(ShapeFlag nFlags, const SwMirrorGrf &rMirror)
{
switch (rMirror.GetValue())
{
@@ -2838,7 +2838,7 @@ sal_Int32 SwEscherEx::WriteFlyFrame(const DrawObj &rObj, sal_uInt32 &rShapeId,
return nBorderThick;
}
-sal_uInt16 FindPos(const SwFrameFormat &rFormat, unsigned int nHdFtIndex,
+static sal_uInt16 FindPos(const SwFrameFormat &rFormat, unsigned int nHdFtIndex,
DrawObjPointerVector &rPVec)
{
auto aEnd = rPVec.end();
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 5bd578015214..32353635a075 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -232,7 +232,7 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) :
nCurrentSwPos = SearchNext(1);
}
-sal_Int32 lcl_getMinPos( sal_Int32 pos1, sal_Int32 pos2 )
+static sal_Int32 lcl_getMinPos( sal_Int32 pos1, sal_Int32 pos2 )
{
if ( pos1 >= 0 && pos2 >= 0 )
{
@@ -855,7 +855,7 @@ void WW8AttributeOutput::EndRuby(const SwTextNode& /*rNode*/, sal_Int32 /*nPos*/
}
/*#i15387# Better ideas welcome*/
-OUString &TruncateBookmark( OUString &rRet )
+static OUString &TruncateBookmark( OUString &rRet )
{
if ( rRet.getLength() > 40 )
rRet = rRet.copy( 0, 40 );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 8cabd8d90f34..e5c423bd86ed 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1527,7 +1527,7 @@ bool WW8Export::TransBrush(const Color& rCol, WW8_SHD& rShd)
return !rCol.GetTransparency();
}
-sal_uInt32 SuitableBGColor(Color nIn)
+static sal_uInt32 SuitableBGColor(Color nIn)
{
if (nIn == COL_AUTO)
return 0xFF000000;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 55d57a77174f..4f538c6eb565 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -105,7 +105,7 @@ using namespace sw::types;
using namespace sw::util;
// helper methods
-Color WW8TransCol(SVBT32 nWC)
+static Color WW8TransCol(SVBT32 nWC)
{
#if 1 // 1 = use predefined color, 0 = ignore
@@ -460,7 +460,7 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD const * pHd, SfxAllItemSet &
return pObj;
}
-ESelection GetESelection(EditEngine const &rDrawEditEngine, long nCpStart, long nCpEnd)
+static ESelection GetESelection(EditEngine const &rDrawEditEngine, long nCpStart, long nCpEnd)
{
sal_Int32 nPCnt = rDrawEditEngine.GetParagraphCount();
sal_Int32 nSP = 0;
@@ -920,7 +920,7 @@ sal_Int32 SwWW8ImplReader::GetRangeAsDrawingString(OUString& rString, long nStar
//how EditEngine does it, but preserve the length and replace the extra
//chars with placeholders, record the position of the placeholders and
//remove those extra chars after attributes have been inserted
-std::vector<sal_Int32> replaceDosLineEndsButPreserveLength(OUString &rIn)
+static std::vector<sal_Int32> replaceDosLineEndsButPreserveLength(OUString &rIn)
{
OUStringBuffer aNewData(rIn);
std::vector<sal_Int32> aDosLineEndDummies;
@@ -946,7 +946,7 @@ std::vector<sal_Int32> replaceDosLineEndsButPreserveLength(OUString &rIn)
return aDosLineEndDummies;
}
-void removePositions(EditEngine &rDrawEditEngine, const std::vector<sal_Int32>& rDosLineEndDummies)
+static void removePositions(EditEngine &rDrawEditEngine, const std::vector<sal_Int32>& rDosLineEndDummies)
{
for (auto aIter = rDosLineEndDummies.rbegin(); aIter != rDosLineEndDummies.rend(); ++aIter)
{
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index ab1183600fc1..d2d39f37d526 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -232,7 +232,7 @@ void wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
}
}
-extern void WW8PicShadowToReal( WW8_PIC_SHADOW const * pPicS, WW8_PIC* pPic );
+static void WW8PicShadowToReal( WW8_PIC_SHADOW const * pPicS, WW8_PIC* pPic );
bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d7f24bff5596..92d9e9ec5a4f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -176,7 +176,7 @@ static SwMacroInfo* GetMacroInfo( SdrObject* pObj )
return nullptr;
};
-void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell const * pDocShell)
+static void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell const * pDocShell)
{
OUStringBuffer aTmpStr;
while( nLevel )
@@ -2855,7 +2855,7 @@ void SwWW8ImplReader::PostProcessAttrs()
So a encoding converter that on an undefined character attempts to
convert from 1252 on the undefined character
*/
-std::size_t Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
+static std::size_t Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
sal_Char const *pIn, std::size_t nInLen, sal_Unicode *pOut, std::size_t nOutLen)
{
const sal_uInt32 nFlags =
@@ -4358,7 +4358,7 @@ void wwSectionManager::SetUseOn(wwSection &rSection)
* Set the page descriptor on this node, handle the different cases for a text
* node or a table
*/
-void GiveNodePageDesc(SwNodeIndex const &rIdx, const SwFormatPageDesc &rPgDesc,
+static void GiveNodePageDesc(SwNodeIndex const &rIdx, const SwFormatPageDesc &rPgDesc,
SwDoc &rDoc)
{
/*
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index d1378edf6aac..447083d83ab6 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1613,7 +1613,7 @@ enum wwTableSprm
sprmTDefTableNewShd, sprmTCellPadding, sprmTCellPaddingDefault
};
-wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
+static wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
{
switch (eVer)
{
@@ -3072,7 +3072,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi)
+static SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi)
{
SvxFrameDirection eDir = SvxFrameDirection::Environment;
// 1: Asian layout with rotated CJK characters
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index bda1388f5034..bcfdc2d95e4a 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -477,7 +477,7 @@ static void lcl_CopyGreaterEight(OUString &rDest, OUString const &rSrc,
}
}
-OUString sanitizeString(const OUString& rString)
+static OUString sanitizeString(const OUString& rString)
{
sal_Int32 i=0;
while (i < rString.getLength())
@@ -1495,7 +1495,7 @@ WW8ListManager::~WW8ListManager() COVERITY_NOEXCEPT_FALSE
}
}
-bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
+static bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
{
bool bRet =
(
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 5e275d36034a..b265592e42de 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -305,7 +305,7 @@ static void lcl_ConvertSequenceName(OUString& rSequenceName)
// FindParaStart() finds 1st Parameter that follows '\' and cToken
// and returns start of this parameter or -1
-sal_Int32 FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 )
+static sal_Int32 FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 )
{
bool bStr = false; // ignore inside a string
@@ -334,7 +334,7 @@ sal_Int32 FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode c
// FindPara() finds the first parameter including '\' and cToken.
// A new String will be allocated (has to be deallocated by the caller)
// and everything that is part of the parameter will be returned.
-OUString FindPara( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 )
+static OUString FindPara( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 )
{
sal_Int32 n2; // end
sal_Int32 n = FindParaStart( rStr, cToken, cToken2 ); // start
@@ -408,7 +408,7 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rField, LanguageType nLang)
return bRet;
}
-OUString GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, LanguageType nLang)
+static OUString GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, LanguageType nLang)
{
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
@@ -691,7 +691,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
return nRet;
}
-bool AcceptableNestedField(sal_uInt16 nFieldCode)
+static bool AcceptableNestedField(sal_uInt16 nFieldCode)
{
switch (nFieldCode)
{
@@ -2203,7 +2203,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
//helper function
//For MS MacroButton field, the symbol in plain text is always "(" (0x28),
//which should be mapped according to the macro type
-bool ConvertMacroSymbol( const OUString& rName, OUString& rReference )
+static bool ConvertMacroSymbol( const OUString& rName, OUString& rReference )
{
bool bConverted = false;
if( rReference == "(" )
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 51547066ef96..3cb699a0a0d3 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;
}
-inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
+static inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
{
return x;
}
@@ -1378,7 +1378,7 @@ static sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP*
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
+static void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
sal_uInt32 cv, short nIdx, SvxBoxItemLine nOOIndex, sal_uInt16 nWWIndex,
short *pSize)
{
@@ -1411,7 +1411,7 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
}
-void Set1Border(SvxBoxItem &rBox, const WW8_BRCVer9& rBor, SvxBoxItemLine nOOIndex,
+static void Set1Border(SvxBoxItem &rBox, const WW8_BRCVer9& rBor, SvxBoxItemLine nOOIndex,
sal_uInt16 nWWIndex, short *pSize, const bool bIgnoreSpace)
{
short nSpace;
@@ -1542,7 +1542,7 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
+static inline 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 @@ inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
return aS.pSprm != nullptr;
}
-inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
+static inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
SprmResult aS = pStyle->HasParaSprm(nId);
if (aS.pSprm && aS.nRemainingData >= 2)
@@ -4060,7 +4060,7 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short
NewAttr( aLN );
}
-bool lcl_HasExplicitLeft(const WW8PLCFMan *pPlcxMan, bool bVer67)
+static bool lcl_HasExplicitLeft(const WW8PLCFMan *pPlcxMan, bool bVer67)
{
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : nullptr;
if (pPap)
@@ -5222,14 +5222,14 @@ struct SprmReadInfo
FNReadRecord pReadFnc;
};
-bool operator<(const SprmReadInfo &rFirst, const SprmReadInfo &rSecond)
+static bool operator<(const SprmReadInfo &rFirst, const SprmReadInfo &rSecond)
{
return (rFirst.nId < rSecond.nId);
}
typedef ww::SortedArray<SprmReadInfo> wwSprmDispatcher;
-const wwSprmDispatcher *GetWW2SprmDispatcher()
+static const wwSprmDispatcher *GetWW2SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
@@ -5385,7 +5385,7 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
return &aSprmSrch;
}
-const wwSprmDispatcher *GetWW6SprmDispatcher()
+static const wwSprmDispatcher *GetWW6SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
@@ -5597,7 +5597,7 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
return &aSprmSrch;
}
-const wwSprmDispatcher *GetWW8SprmDispatcher()
+static const wwSprmDispatcher *GetWW8SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b8181307d82d..13c4999c0f46 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
-inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
+static inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
sal_uInt8 n = *p;
p += 1;
return n;
}
-inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
+static inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
const sal_uInt16 n = SVBT16ToShort( *reinterpret_cast<SVBT16*>(p) );
p += 2;
return n;
}
-inline sal_Int16 Get_Short( sal_uInt8 *& p )
+static inline sal_Int16 Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline sal_uInt32 Get_ULong( sal_uInt8 *& p )
+static inline sal_uInt32 Get_ULong( sal_uInt8 *& p )
{
sal_uInt32 n = SVBT32ToUInt32( *reinterpret_cast<SVBT32*>(p) );
p += 4;
return n;
}
-inline sal_Int32 Get_Long( sal_uInt8 *& p )
+static inline sal_Int32 Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
@@ -2592,12 +2592,12 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-bool IsReplaceAllSprm(sal_uInt16 nSpId)
+static bool IsReplaceAllSprm(sal_uInt16 nSpId)
{
return (NS_sprm::LN_PHugePapx == nSpId || 0x6646 == nSpId);
}
-bool IsExpandableSprm(sal_uInt16 nSpId)
+static bool IsExpandableSprm(sal_uInt16 nSpId)
{
return 0x646B == nSpId;
}
@@ -6608,7 +6608,7 @@ MSOFactoidType::MSOFactoidType()
namespace MSOPBString
{
-OUString Read(SvStream& rStream)
+static OUString Read(SvStream& rStream)
{
OUString aRet;
@@ -6624,7 +6624,7 @@ OUString Read(SvStream& rStream)
return aRet;
}
-void Write(const OUString& rString, SvStream& rStream)
+static void Write(const OUString& rString, SvStream& rStream)
{
sal_uInt16 nBuf = 0;
nBuf |= rString.getLength(); // cch, 0..14th bits.
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index d879292d5aba..56cd728628ae 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -132,7 +132,7 @@ bool sw_frmitems_parseXMLBorder( const OUString& rValue,
return rHasStyle || rHasWidth || rHasColor;
}
-void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
+static void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
{
SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
if ( nStyle != table::BorderLineStyle::NONE )
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index be094bddc51f..15de25952958 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -105,7 +105,7 @@ void SwDropCapsPict::InitPrinter()
}
// Create Default-String from character-count (A, AB, ABC, ...)
-OUString GetDefaultString(sal_Int32 nChars)
+static OUString GetDefaultString(sal_Int32 nChars)
{
OUStringBuffer aStr(nChars);
for (sal_Int32 i = 0; i < nChars; i++)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index c7ef44e4ff39..5ea1304c1d66 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -98,7 +98,7 @@ void SwCompatibilityOptPage::dispose()
SfxTabPage::dispose();
}
-sal_uLong convertBools2Ulong_Impl
+static sal_uLong convertBools2Ulong_Impl
(
bool _bUsePrtMetrics,
bool _bAddSpacing,
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 51a66653b94e..cc3adc0c97f5 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;
-inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
+static inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
{
rWrtSh.SwapPam();
bool bRet = pSect == rWrtSh.GetCurrSection();
@@ -347,6 +347,7 @@ SfxItemSet* SwColumnDlg::EvalCurrentSelection(void)
return pSet;
}
+static
#if OSL_DEBUG_LEVEL < 2
inline
#endif
diff --git a/sw/source/ui/table/autoformatpreview.cxx b/sw/source/ui/table/autoformatpreview.cxx
index 61af87bdf6e6..f89f33b3396b 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);
}
-inline void lclSetStyleFromBorder(svx::frame::Style& rStyle,
- const ::editeng::SvxBorderLine* pBorder)
+static inline void lclSetStyleFromBorder(svx::frame::Style& rStyle,
+ const ::editeng::SvxBorderLine* pBorder)
{
rStyle.Set(pBorder, 0.05, 5);
}
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx
index f0a29acdd0fc..c3a396ada279 100644
--- a/sw/source/ui/vba/vbaborders.cxx
+++ b/sw/source/ui/vba/vbaborders.cxx
@@ -275,7 +275,7 @@ public:
}
};
-uno::Reference< container::XIndexAccess >
+static uno::Reference< container::XIndexAccess >
rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette const & rPalette )
{
return new RangeBorders( xRange, xContext, rPalette );
diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx
index d0bfe6bf9d23..eac1278452b6 100644
--- a/sw/source/ui/vba/vbavariables.cxx
+++ b/sw/source/ui/vba/vbavariables.cxx
@@ -25,7 +25,7 @@ using namespace ::ooo::vba;
using namespace ::com::sun::star;
/// @throws uno::RuntimeException
-uno::Reference< container::XIndexAccess > createVariablesAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertyAccess >& xUserDefined )
+static uno::Reference< container::XIndexAccess > createVariablesAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertyAccess >& xUserDefined )
{
// FIXME: the performance is poor?
XNamedObjectCollectionHelper< word::XVariable >::XNamedVec aVariables;
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index cd8b77dd87ae..89a99f79d727 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -208,7 +208,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
}
// start field dialog
-void NewXForms( SfxRequest& rReq ); // implementation: below
+static void NewXForms( SfxRequest& rReq ); // implementation: below
std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const SfxItemSet* pArgs)
{
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index e23635f8485e..d366ba6d0066 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -439,7 +439,7 @@ static Color lcl_GetAuthorColor(std::size_t nPos)
}
/// Returns a JSON representation of a redline author.
-boost::property_tree::ptree lcl_AuthorToJson(const OUString& rAuthor, std::size_t nIndex)
+static boost::property_tree::ptree lcl_AuthorToJson(const OUString& rAuthor, std::size_t nIndex)
{
boost::property_tree::ptree aRet;
aRet.put("index", nIndex);
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index 6f81e9912c70..1b4a19171f28 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -36,7 +36,7 @@
namespace sw { namespace annotation {
-Color ColorFromAlphaColor(const sal_uInt8 aTransparency, const Color& aFront, const Color& aBack)
+static Color ColorFromAlphaColor(const sal_uInt8 aTransparency, const Color& aFront, const Color& aBack)
{
return Color(sal_uInt8(aFront.GetRed() * aTransparency / 255.0 + aBack.GetRed() * (1 - aTransparency / 255.0)),
sal_uInt8(aFront.GetGreen() * aTransparency / 255.0 + aBack.GetGreen() * (1 - aTransparency / 255.0)),
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 393b3af5c4ad..c0d838e3a982 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
-inline bool IsMinMove(const Point &rStartPos, const Point &rLPt)
+static inline 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 @@ inline bool IsMinMove(const Point &rStartPos, const Point &rLPt)
* in selecting, with DrawObjects; at SwgFlys to trigger
* hyperlinks if applicable (Download/NewWindow!)
*/
-inline bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
+static inline bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
{
bool bRet = true;
SdrObject* pObj;
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 4fe742b92cf6..6a5dc759e14d 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;
}
-inline sal_uInt16 GetPackCount() { return SAL_N_ELEMENTS(aSwFields); }
+static inline 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/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index c0d17e3cc95e..60a9bdcb6aa6 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -337,7 +337,7 @@ SwGlossaries::SwGlossaries()
}
// set new path and recreate internal array
-OUString lcl_makePath(const std::vector<OUString>& rPaths)
+static OUString lcl_makePath(const std::vector<OUString>& rPaths)
{
std::vector<OUString>::const_iterator aIt(rPaths.begin());
const std::vector<OUString>::const_iterator aEnd(rPaths.end());
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 94a5d99c46cc..971ba20ae919 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -58,7 +58,7 @@ const SvxPageUsage aArr[] =
};
-sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
+static sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
{
for ( sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aArr); ++i )
if ( aArr[i] == nUsage )
@@ -67,7 +67,7 @@ sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
}
-SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
+static SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
{
if ( nPos >= SAL_N_ELEMENTS(aArr) )
return SvxPageUsage::NONE;
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 2896dbd653cd..061ae5dc1bbc 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -50,6 +50,8 @@
#include <comphelper/lok.hxx>
#include <vcl/weld.hxx>
+#include "viewfunc.hxx"
+
// The SetVisArea of the DocShell must not be called from InnerResizePixel.
// But our adjustments must take place.
static bool bProtectDocShellVisArea = false;
@@ -68,7 +70,7 @@ bool SwView::IsDocumentBorder()
SvxZoomType::PAGEWIDTH_NOBORDER == m_pWrtShell->GetViewOptions()->GetZoomType();
}
-inline long GetLeftMargin( SwView const &rView )
+static inline 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/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index a823ec0c4705..d996777be209 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -183,7 +183,7 @@ static void lcl_Scale(long& nVal, long nScale)
nVal >>= 8;
}
-void ResizeFrameCols(SwFormatCol& rCol,
+static void ResizeFrameCols(SwFormatCol& rCol,
long nOldWidth,
long nNewWidth,
long nLeftDelta )
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 2816b6a0aa70..cdbd0ff171d5 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -81,7 +81,7 @@ using namespace SWUnoHelper;
typedef ::utl::SharedUNOComponent< XInterface > SharedComponent;
-osl::Mutex & GetMailMergeMutex()
+static osl::Mutex & GetMailMergeMutex()
{
static osl::Mutex aMutex;
return aMutex;
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 2bac72c751fc..e2a3276464f1 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -179,7 +179,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet)
// Fill header footer
-void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
+static void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
{
SwAttrSet aSet(pFormat->GetAttrSet());
aSet.Put(rSet);
@@ -196,7 +196,7 @@ void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
}
/// Convert from UseOnPage to SvxPageUsage.
-SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse)
+static SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse)
{
SvxPageUsage nRet = SvxPageUsage::NONE;
if (nUse & UseOnPage::Left)
@@ -211,7 +211,7 @@ SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse)
}
/// Convert from SvxPageUsage to UseOnPage.
-UseOnPage lcl_convertUseFromSvx(SvxPageUsage nUse)
+static UseOnPage lcl_convertUseFromSvx(SvxPageUsage nUse)
{
UseOnPage nRet = UseOnPage::NONE;
if (nUse == SvxPageUsage::Left)