summaryrefslogtreecommitdiff
path: root/cui/source/tabpages
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 /cui/source/tabpages
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 'cui/source/tabpages')
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--cui/source/tabpages/macroass.cxx2
-rw-r--r--cui/source/tabpages/page.cxx10
-rw-r--r--cui/source/tabpages/paragrph.cxx4
-rw-r--r--cui/source/tabpages/tabstpge.cxx2
6 files changed, 11 insertions, 11 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 28b67bd5bcfc..47da6b964256 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -118,7 +118,7 @@ static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle)
}
}
-sal_uInt16 GetItemId_Impl( ValueSet const & rValueSet, const Color& rCol )
+static sal_uInt16 GetItemId_Impl( ValueSet const & rValueSet, const Color& rCol )
{
bool bFound = false;
sal_uInt16 nCount = rValueSet.GetItemCount();
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 06d0137ce366..6358dee9f77a 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -138,7 +138,7 @@ const sal_uInt16 SvxCharTwoLinesPage::pTwoLinesRanges[] =
// C-Function ------------------------------------------------------------
-inline bool StateToAttr( TriState aState )
+static inline bool StateToAttr( TriState aState )
{
return ( TRISTATE_TRUE == aState );
}
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index c164baff3f79..eb0dfa26c40a 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -90,7 +90,7 @@ static long const nTabs[] =
#define LB_MACROS_ITEMPOS 2
-OUString ConvertToUIName_Impl( SvxMacro const *pMacro )
+static OUString ConvertToUIName_Impl( SvxMacro const *pMacro )
{
OUString aName( pMacro->GetMacName() );
OUString aEntry;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 054bc8fb16ed..7776f0027df0 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -84,7 +84,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 )
@@ -93,7 +93,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;
@@ -101,7 +101,7 @@ SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
}
-Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxItem& rBox )
+static Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxItem& rBox )
{
Size aSz;
aSz.setHeight( rShadow.CalcShadowSpace( SvxShadowItemSide::BOTTOM ) + rBox.CalcLineSpace( SvxBoxItemLine::BOTTOM ) );
@@ -112,12 +112,12 @@ Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxItem& rBo
}
-long ConvertLong_Impl( const long nIn, MapUnit eUnit )
+static long ConvertLong_Impl( const long nIn, MapUnit eUnit )
{
return OutputDevice::LogicToLogic( nIn, eUnit, MapUnit::MapTwip );
}
-bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
+static bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
{
if ( pSize )
{
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5f3af968def6..3e0c7fb9e7a9 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -95,7 +95,7 @@ enum LineSpaceList
LLINESPACE_FIX = 7
};
-void SetLineSpace_Impl( SvxLineSpacingItem&, int, long lValue = 0 );
+static void SetLineSpace_Impl( SvxLineSpacingItem&, int, long lValue = 0 );
void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace,
int eSpace, long lValue )
@@ -145,7 +145,7 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace,
}
}
-sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet)
+static sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet)
{
sal_uInt16 nHtmlMode = 0;
const SfxPoolItem* pItem = nullptr;
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index e64ab07e82be..9133ad646b55 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -66,7 +66,7 @@ const sal_uInt16 SvxTabulatorTabPage::pRanges[] =
0
};
-void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
+static void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
{
if( rTabs.Count() )
return;