summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-09 10:28:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-09 14:47:17 +0200
commit7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch)
tree616ab419fe0f01e94740de7faacb393775420589 /cui
parent664db0d945fbb23e115eeea8377e3a4e88541da1 (diff)
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optlingu.cxx2
-rw-r--r--cui/source/options/treeopt.cxx4
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--cui/source/tabpages/grfpage.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 88dd159a9823..c0da0647978c 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -287,7 +287,7 @@ static const char * aEidToPropName[] =
UPN_IS_HYPH_SPECIAL // EID_HYPH_SPECIAL
};
-static inline OUString lcl_GetPropertyName( EID_OPTIONS eEntryId )
+static OUString lcl_GetPropertyName( EID_OPTIONS eEntryId )
{
DBG_ASSERT( static_cast<unsigned int>(eEntryId) < SAL_N_ELEMENTS(aEidToPropName), "index out of range" );
return OUString::createFromAscii( aEidToPropName[ static_cast<int>(eEntryId) ] );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 34f3a53aee09..7002296cf0da 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -126,12 +126,12 @@ LastPageSaver* OfaTreeOptionsDialog::pLastPageSaver = nullptr;
// some stuff for easier changes for SvtViewOptions
static char const VIEWOPT_DATANAME[] = "page data";
-static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData )
+static void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData )
{
rOpt.SetUserItem( VIEWOPT_DATANAME, Any( rData ) );
}
-static inline OUString GetViewOptUserItem( const SvtViewOptions& rOpt )
+static OUString GetViewOptUserItem( const SvtViewOptions& rOpt )
{
Any aAny( rOpt.GetUserItem( VIEWOPT_DATANAME ) );
OUString aUserData;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 68e25cdbbaa9..1ba7f1690448 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -138,7 +138,7 @@ const sal_uInt16 SvxCharTwoLinesPage::pTwoLinesRanges[] =
// C-Function ------------------------------------------------------------
-static inline bool StateToAttr( TriState aState )
+static bool StateToAttr( TriState aState )
{
return ( TRISTATE_TRUE == aState );
}
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 49cd1da7b7c8..22fb67eff376 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -40,7 +40,7 @@
#define TWIP_TO_INCH 1440
-static inline int lcl_GetValue(const weld::MetricSpinButton& rMetric, FieldUnit eUnit)
+static int lcl_GetValue(const weld::MetricSpinButton& rMetric, FieldUnit eUnit)
{
return rMetric.denormalize(rMetric.get_value(eUnit));
}