diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 10:28:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 14:47:17 +0200 |
commit | 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch) | |
tree | 616ab419fe0f01e94740de7faacb393775420589 /oox/source/drawingml | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (diff) |
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/chart/axisconverter.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/color.cxx | 10 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 5aead418e983..7bcba408ffbb 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star::uno; namespace { -inline void lclSetValueOrClearAny( Any& orAny, const OptValue< double >& rofValue ) +void lclSetValueOrClearAny( Any& orAny, const OptValue< double >& rofValue ) { if( rofValue.has() ) orAny <<= rofValue.get(); else orAny.clear(); } diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 625adf5fca78..44662584da84 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -146,29 +146,29 @@ struct StaticPresetColorsPool : public ::rtl::Static< PresetColorsPool, StaticPr const double DEC_GAMMA = 2.3; const double INC_GAMMA = 1.0 / DEC_GAMMA; -inline void lclRgbToRgbComponents( sal_Int32& ornR, sal_Int32& ornG, sal_Int32& ornB, ::Color nRgb ) +void lclRgbToRgbComponents( sal_Int32& ornR, sal_Int32& ornG, sal_Int32& ornB, ::Color nRgb ) { ornR = nRgb.GetRed(); ornG = nRgb.GetGreen(); ornB = nRgb.GetBlue(); } -inline sal_Int32 lclRgbComponentsToRgb( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB ) +sal_Int32 lclRgbComponentsToRgb( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB ) { return static_cast< sal_Int32 >( (nR << 16) | (nG << 8) | nB ); } -inline sal_Int32 lclRgbCompToCrgbComp( sal_Int32 nRgbComp ) +sal_Int32 lclRgbCompToCrgbComp( sal_Int32 nRgbComp ) { return static_cast< sal_Int32 >( nRgbComp * MAX_PERCENT / 255 ); } -inline sal_Int32 lclCrgbCompToRgbComp( sal_Int32 nCrgbComp ) +sal_Int32 lclCrgbCompToRgbComp( sal_Int32 nCrgbComp ) { return static_cast< sal_Int32 >( nCrgbComp * 255 / MAX_PERCENT ); } -inline sal_Int32 lclGamma( sal_Int32 nComp, double fGamma ) +sal_Int32 lclGamma( sal_Int32 nComp, double fGamma ) { return static_cast< sal_Int32 >( pow( static_cast< double >( nComp ) / MAX_PERCENT, fGamma ) * MAX_PERCENT + 0.5 ); } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 0f5437dc9519..2676d43060fb 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -400,7 +400,7 @@ void Shape::addChildren( } } -static inline void lcl_resetPropertyValue( std::vector<beans::PropertyValue>& rPropVec, const OUString& rName ) +static void lcl_resetPropertyValue( std::vector<beans::PropertyValue>& rPropVec, const OUString& rName ) { auto aIterator = std::find_if( rPropVec.begin(), rPropVec.end(), [rName]( const beans::PropertyValue& rValue ) { return rValue.Name == rName; } ); @@ -409,7 +409,7 @@ static inline void lcl_resetPropertyValue( std::vector<beans::PropertyValue>& rP rPropVec.erase( aIterator ); } -static inline void lcl_setPropertyValue( std::vector<beans::PropertyValue>& rPropVec, +static void lcl_setPropertyValue( std::vector<beans::PropertyValue>& rPropVec, const OUString& rName, const beans::PropertyValue& rPropertyValue ) { @@ -418,7 +418,7 @@ static inline void lcl_setPropertyValue( std::vector<beans::PropertyValue>& rPro rPropVec.push_back( rPropertyValue ); } -static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust ) +static SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust ) { if (eAdjust == ParagraphAdjust_LEFT) return SDRTEXTHORZADJUST_LEFT; @@ -429,7 +429,7 @@ static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust ) return SDRTEXTHORZADJUST_LEFT; } -static inline void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape, +static void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape, const OUString& rClass, const OUString& rPresetType, const CustomShapePropertiesPtr& pCustomShapePropertiesPtr, const TextBodyPtr& pTextBody, |