summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx2
-rw-r--r--svx/source/dialog/frmdirlbox.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/items/pageitem.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx4
-rw-r--r--svx/source/svdraw/svdpdf.cxx6
7 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index c5787263245a..5ccbfb308df5 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -102,7 +102,7 @@ namespace
}
/// determines whether the given control is in alive mode
- inline bool isAliveMode( const Reference< XControl >& _rxControl )
+ bool isAliveMode( const Reference< XControl >& _rxControl )
{
OSL_PRECOND( _rxControl.is(), "AccessibleControlShape::isAliveMode: invalid control" );
return _rxControl.is() && !_rxControl->isDesignMode();
diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx
index 12b342db79c1..5f15e23c5967 100644
--- a/svx/source/dialog/frmdirlbox.cxx
+++ b/svx/source/dialog/frmdirlbox.cxx
@@ -24,12 +24,12 @@ namespace svx {
namespace {
-inline void* lclEnumToVoid( SvxFrameDirection eDirection )
+void* lclEnumToVoid( SvxFrameDirection eDirection )
{
return reinterpret_cast< void* >( static_cast< sal_uInt32 >( eDirection ) );
}
-inline SvxFrameDirection lclVoidToEnum( void* pDirection )
+SvxFrameDirection lclVoidToEnum( void* pDirection )
{
return static_cast< SvxFrameDirection >( reinterpret_cast< sal_IntPtr >( pDirection ) );
}
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index afe3ddeb9bcc..fe058f676914 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -97,7 +97,7 @@ FrameSelFlags lclGetFlagFromType( FrameBorderType eBorder )
}
/** Merges the rSource polypolygon into the rDest polypolygon. */
-inline void lclPolyPolyUnion( tools::PolyPolygon& rDest, const tools::PolyPolygon& rSource )
+void lclPolyPolyUnion( tools::PolyPolygon& rDest, const tools::PolyPolygon& rSource )
{
const tools::PolyPolygon aTmp( rDest );
aTmp.GetUnion( rSource, rDest );
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 163d4876f5be..bbf80d45d5c0 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -73,7 +73,7 @@ bool SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
eUse == rItem.eUse );
}
-static inline OUString GetUsageText( const SvxPageUsage eU )
+static OUString GetUsageText( const SvxPageUsage eU )
{
switch( eU )
{
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 0a838238e23e..8f457727ad3e 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1911,7 +1911,7 @@ void SdrModel::ReadUserDataSequenceValue(const css::beans::PropertyValue* pValue
}
template <typename T>
-static inline void addPair(std::vector< std::pair< OUString, Any > >& aUserData, const OUString& name, const T val)
+static void addPair(std::vector< std::pair< OUString, Any > >& aUserData, const OUString& name, const T val)
{
aUserData.push_back(std::pair< OUString, Any >(name, css::uno::makeAny(val)));
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index ffd4c1ac84af..441a85e4ce73 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -57,7 +57,7 @@
using namespace sdr;
-static inline sal_uInt16 GetPrevPnt(sal_uInt16 nPnt, sal_uInt16 nPntMax, bool bClosed)
+static sal_uInt16 GetPrevPnt(sal_uInt16 nPnt, sal_uInt16 nPntMax, bool bClosed)
{
if (nPnt>0) {
nPnt--;
@@ -68,7 +68,7 @@ static inline sal_uInt16 GetPrevPnt(sal_uInt16 nPnt, sal_uInt16 nPntMax, bool bC
return nPnt;
}
-static inline sal_uInt16 GetNextPnt(sal_uInt16 nPnt, sal_uInt16 nPntMax, bool bClosed)
+static sal_uInt16 GetNextPnt(sal_uInt16 nPnt, sal_uInt16 nPntMax, bool bClosed)
{
nPnt++;
if (nPnt>nPntMax || (bClosed && nPnt>=nPntMax)) nPnt=0;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 1f55fb709d1f..4dd99ec9b3e3 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -94,9 +94,9 @@ namespace
/// dimensions are in inches, with 72 points / inch.
/// Here we effectively render at 96 DPI (to match
/// the image rendered in vcl::ImportPDF in pdfread.cxx).
-inline double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; }
+double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; }
/// Convert from pixels to logic (twips).
-inline long lcl_ToLogic(double value)
+long lcl_ToLogic(double value)
{
// Convert to integral preserving two dp.
const long in = static_cast<long>(value * 100.);
@@ -104,7 +104,7 @@ inline long lcl_ToLogic(double value)
return out / 100;
}
-inline double sqrt2(double a, double b) { return sqrt(a * a + b * b); }
+double sqrt2(double a, double b) { return sqrt(a * a + b * b); }
}
struct FPDFBitmapDeleter