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 | |
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>
316 files changed, 823 insertions, 771 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index cbc9669b18c8..3c4dbd064b25 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -70,7 +70,7 @@ using namespace ::svt::table; namespace { -inline bool hasFloatingChild(vcl::Window *pWindow) +bool hasFloatingChild(vcl::Window *pWindow) { vcl::Window * pChild = pWindow->GetAccessibleChildWindow(0); return pChild && pChild->GetType() == WindowType::FLOATINGWINDOW; diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx index 7b5bf9cae140..42e326af11a4 100644 --- a/basegfx/source/color/bcolortools.cxx +++ b/basegfx/source/color/bcolortools.cxx @@ -59,7 +59,7 @@ namespace basegfx { namespace utils return BColor(h,s,l); } - static inline double hsl2rgbHelper( double nValue1, double nValue2, double nHue ) + static double hsl2rgbHelper( double nValue1, double nValue2, double nHue ) { // clamp hue to [0,360] nHue = fmod( nHue, 360.0 ); diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx index c0adc5a09b37..9584eeded3c0 100644 --- a/basegfx/source/curve/b2dcubicbezier.cxx +++ b/basegfx/source/curve/b2dcubicbezier.cxx @@ -907,7 +907,7 @@ namespace basegfx namespace { - inline void impCheckExtremumResult(double fCandidate, std::vector< double >& rResult) + void impCheckExtremumResult(double fCandidate, std::vector< double >& rResult) { // check for range ]0.0 .. 1.0[ with excluding 1.0 and 0.0 clearly // by using the equalZero test, NOT ::more or ::less which will use the diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 27bfa56d8ced..20b193d099bc 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -2161,7 +2161,7 @@ namespace basegfx namespace { /// return 0 for input of 0, -1 for negative and 1 for positive input - inline int lcl_sgn( const double n ) + int lcl_sgn( const double n ) { return n == 0.0 ? 0 : 1 - 2*int(rtl::math::isSignBitSet(n)); } diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index f3975a7a51c0..3b9b15b93890 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -223,7 +223,7 @@ namespace basegfx // helper for getting the 3D Point from given cartesian coordinates. fHor is defined from // [F_PI2 .. -F_PI2], fVer from [0.0 .. F_2PI] - static inline B3DPoint getPointFromCartesian(double fHor, double fVer) + static B3DPoint getPointFromCartesian(double fHor, double fVer) { const double fCosVer(cos(fVer)); return B3DPoint(fCosVer * cos(fHor), sin(fVer), fCosVer * -sin(fHor)); diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index f98b6bdc6830..bc25fa474682 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -680,7 +680,7 @@ namespace basegfx aNewEdges ); } - inline bool isSameRect(ActiveEdge const & rEdge, + bool isSameRect(ActiveEdge const & rEdge, basegfx::B2DRange const & rRect) { return &rEdge.getRect() == &rRect; @@ -689,12 +689,12 @@ namespace basegfx // wow what a hack. necessary because stl's list::erase does // not eat reverse_iterator template<typename Cont, typename Iter> Iter eraseFromList(Cont&, const Iter&); - template<> inline ListOfEdges::iterator eraseFromList( + template<> ListOfEdges::iterator eraseFromList( ListOfEdges& rList, const ListOfEdges::iterator& aIter) { return rList.erase(aIter); } - template<> inline ListOfEdges::reverse_iterator eraseFromList( + template<> ListOfEdges::reverse_iterator eraseFromList( ListOfEdges& rList, const ListOfEdges::reverse_iterator& aIter) { return ListOfEdges::reverse_iterator( @@ -702,7 +702,7 @@ namespace basegfx } template<int bPerformErase, - typename Iterator> inline void processActiveEdges( + typename Iterator> void processActiveEdges( Iterator first, Iterator last, ListOfEdges& rActiveEdgeList, @@ -761,7 +761,7 @@ namespace basegfx } } - template<int bPerformErase> inline void processActiveEdgesTopDown( + template<int bPerformErase> void processActiveEdgesTopDown( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, @@ -776,7 +776,7 @@ namespace basegfx rRes); } - template<int bPerformErase> inline void processActiveEdgesBottomUp( + template<int bPerformErase> void processActiveEdgesBottomUp( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, @@ -824,7 +824,7 @@ namespace basegfx rCurrEvent, rActiveEdgeList, rPolygonPool, rRes); } - inline void handleSweepLineEvent( SweepLineEvent& rCurrEvent, + void handleSweepLineEvent( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, B2DPolyPolygon& rRes) diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx index 16feb0c7ef16..74e1ad785612 100644 --- a/basegfx/source/tools/tools.cxx +++ b/basegfx/source/tools/tools.cxx @@ -28,7 +28,7 @@ namespace basegfx { namespace { - inline double distance( const double& nX, + double distance( const double& nX, const double& nY, const ::basegfx::B2DVector& rNormal, const double& nC ) diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx index 49015b66deef..abf966b1f8b4 100644 --- a/basegfx/test/boxclipper.cxx +++ b/basegfx/test/boxclipper.cxx @@ -49,7 +49,7 @@ double getRandomOrdinal( const std::size_t n ) return comphelper::rng::uniform_size_distribution(0, n-1); } -static inline bool compare(const B2DPoint& left, const B2DPoint& right) +static bool compare(const B2DPoint& left, const B2DPoint& right) { return left.getX()<right.getX() || (rtl::math::approxEqual(left.getX(),right.getX()) && left.getY()<right.getY()); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 629e3728980c..1a17454e6a76 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -140,7 +140,7 @@ static const CharClass& GetCharClass() return aCharClass; } -static inline bool isFolder( FileStatus::Type aType ) +static bool isFolder( FileStatus::Type aType ) { return ( aType == FileStatus::Directory || aType == FileStatus::Volume ); } @@ -2587,7 +2587,7 @@ static OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLD return aPathStr; } -static inline bool implCheckWildcard( const OUString& rName, SbiRTLData const * pRTLData ) +static bool implCheckWildcard( const OUString& rName, SbiRTLData const * pRTLData ) { bool bMatch = true; diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 514c8e1e85b0..92cd189ca587 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1828,7 +1828,7 @@ static IntervalInfo const * getIntervalInfo( const OUString& rStringCode ) return nullptr; } -static inline void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, sal_Int16& rnDay, double dDate ) +static void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, sal_Int16& rnDay, double dDate ) { rnDay = implGetDateDay( dDate ); rnMonth = implGetDateMonth( dDate ); @@ -1840,7 +1840,7 @@ static inline void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, s @return the year number, truncated if necessary and in that case also rMonth and rDay adjusted. */ -static inline sal_Int16 limitDate( sal_Int32 n32Year, sal_Int16& rMonth, sal_Int16& rDay ) +static sal_Int16 limitDate( sal_Int32 n32Year, sal_Int16& rMonth, sal_Int16& rDay ) { if( n32Year > SAL_MAX_INT16 ) { @@ -1957,7 +1957,7 @@ void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool) rPar.Get(0)->PutDate( dNewDate ); } -static inline double RoundImpl( double d ) +static double RoundImpl( double d ) { return ( d >= 0 ) ? floor( d + 0.5 ) : -floor( -d + 0.5 ); } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index b8d16c79578e..e2c1e2ef7920 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1568,7 +1568,7 @@ void SbiRuntime::StepGET() } // #67607 copy Uno-Structs -static inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef const & refVal, SbxVariableRef const & refVar ) +static bool checkUnoStructCopy( bool bVBA, SbxVariableRef const & refVal, SbxVariableRef const & refVar ) { SbxDataType eVarType = refVar->GetType(); SbxDataType eValType = refVal->GetType(); diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index ebe2ce48cc1d..bb26749cadaf 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -31,7 +31,7 @@ namespace jni_uno { -static inline std::unique_ptr<rtl_mem> seq_allocate( +static std::unique_ptr<rtl_mem> seq_allocate( sal_Int32 nElements, sal_Int32 nSize ) { std::unique_ptr< rtl_mem > seq( diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx index 1915b746cf55..fe558b0a8886 100644 --- a/canvas/source/simplecanvas/simplecanvasimpl.cxx +++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx @@ -45,7 +45,7 @@ using namespace canvas; namespace { - inline uno::Sequence< double > color2Sequence( sal_Int32 nColor ) + uno::Sequence< double > color2Sequence( sal_Int32 nColor ) { // TODO(F3): Color management uno::Sequence< double > aRes( 4 ); @@ -58,7 +58,7 @@ namespace return aRes; } - inline uno::Reference< rendering::XPolyPolygon2D > rect2Poly( uno::Reference<rendering::XGraphicDevice> const& xDevice, + uno::Reference< rendering::XPolyPolygon2D > rect2Poly( uno::Reference<rendering::XGraphicDevice> const& xDevice, geometry::RealRectangle2D const& rRect ) { uno::Sequence< geometry::RealPoint2D > rectSequence( 4 ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 50a619dce5f4..4d560ca4531d 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1860,7 +1860,7 @@ std::shared_ptr< DrawModelWrapper > ChartView::getDrawModelWrapper() namespace { -inline sal_Int32 lcl_getDiagramTitleSpace() +sal_Int32 lcl_getDiagramTitleSpace() { return 200; //=0,2 cm spacing } @@ -2049,7 +2049,7 @@ awt::Rectangle ExplicitValueProvider::AddSubtractAxisTitleSizes( namespace { -inline double lcl_getPageLayoutDistancePercentage() +double lcl_getPageLayoutDistancePercentage() { return 0.02; } diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 7b5565a4cb3b..0e6e32be4988 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -609,13 +609,13 @@ awt::Size lcl_placeLegendEntries( } // #i109336# Improve auto positioning in chart -inline sal_Int32 lcl_getLegendLeftRightMargin() +sal_Int32 lcl_getLegendLeftRightMargin() { return 210; // 1/100 mm } // #i109336# Improve auto positioning in chart -inline sal_Int32 lcl_getLegendTopBottomMargin() +sal_Int32 lcl_getLegendTopBottomMargin() { return 185; // 1/100 mm } diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx index 1549177d78f4..20d47f89758a 100644 --- a/comphelper/qa/unit/variadictemplates.cxx +++ b/comphelper/qa/unit/variadictemplates.cxx @@ -32,7 +32,7 @@ namespace { namespace detail { template <typename T> -inline void extract( +void extract( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& seq, sal_Int32 nArg, T & v, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> @@ -54,7 +54,7 @@ inline void extract( } template <typename T> -inline void extract( +void extract( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& seq, sal_Int32 nArg, ::boost::optional<T> & v, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> @@ -70,7 +70,7 @@ inline void extract( } // namespace detail template < typename T0, typename T1, typename T2, typename T3, typename T4 > -inline void unwrapArgsBaseline( +void unwrapArgsBaseline( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > const& seq, T0& v0, T1& v1, T2& v2, T3& v3, T4& v4, ::com::sun::star::uno::Reference< diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx index 51257fe3c414..37242356e12b 100644 --- a/comphelper/source/misc/anytostring.cxx +++ b/comphelper/source/misc/anytostring.cxx @@ -36,7 +36,7 @@ void appendTypeError( buf.append( '>' ); } -inline void appendChar( OUStringBuffer & buf, sal_Unicode c ) +void appendChar( OUStringBuffer & buf, sal_Unicode c ) { if (c < ' ' || c > '~') { buf.append( "\\X" ); diff --git a/compilerplugins/clang/redundantinline.cxx b/compilerplugins/clang/redundantinline.cxx index 223f37ac98cb..30f970caf9d2 100644 --- a/compilerplugins/clang/redundantinline.cxx +++ b/compilerplugins/clang/redundantinline.cxx @@ -20,27 +20,24 @@ public: explicit RedundantInline(loplugin::InstantiationData const & data): FilteringRewritePlugin(data) {} - void run() override { - if (compiler.getLangOpts().CPlusPlus) { - TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); - } - } + void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } bool VisitFunctionDecl(FunctionDecl const * decl) { - if (ignoreLocation(decl) || !decl->isInlineSpecified() - || !(decl->doesThisDeclarationHaveABody() - || decl->isExplicitlyDefaulted()) - || !(decl->getLexicalDeclContext()->isRecord() - || decl->isConstexpr())) - { + if (ignoreLocation(decl)) { return true; } - auto l1 = unwindToQObject(compat::getBeginLoc(decl)); - if (l1.isValid() && l1 == unwindToQObject(compat::getEndLoc(decl))) { + if (!decl->isInlineSpecified()) { return true; } - SourceLocation inlineLoc; - unsigned n; + handleImplicitInline(decl) || handleNonExternalLinkage(decl); + return true; + } + +private: + bool removeInline(FunctionDecl const * decl, SourceLocation * inlineLoc) { + assert(inlineLoc != nullptr); + assert(inlineLoc->isInvalid()); + unsigned n = {}; // avoid -Werror=maybe-uninitialized auto end = Lexer::getLocForEndOfToken( compiler.getSourceManager().getExpansionLoc(compat::getEndLoc(decl)), 0, compiler.getSourceManager(), compiler.getLangOpts()); @@ -58,7 +55,7 @@ public: } if (s == "inline") { if (!compiler.getSourceManager().isMacroArgExpansion(loc)) { - inlineLoc = loc; + *inlineLoc = loc; } break; } else if (s == "#") { @@ -75,8 +72,8 @@ public: break; } } - if (rewriter != nullptr && inlineLoc.isValid()) { - for (auto loc = inlineLoc.getLocWithOffset( + if (rewriter != nullptr && inlineLoc->isValid()) { + for (auto loc = inlineLoc->getLocWithOffset( std::max<unsigned>(n, 1));;) { assert(loc != end); @@ -95,20 +92,14 @@ public: n += n2; loc = loc.getLocWithOffset(n2); } - if (removeText(inlineLoc, n, RewriteOptions(RemoveLineIfEmpty))) { + if (removeText(*inlineLoc, n, RewriteOptions(RemoveLineIfEmpty))) { return true; } } - report( - DiagnosticsEngine::Warning, - "function definition redundantly declared 'inline'", - inlineLoc.isValid() ? inlineLoc : compat::getBeginLoc(decl)) - << decl->getSourceRange(); - return true; + return false; } -private: - SourceLocation unwindToQObject(SourceLocation const & loc) { + SourceLocation unwindTo(SourceLocation const & loc, StringRef name) { if (!loc.isMacroID()) { return SourceLocation(); } @@ -116,8 +107,67 @@ private: return (Lexer::getImmediateMacroName( loc, compiler.getSourceManager(), compiler.getLangOpts()) - == "Q_OBJECT") - ? l : unwindToQObject(l); + == name) + ? l : unwindTo(l, name); + } + + bool isInMacroExpansion(FunctionDecl const * decl, StringRef name) { + auto loc = unwindTo(compat::getBeginLoc(decl), name); + return loc.isValid() && loc == unwindTo(compat::getEndLoc(decl), name); + } + + bool handleImplicitInline(FunctionDecl const * decl) { + if (!(decl->doesThisDeclarationHaveABody() || decl->isExplicitlyDefaulted()) + || !(decl->getLexicalDeclContext()->isRecord() || decl->isConstexpr())) + { + return false; + } + if (isInMacroExpansion(decl, "Q_OBJECT")) { + return true; + } + SourceLocation inlineLoc; + if (!removeInline(decl, &inlineLoc)) { + report( + DiagnosticsEngine::Warning, + "function definition redundantly declared 'inline'", + inlineLoc.isValid() ? inlineLoc : compat::getBeginLoc(decl)) + << decl->getSourceRange(); + } + return true; + } + + bool handleNonExternalLinkage(FunctionDecl const * decl) { + if (decl->getLinkageInternal() >= +#if CLANG_VERSION >= 40000 + ModuleLinkage +#else + ExternalLinkage +#endif + ) + { + return false; + } + if (!compiler.getSourceManager().isInMainFile(decl->getLocation())) { + // There *may* be benefit to "static inline" in include files (esp. in C code, where an + // inline function with external linkage still requires an external definition), so + // just ignore those for now: + return true; + } + if (isInMacroExpansion(decl, "G_DEFINE_TYPE") + || isInMacroExpansion(decl, "G_DEFINE_TYPE_WITH_CODE") + || isInMacroExpansion(decl, "G_DEFINE_TYPE_WITH_PRIVATE")) + { + return true; + } + SourceLocation inlineLoc; + if (!removeInline(decl, &inlineLoc)) { + report( + DiagnosticsEngine::Warning, + "function has no external linkage but is explicitly declared 'inline'", + inlineLoc.isValid() ? inlineLoc : compat::getBeginLoc(decl)) + << decl->getSourceRange(); + } + return true; } }; diff --git a/compilerplugins/clang/test/redundantinline.cxx b/compilerplugins/clang/test/redundantinline.cxx index 038a1497d98e..f69e0a3b80cf 100644 --- a/compilerplugins/clang/test/redundantinline.cxx +++ b/compilerplugins/clang/test/redundantinline.cxx @@ -11,4 +11,14 @@ S1::~S1() = default; +static inline int f8() { return 0; } // expected-error {{function has no external linkage but is explicitly declared 'inline' [loplugin:redundantinline]}} + +namespace { + +static inline int f9() { return 0; } // expected-error {{function has no external linkage but is explicitly declared 'inline' [loplugin:redundantinline]}} + +} + +int main() { return f8() + f9(); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/test/redundantinline.hxx b/compilerplugins/clang/test/redundantinline.hxx index e4efc5663e42..8e87ae05fcf7 100644 --- a/compilerplugins/clang/test/redundantinline.hxx +++ b/compilerplugins/clang/test/redundantinline.hxx @@ -52,27 +52,29 @@ void f3() {} S3::operator int() { return 0; } struct S4 { - inline S4() {} // expected-error {{[loplugin:redundantinline]}} - inline ~S4() { f1(); } // expected-error {{[loplugin:redundantinline]}} + inline S4() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} + inline ~S4() { f1(); } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} - inline void f1() { (void)this; } // expected-error {{[loplugin:redundantinline]}} + inline void f1() { (void)this; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} - static inline void f2() {} // expected-error {{[loplugin:redundantinline]}} + static inline void f2() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} - inline void operator +() {} // expected-error {{[loplugin:redundantinline]}} + inline void operator +() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} - inline operator int() { return 0; } // expected-error {{[loplugin:redundantinline]}} + inline operator int() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} - friend inline void f4() {} // expected-error {{[loplugin:redundantinline]}} + friend inline void f4() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} static constexpr int f5() { return 0; } - static constexpr inline int f6() { return 0; } // expected-error {{[loplugin:redundantinline]}} + static constexpr inline int f6() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} }; constexpr int f5() { return 0; } -constexpr inline int f6() { return 0; } // expected-error {{[loplugin:redundantinline]}} +constexpr inline int f6() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}} + +static inline int f7() { return 0; } #endif diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 61e14b44aee3..f4562c2d38ed 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -36,7 +36,7 @@ #include <rtl/process.h> using namespace ::comphelper; -static inline sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch ) +static sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch ) { return ch >= 0x0061 && ch <= 0x007a ? ch + 0x20 : ch; } diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index b69a1139c610..0dcde0e3e168 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1338,7 +1338,7 @@ sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype } namespace { - inline bool isSystemColumn( sal_Int16 attnum ) + bool isSystemColumn( sal_Int16 attnum ) { return attnum <= 0; } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index fc602926e0ef..c88583f95a3b 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -95,7 +95,7 @@ OUString concatQualified( const OUString & a, const OUString &b) return buf.makeStringAndClear(); } -static inline OString iOUStringToOString( const OUString& str, ConnectionSettings const *settings) { +static OString iOUStringToOString( const OUString& str, ConnectionSettings const *settings) { OSL_ENSURE(settings, "pgsql-sdbc: OUStringToOString got NULL settings"); return OUStringToOString( str, ConnectionSettings::encoding ); } @@ -131,7 +131,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, Connect buf.append( OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); } -static inline void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) +static void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) { buf.append( "'" ); bufferEscapeConstant( buf, value, settings ); @@ -155,7 +155,7 @@ void bufferQuoteAnyConstant( OUStringBuffer & buf, const Any &val, ConnectionSet buf.append( "NULL" ); } -static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) +static void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) { OSL_ENSURE(settings, "pgsql-sdbc: bufferQuoteIdentifier got NULL settings"); diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx index ef880c7aa7bc..4b9ef7c25b57 100644 --- a/cppu/source/threadpool/threadident.cxx +++ b/cppu/source/threadpool/threadident.cxx @@ -35,7 +35,7 @@ using namespace ::osl; using namespace ::cppu; -static inline void createLocalId( sal_Sequence **ppThreadId ) +static void createLocalId( sal_Sequence **ppThreadId ) { rtl_byte_sequence_constructNoDefault( ppThreadId , 4 + 16 ); sal_uInt32 id = osl::Thread::getCurrentIdentifier(); diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index 2a3a5432b07f..fe16b365b7f3 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -72,7 +72,7 @@ struct AlignSize_Impl // the value of the maximal alignment static sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16); -static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) +static sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) { if( nRequestedAlignment > nMaxAlignment ) nRequestedAlignment = nMaxAlignment; @@ -82,7 +82,7 @@ static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) /** * Calculate the new size of the struktur. */ -static inline sal_Int32 newAlignedSize( +static sal_Int32 newAlignedSize( sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment ) { NeededAlignment = adjustAlignment( NeededAlignment ); @@ -96,7 +96,7 @@ namespace } // !for NOT REALLY WEAK TYPES only! -static inline typelib_TypeDescriptionReference * igetTypeByName( rtl_uString const * pTypeName ) +static typelib_TypeDescriptionReference * igetTypeByName( rtl_uString const * pTypeName ) { typelib_TypeDescriptionReference * pRef = nullptr; ::typelib_typedescriptionreference_getByName( &pRef, pTypeName ); diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index 3afc22e9cead..1c8f17761cb8 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -78,7 +78,7 @@ struct AlignSize_Impl // the value of the maximal alignment static sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16); -static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) +static sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) { if( nRequestedAlignment > nMaxAlignment ) nRequestedAlignment = nMaxAlignment; @@ -88,19 +88,19 @@ static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) /** * Calculate the new size of the structure. */ -static inline sal_Int32 newAlignedSize( +static sal_Int32 newAlignedSize( sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment ) { NeededAlignment = adjustAlignment( NeededAlignment ); return (OldSize + NeededAlignment -1) / NeededAlignment * NeededAlignment + ElementSize; } -static inline bool reallyWeak( typelib_TypeClass eTypeClass ) +static bool reallyWeak( typelib_TypeClass eTypeClass ) { return TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ); } -static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass ) +static sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass ) { OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass ); @@ -358,7 +358,7 @@ extern "C" void SAL_CALL typelib_typedescription_revokeCallback( } } -static inline void typelib_typedescription_initTables( +static void typelib_typedescription_initTables( typelib_TypeDescription * pTD ) { typelib_InterfaceTypeDescription * pITD = reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD); @@ -1275,7 +1275,7 @@ void deleteExceptions( } // frees anything except typelib_TypeDescription base! -static inline void typelib_typedescription_destructExtendedMembers( +static void typelib_typedescription_destructExtendedMembers( typelib_TypeDescription * pTD ) { OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass ); @@ -1585,7 +1585,7 @@ extern "C" void SAL_CALL typelib_typedescription_register( } -static inline bool type_equals( +static bool type_equals( typelib_TypeDescriptionReference const * p1, typelib_TypeDescriptionReference const * p2 ) { return (p1 == p2 || diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index fa22dc661ecf..d442ca0bc7d7 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -51,7 +51,7 @@ namespace { -inline bool td_equals( typelib_InterfaceTypeDescription const * pTD1, +bool td_equals( typelib_InterfaceTypeDescription const * pTD1, typelib_InterfaceTypeDescription const * pTD2 ) { return (pTD1 == pTD2 || @@ -80,15 +80,15 @@ struct ObjectEntry std::vector< InterfaceEntry > aInterfaces; bool mixedObject; - explicit inline ObjectEntry( const OUString & rOId_ ); + explicit ObjectEntry( const OUString & rOId_ ); - inline void append( + void append( uno_DefaultEnvironment * pEnv, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr, uno_freeProxyFunc fpFreeProxy ); - inline InterfaceEntry * find( + InterfaceEntry * find( typelib_InterfaceTypeDescription * pTypeDescr ); - inline sal_Int32 find( void const * iface_ptr, std::size_t pos ) const; + sal_Int32 find( void const * iface_ptr, std::size_t pos ) const; }; @@ -118,10 +118,10 @@ struct EnvironmentsData EnvironmentsData() : isDisposing(false) {} ~EnvironmentsData(); - inline void getEnvironment( + void getEnvironment( uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext ); - inline void registerEnvironment( uno_Environment ** ppEnv ); - inline void getRegisteredEnvironments( + void registerEnvironment( uno_Environment ** ppEnv ); + void getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, const OUString & rEnvDcp ); @@ -145,7 +145,7 @@ struct uno_DefaultEnvironment : public uno_ExtEnvironment }; -inline ObjectEntry::ObjectEntry( OUString const & rOId_ ) +ObjectEntry::ObjectEntry( OUString const & rOId_ ) : oid( rOId_ ), nRef( 0 ), mixedObject( false ) @@ -154,7 +154,7 @@ inline ObjectEntry::ObjectEntry( OUString const & rOId_ ) } -inline void ObjectEntry::append( +void ObjectEntry::append( uno_DefaultEnvironment * pEnv, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr, uno_freeProxyFunc fpFreeProxy ) @@ -179,7 +179,7 @@ inline void ObjectEntry::append( } -inline InterfaceEntry * ObjectEntry::find( +InterfaceEntry * ObjectEntry::find( typelib_InterfaceTypeDescription * pTypeDescr_ ) { OSL_ASSERT( ! aInterfaces.empty() ); @@ -210,7 +210,7 @@ inline InterfaceEntry * ObjectEntry::find( } -inline sal_Int32 ObjectEntry::find( +sal_Int32 ObjectEntry::find( void const * iface_ptr, std::size_t pos ) const { std::size_t size = aInterfaces.size(); @@ -826,7 +826,7 @@ namespace class theStaticOIdPart : public rtl::Static<makeOIdPart, theStaticOIdPart> {}; -inline const OUString & unoenv_getStaticOIdPart() +const OUString & unoenv_getStaticOIdPart() { return theStaticOIdPart::get().getOIdPart(); } @@ -912,7 +912,7 @@ EnvironmentsData::~EnvironmentsData() } -inline void EnvironmentsData::getEnvironment( +void EnvironmentsData::getEnvironment( uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext ) { if (*ppEnv) @@ -934,7 +934,7 @@ inline void EnvironmentsData::getEnvironment( } -inline void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv ) +void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv ) { OSL_ENSURE( ppEnv, "### null ptr!" ); uno_Environment * pEnv = *ppEnv; @@ -973,7 +973,7 @@ inline void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv ) } -inline void EnvironmentsData::getRegisteredEnvironments( +void EnvironmentsData::getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, const OUString & rEnvDcp ) { diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index c5ce6709991f..c203523efa2c 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -268,7 +268,7 @@ uno_Mediate_Mapping::uno_Mediate_Mapping( } -static inline OUString getMappingName( +static OUString getMappingName( const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) { OUStringBuffer aKey( 64 ); @@ -285,7 +285,7 @@ static inline OUString getMappingName( return aKey.makeStringAndClear(); } -static inline OUString getBridgeName( +static OUString getBridgeName( const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) { OUStringBuffer aBridgeName( 16 ); @@ -302,7 +302,7 @@ static inline OUString getBridgeName( #ifndef DISABLE_DYNLOADING -static inline void setNegativeBridge( const OUString & rBridgeName ) +static void setNegativeBridge( const OUString & rBridgeName ) { MappingsData & rData = getMappingsData(); MutexGuard aGuard( rData.aNegativeLibsMutex ); @@ -337,7 +337,7 @@ static uno_ext_getMappingFunc selectMapFunc( const OUString & rBridgeName ) #else -static inline bool loadModule(osl::Module & rModule, const OUString & rBridgeName) +static bool loadModule(osl::Module & rModule, const OUString & rBridgeName) { bool bNeg; { @@ -472,7 +472,7 @@ static Mapping getDirectMapping( } -static inline Mapping createMediateMapping( +static Mapping createMediateMapping( const Environment & rFrom, const Environment & rTo, const Mapping & rFrom2Uno, const Mapping & rUno2To, const OUString & rAddPurpose ) diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx index 848aaa39f428..97412ba70d08 100644 --- a/cppu/source/uno/sequence.cxx +++ b/cppu/source/uno/sequence.cxx @@ -41,7 +41,7 @@ namespace cppu { -static inline uno_Sequence * reallocSeq( +static uno_Sequence * reallocSeq( uno_Sequence * pReallocate, std::size_t nElementSize, sal_Int32 nElements ) { OSL_ASSERT( nElements >= 0 ); @@ -68,7 +68,7 @@ static inline uno_Sequence * reallocSeq( } -static inline bool idefaultConstructElements( +static bool idefaultConstructElements( uno_Sequence ** ppSeq, typelib_TypeDescriptionReference * pElementType, sal_Int32 nStartIndex, sal_Int32 nStopIndex, @@ -310,7 +310,7 @@ static inline bool idefaultConstructElements( } -static inline bool icopyConstructFromElements( +static bool icopyConstructFromElements( uno_Sequence ** ppSeq, void * pSourceElements, typelib_TypeDescriptionReference * pElementType, sal_Int32 nStopIndex, @@ -570,7 +570,7 @@ static inline bool icopyConstructFromElements( } -static inline bool ireallocSequence( +static bool ireallocSequence( uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pElementType, sal_Int32 nSize, diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx index a63dcdacf3b1..164db03314eb 100644 --- a/cppuhelper/source/access_control.cxx +++ b/cppuhelper/source/access_control.cxx @@ -34,7 +34,7 @@ using rtl::OUString; namespace { - inline OUString str_ac_singleton() + OUString str_ac_singleton() { return OUString("/singletons/com.sun.star.security.theAccessController"); } @@ -85,7 +85,7 @@ namespace { #pragma pack(pop) #endif -inline void checkPermission( +void checkPermission( Reference< security::XAccessController > const & xController, Type const & type, rtl_uString * str1, rtl_uString * str2 ) { diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index f6b7aa0cf0da..62839c64d491 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -59,7 +59,7 @@ using rtl::OUStringBuffer; namespace cppu { -static inline void try_dispose( Reference< XInterface > const & xInstance ) +static void try_dispose( Reference< XInterface > const & xInstance ) { Reference< lang::XComponent > xComp( xInstance, UNO_QUERY ); if (xComp.is()) @@ -68,7 +68,7 @@ static inline void try_dispose( Reference< XInterface > const & xInstance ) } } -static inline void try_dispose( Reference< lang::XComponent > const & xComp ) +static void try_dispose( Reference< lang::XComponent > const & xComp ) { if (xComp.is()) { diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index 647184a40802..5770bf50aa21 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -46,7 +46,7 @@ using cppuhelper::detail::XExceptionThrower; struct ExceptionThrower : public uno_Interface, XExceptionThrower { - inline ExceptionThrower(); + ExceptionThrower(); virtual ~ExceptionThrower() {} @@ -164,7 +164,7 @@ void ExceptionThrower::rethrowException() } -inline ExceptionThrower::ExceptionThrower() +ExceptionThrower::ExceptionThrower() { uno_Interface::acquire = ExceptionThrower_acquire_release_nop; uno_Interface::release = ExceptionThrower_acquire_release_nop; diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 2abad8783bcf..c0f5477d2029 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -54,7 +54,7 @@ static ::osl::Mutex & getImplHelperInitMutex() } -static inline void checkInterface( Type const & rType ) +static void checkInterface( Type const & rType ) { if (TypeClass_INTERFACE != rType.getTypeClass()) { @@ -64,17 +64,17 @@ static inline void checkInterface( Type const & rType ) } } -static inline bool isXInterface( rtl_uString * pStr ) +static bool isXInterface( rtl_uString * pStr ) { return OUString::unacquired(&pStr) == "com.sun.star.uno.XInterface"; } -static inline void * makeInterface( sal_IntPtr nOffset, void * that ) +static void * makeInterface( sal_IntPtr nOffset, void * that ) { return (static_cast<char *>(that) + nOffset); } -static inline bool td_equals( +static bool td_equals( typelib_TypeDescriptionReference const * pTDR1, typelib_TypeDescriptionReference const * pTDR2 ) { @@ -82,7 +82,7 @@ static inline bool td_equals( OUString::unacquired(&pTDR1->pTypeName) == OUString::unacquired(&pTDR2->pTypeName)); } -static inline type_entry * getTypeEntries( class_data * cd ) +static type_entry * getTypeEntries( class_data * cd ) { type_entry * pEntries = cd->m_typeEntries; if (! cd->m_storedTypeRefs) // not inited? @@ -117,7 +117,7 @@ static inline type_entry * getTypeEntries( class_data * cd ) return pEntries; } -static inline void fillTypes( Type * types, class_data * cd ) +static void fillTypes( Type * types, class_data * cd ) { type_entry * pEntries = getTypeEntries( cd ); for ( sal_Int32 n = cd->m_nTypes; n--; ) @@ -168,7 +168,7 @@ bool recursivelyFindType( } -static inline void * queryDeepNoXInterface( +static void * queryDeepNoXInterface( typelib_TypeDescriptionReference const * pDemandedTDR, class_data * cd, void * that ) { type_entry * pEntries = getTypeEntries( cd ); diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index cfaebecfcc86..2b8d5407ce81 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -103,12 +103,12 @@ public: class theImplNames : public rtl::Static<ImplNames, theImplNames> {}; -inline OUString s_impl_name() +OUString s_impl_name() { return OUString(IMPL_NAME); } -inline Sequence< OUString > const & s_get_service_names() +Sequence< OUString > const & s_get_service_names() { return theImplNames::get().getNames(); } diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index a8053aac6b61..83e7726f0a35 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -43,15 +43,15 @@ IPropertyArrayHelper::~IPropertyArrayHelper() { } -static inline const css::uno::Type & getPropertyTypeIdentifier( ) +static const css::uno::Type & getPropertyTypeIdentifier( ) { return cppu::UnoType<XPropertyChangeListener>::get(); } -static inline const css::uno::Type & getPropertiesTypeIdentifier() +static const css::uno::Type & getPropertiesTypeIdentifier() { return cppu::UnoType<XPropertiesChangeListener>::get(); } -static inline const css::uno::Type & getVetoableTypeIdentifier() +static const css::uno::Type & getVetoableTypeIdentifier() { return cppu::UnoType<XVetoableChangeListener>::get(); } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 1627e2277526..b4aec385c956 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -66,7 +66,7 @@ static typelib_TypeDescription * createCTD( const Reference< XTypeDescription > & xType ); -inline static typelib_TypeDescription * createCTD( +static typelib_TypeDescription * createCTD( const Reference< XCompoundTypeDescription > & xType ) { typelib_TypeDescription * pRet = nullptr; @@ -123,7 +123,7 @@ inline static typelib_TypeDescription * createCTD( return pRet; } -inline static typelib_TypeDescription * createCTD( +static typelib_TypeDescription * createCTD( Reference< container::XHierarchicalNameAccess > const & access, const Reference< XStructTypeDescription > & xType ) { @@ -199,7 +199,7 @@ inline static typelib_TypeDescription * createCTD( return pRet; } -inline static typelib_TypeDescription * createCTD( +static typelib_TypeDescription * createCTD( const Reference< XInterfaceAttributeTypeDescription2 > & xAttribute ) { typelib_TypeDescription * pRet = nullptr; @@ -308,7 +308,7 @@ static typelib_TypeDescription * createCTD( return pRet; } -inline static typelib_TypeDescription * createCTD( +static typelib_TypeDescription * createCTD( Reference< container::XHierarchicalNameAccess > const & access, const Reference< XInterfaceTypeDescription2 > & xType ) { @@ -374,7 +374,7 @@ inline static typelib_TypeDescription * createCTD( return pRet; } -inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDescription > & xType ) +static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDescription > & xType ) { typelib_TypeDescription * pRet = nullptr; if (xType.is()) @@ -393,7 +393,7 @@ inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDes return pRet; } -inline static typelib_TypeDescription * createCTD( +static typelib_TypeDescription * createCTD( Reference< container::XHierarchicalNameAccess > const & access, const Reference< XIndirectTypeDescription > & xType ) { diff --git a/cppuhelper/source/typeprovider.cxx b/cppuhelper/source/typeprovider.cxx index 125ceda30ca8..c4258ef61cc8 100644 --- a/cppuhelper/source/typeprovider.cxx +++ b/cppuhelper/source/typeprovider.cxx @@ -50,7 +50,7 @@ Sequence< sal_Int8 > OImplementationId::getImplementationId() const } -static inline void copy( Sequence< Type > & rDest, const Sequence< Type > & rSource, sal_Int32 nOffset ) +static void copy( Sequence< Type > & rDest, const Sequence< Type > & rSource, sal_Int32 nOffset ) { Type * pDest = rDest.getArray(); const Type * pSource = rSource.getConstArray(); diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index fc53cc56d440..cd3fa5e48dfc 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -38,7 +38,7 @@ namespace cppu // due to static Reflection destruction from usr, there must be a mutex leak (#73272#) // this is used to lock all instances of OWeakConnectionPoint and OWeakRefListener as well as OWeakObject::m_pWeakConnectionPoint -inline static Mutex & getWeakMutex() +static Mutex & getWeakMutex() { static Mutex * s_pMutex = nullptr; if (! s_pMutex) diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 06e6b685ea63..9ed418c2149b 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -62,13 +62,13 @@ namespace unoexe static bool s_quiet = false; -static inline void out( const sal_Char * pText ) +static void out( const sal_Char * pText ) { if (! s_quiet) fprintf( stderr, "%s", pText ); } -static inline void out( const OUString & rText ) +static void out( const OUString & rText ) { if (! s_quiet) { 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)); } diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 1cd92ab7835a..5b4f64891c76 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -86,7 +86,7 @@ namespace } } - template < typename T > inline void tryDispose( Reference<T> &r ) + template < typename T > void tryDispose( Reference<T> &r ) { try { diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index f9aaceaabdfe..27840ac35d7c 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -38,7 +38,7 @@ namespace @param _rBase the base point @param _aVector the vector which will be added */ - inline tools::Rectangle calcRect(const Point& _rBase,const Point& _aVector) + tools::Rectangle calcRect(const Point& _rBase,const Point& _aVector) { return tools::Rectangle( _rBase - _aVector, _rBase + _aVector ); } diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 50cc7cb72890..b3d2abd1d932 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -239,7 +239,7 @@ bool needToSyncRepository(OUString const & name) namespace { -inline OUString encodeForRcFile( OUString const & str ) +OUString encodeForRcFile( OUString const & str ) { // escape $\{} (=> rtl bootstrap files) OUStringBuffer buf; diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 3514a0815d2d..2bd542379a59 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -95,7 +95,7 @@ class PackageRegistryImpl : private MutexHolder, public t_helper Reference<deployment::XPackageRegistry> const & xBackend ); protected: - inline void check(); + void check(); virtual void SAL_CALL disposing() override; virtual ~PackageRegistryImpl() override; @@ -122,7 +122,7 @@ public: }; -inline void PackageRegistryImpl::check() +void PackageRegistryImpl::check() { ::osl::MutexGuard guard( getMutex() ); if (rBHelper.bInDispose || rBHelper.bDisposed) { diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index cbf91bca647d..c2ca9b0ca4c1 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1277,7 +1277,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle( return *pBundle; } -inline bool isBundle_( OUString const & mediaType ) +bool isBundle_( OUString const & mediaType ) { // xxx todo: additional parsing? return !mediaType.isEmpty() && diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 4adc21b683d8..7f1cbffb3488 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -223,7 +223,7 @@ OUString makeAbsoluteFileUrl( namespace { -inline void printf_space( sal_Int32 space ) +void printf_space( sal_Int32 space ) { while (space--) dp_misc::writeConsole(" "); diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 71858367f92f..e03fc094abcb 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -193,7 +193,7 @@ static void splash_setup( struct splash* splash, int const barc[3], int const fr #define SHIFT( x, bits ) ( ( (bits) >= 0 )? ( (x) << (bits) ): ( (x) >> -(bits) ) ) // Position of the highest bit (more or less integer log2) -static inline int HIGHEST_BIT( unsigned long x ) +static int HIGHEST_BIT( unsigned long x ) { int i = 0; for ( ; x; ++i ) @@ -203,7 +203,7 @@ static inline int HIGHEST_BIT( unsigned long x ) } // Number of bits set to 1 -static inline int BITS( unsigned long x ) +static int BITS( unsigned long x ) { int i = 0; for ( ; x; x >>= 1 ) diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 3c033198344d..053b485cc46f 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::linguistic2; #define SCRLRANGE 20 // Scroll 1/20 of the width/height, when in QueryDrop -static inline void lcl_AllignToPixel( Point& rPoint, OutputDevice const * pOutDev, short nDiffX, short nDiffY ) +static void lcl_AllignToPixel( Point& rPoint, OutputDevice const * pOutDev, short nDiffX, short nDiffY ) { rPoint = pOutDev->LogicToPixel( rPoint ); diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index ba9791f31a52..44b6ffaab159 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1388,7 +1388,7 @@ SvxBoxItem& SvxBoxItem::operator=( const SvxBoxItem& rBox ) } -static inline bool CmpBrdLn( const std::unique_ptr<SvxBorderLine> & pBrd1, const SvxBorderLine* pBrd2 ) +static bool CmpBrdLn( const std::unique_ptr<SvxBorderLine> & pBrd1, const SvxBorderLine* pBrd2 ) { if( pBrd1.get() == pBrd2 ) return true; @@ -3272,7 +3272,7 @@ sal_uInt16 SvxBrushItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const } -static inline sal_Int8 lcl_PercentToTransparency(long nPercent) +static sal_Int8 lcl_PercentToTransparency(long nPercent) { // 0xff must not be returned! return sal_Int8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index b528acb693d3..546c1e9c1d68 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -25,7 +25,7 @@ Description: Is the printer valid --------------------------------------------------------------------*/ -static inline bool IsValidPrinter( const Printer* pPtr ) +static bool IsValidPrinter( const Printer* pPtr ) { return !pPtr->GetName().isEmpty(); } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 91b558c756ce..f8514bb53a08 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -106,25 +106,25 @@ static const sal_Char static OUString EncryptBlockName_Imp(const OUString& rName); -static inline bool NonFieldWordDelim( const sal_Unicode c ) +static bool NonFieldWordDelim( const sal_Unicode c ) { return ' ' == c || '\t' == c || 0x0a == c || cNonBreakingSpace == c || 0x2011 == c; } -static inline bool IsWordDelim( const sal_Unicode c ) +static bool IsWordDelim( const sal_Unicode c ) { return c == 0x1 || NonFieldWordDelim(c); } -static inline bool IsLowerLetter( sal_Int32 nCharType ) +static bool IsLowerLetter( sal_Int32 nCharType ) { return CharClass::isLetterType( nCharType ) && ( css::i18n::KCharacterType::LOWER & nCharType); } -static inline bool IsUpperLetter( sal_Int32 nCharType ) +static bool IsUpperLetter( sal_Int32 nCharType ) { return CharClass::isLetterType( nCharType ) && ( css::i18n::KCharacterType::UPPER & nCharType); diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 9579b8e9eaa2..bf1f40585bf3 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -1548,7 +1548,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet, SkipToken(); } -static inline sal_uInt32 CalcShading( sal_uInt32 nColor, sal_uInt32 nFillColor, sal_uInt8 nShading ) +static sal_uInt32 CalcShading( sal_uInt32 nColor, sal_uInt32 nFillColor, sal_uInt8 nShading ) { nColor = (nColor * nShading) / 100; nFillColor = (nFillColor * ( 100 - nShading )) / 100; diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 0ff93ac2ef83..b703f6333bc0 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -203,7 +203,7 @@ static util::DateTime getDate( sal_Int32 nDate ) return aDate; } -static inline Date setDate( util::DateTime const & rDate ) +static Date setDate( util::DateTime const & rDate ) { return Date( rDate.Day, rDate.Month, rDate.Year ); } @@ -222,7 +222,7 @@ static util::DateTime getTime(sal_Int64 const nTime) return aTime; } -static inline tools::Time setTime( util::DateTime const & rDate ) +static tools::Time setTime( util::DateTime const & rDate ) { return tools::Time( rDate ); } diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx index 2e98243864a0..12ebce788433 100644 --- a/extensions/source/logging/csvformatter.cxx +++ b/extensions/source/logging/csvformatter.cxx @@ -89,7 +89,7 @@ namespace const sal_Unicode comma_char = ','; const OUString dos_newline = "\r\n"; - inline bool needsQuoting(const OUString& str) + bool needsQuoting(const OUString& str) { static const OUString quote_trigger_chars = "\",\n\r"; sal_Int32 len = str.getLength(); @@ -99,7 +99,7 @@ namespace return false; }; - inline void appendEncodedString(OUStringBuffer& buf, const OUString& str) + void appendEncodedString(OUStringBuffer& buf, const OUString& str) { if(needsQuoting(str)) { diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 1231037d712d..824c0cdf6fc1 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -40,7 +40,7 @@ #else #define dump_state( a, b, c, d ) ; #endif -static inline void dbg_msg( const char* pString, ... ) +static void dbg_msg( const char* pString, ... ) { #if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL va_list ap; @@ -472,7 +472,7 @@ enum FrameStyleType { #define BYTE_BUFFER_SIZE 32768 -static inline sal_uInt8 ReadValue( FILE* fp, int depth ) +static sal_uInt8 ReadValue( FILE* fp, int depth ) { if( depth == 16 ) { diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx index 636d9197153c..d9254f5a1c9e 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -442,11 +442,11 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities, } namespace { - inline bool lcl_isDec(sal_Unicode ch) + bool lcl_isDec(sal_Unicode ch) { return ch >= L'0' && ch <= L'9'; } - inline bool lcl_isHex(sal_Unicode ch) + bool lcl_isHex(sal_Unicode ch) { return lcl_isDec(ch) || (ch >= L'A' && ch <= L'F') || (ch >= L'a' && ch <= L'f'); } diff --git a/filter/source/msfilter/countryid.cxx b/filter/source/msfilter/countryid.cxx index 2f63c4631f53..1ffe69ae94a8 100644 --- a/filter/source/msfilter/countryid.cxx +++ b/filter/source/msfilter/countryid.cxx @@ -268,10 +268,10 @@ struct CountryEntryPred_Language explicit CountryEntryPred_Language( LanguageType eLanguage ) : meLanguage( eLanguage ) {} - inline bool operator()( const CountryEntry& rCmp ) const; + bool operator()( const CountryEntry& rCmp ) const; }; -inline bool CountryEntryPred_Language::operator()( const CountryEntry& rCmp ) const +bool CountryEntryPred_Language::operator()( const CountryEntry& rCmp ) const { // rCmp.mbUseSubLang==true -> compare full language type // rCmp.mbUseSubLang==false -> compare primary language only diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 9200cce2ca8d..b99e6cc4d63c 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -44,7 +44,7 @@ namespace { /** Rotates rnValue left by nBits bits. */ template< typename Type > -inline void lclRotateLeft( Type& rnValue, int nBits ) +void lclRotateLeft( Type& rnValue, int nBits ) { OSL_ASSERT( nBits >= 0 && @@ -54,7 +54,7 @@ inline void lclRotateLeft( Type& rnValue, int nBits ) /** Rotates the lower nWidth bits of rnValue left by nBits bits. */ template< typename Type > -inline void lclRotateLeft( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth ) +void lclRotateLeft( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth ) { OSL_ASSERT( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8) ); Type nMask = static_cast< Type >( (1UL << nWidth) - 1 ); @@ -289,7 +289,7 @@ static void lcl_PrintDigest(const sal_uInt8* pDigest, const char* msg) printf("\n"); } #else -static inline void lcl_PrintDigest(const sal_uInt8* /*pDigest*/, const char* /*msg*/) +static void lcl_PrintDigest(const sal_uInt8* /*pDigest*/, const char* /*msg*/) { } #endif diff --git a/forms/source/xforms/xmlhelper.cxx b/forms/source/xforms/xmlhelper.cxx index 5245123a55df..adb0e6f27918 100644 --- a/forms/source/xforms/xmlhelper.cxx +++ b/forms/source/xforms/xmlhelper.cxx @@ -40,7 +40,7 @@ using com::sun::star::xml::dom::XDocumentBuilder; // 2: NameChar // 4: NCNameStartChar // 8: NCNameChar -static inline sal_uInt8 lcl_getCharClass( sal_Unicode c ) +static sal_uInt8 lcl_getCharClass( sal_Unicode c ) { sal_uInt8 nClass = 0; diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 59b36b2d3914..6859e744ca15 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -119,7 +119,7 @@ SvNumFormatType lcl_GetRetFormat( OpCode eOpCode ) } } -inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, +void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const OUString* pTable, sal_uInt16 nOpCode ) { sheet::FormulaOpCodeMapEntry aEntry; diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 84a8e4bc6834..58fa8b77ece9 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -43,7 +43,7 @@ namespace formula // --- helpers -------------------------------------------------------------- -static inline bool lcl_IsReference( OpCode eOp, StackVar eType ) +static bool lcl_IsReference( OpCode eOp, StackVar eType ) { return (eOp == ocPush && (eType == svSingleRef || eType == svDoubleRef)) diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index ed7d28b0612f..b3c0b4a204bc 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -179,7 +179,7 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs, } -static inline bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, sal_Int32 nPos ) +static bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, sal_Int32 nPos ) { if( _pCharClass->isLetterNumeric( rStr, nPos ) ) return true; diff --git a/hwpfilter/source/mzstring.cxx b/hwpfilter/source/mzstring.cxx index 4327a3315f4d..96250aa45774 100644 --- a/hwpfilter/source/mzstring.cxx +++ b/hwpfilter/source/mzstring.cxx @@ -39,7 +39,7 @@ const int AllocSize = 8; -static inline int get_alloc_size(int len) +static int get_alloc_size(int len) { return (len + AllocSize - 1) / AllocSize * AllocSize; } diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index 6ddafafe2c1c..215a82c64665 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -32,7 +32,7 @@ constexpr LanguageType k0(0); constexpr LanguageType kSAME(0xffff); namespace { -inline LanguageType getOverrideLang( LanguageType nLang, LanguageType nOverride ) +LanguageType getOverrideLang( LanguageType nLang, LanguageType nOverride ) { return nOverride ? ((nOverride == kSAME) ? nLang : nOverride) : nLang; } diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index ed768a907303..ba3d82cce475 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1733,12 +1733,12 @@ void LanguageTag::getIsoLanguageScriptCountry( OUString& rLanguage, OUString& rS namespace { -inline bool isLowerAscii( sal_Unicode c ) +bool isLowerAscii( sal_Unicode c ) { return 'a' <= c && c <= 'z'; } -inline bool isUpperAscii( sal_Unicode c ) +bool isUpperAscii( sal_Unicode c ) { return 'A' <= c && c <= 'Z'; } diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index e923fbd99eaa..531fc8e6ccab 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -118,7 +118,7 @@ Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 n return result; } -static inline bool isCJK( const Locale& rLocale ) { +static bool isCJK( const Locale& rLocale ) { return rLocale.Language == "zh" || rLocale.Language == "ja" || rLocale.Language == "ko"; } diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index 5367b975e10c..356782b119f0 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -87,7 +87,7 @@ BreakIterator_CJK::getWordBoundary( const OUString& text, sal_Int32 anyPos, } namespace { -inline bool isHangul( sal_Unicode cCh ) +bool isHangul( sal_Unicode cCh ) { return (cCh >= 0xAC00 && cCh <= 0xD7AF) || (cCh >= 0x1100 && cCh <= 0x11FF); } diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx index 3d373229da17..f36262a34cfe 100644 --- a/i18npool/source/breakiterator/gendict.cxx +++ b/i18npool/source/breakiterator/gendict.cxx @@ -68,12 +68,12 @@ static sal_Int64 existMarkOffset = 0; static sal_uInt8 exists[0x2000]; static sal_uInt32 charArray[0x10000]; -static inline void set_exists(sal_uInt32 index) +static void set_exists(sal_uInt32 index) { exists[index>>3] |= 1 << (index & 0x07); } -static inline void printIncludes(FILE* source_fp) +static void printIncludes(FILE* source_fp) { #ifndef DICT_JA_ZH_IN_DATAFILE fputs("/* !!!The file is generated automatically. DO NOT edit the file manually!!! */\n\n", source_fp); @@ -83,7 +83,7 @@ static inline void printIncludes(FILE* source_fp) #endif } -static inline void printFunctions(FILE* source_fp, const char *lang) +static void printFunctions(FILE* source_fp, const char *lang) { #ifndef DICT_JA_ZH_IN_DATAFILE fputs ("#ifndef DISABLE_DYNLOADING\n", source_fp); @@ -105,7 +105,7 @@ static inline void printFunctions(FILE* source_fp, const char *lang) #endif } -static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray) +static void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray) { // generate main dict. data array #ifndef DICT_JA_ZH_IN_DATAFILE @@ -158,7 +158,7 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa #endif } -static inline void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenArray) +static void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenArray) { #ifndef DICT_JA_ZH_IN_DATAFILE fprintf(source_fp, "static const sal_Int32 lenArray[] = {\n\t"); @@ -188,7 +188,7 @@ static inline void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenA /* FIXME?: what happens if in every range i there is at least one charArray != 0 => this will make index1[] = {0x00, 0x01, 0x02,... 0xfe, 0xff } => then in index2, the last range will be ignored incorrectly */ -static inline void printIndex1(FILE *source_fp, sal_Int16 *set) +static void printIndex1(FILE *source_fp, sal_Int16 *set) { #ifndef DICT_JA_ZH_IN_DATAFILE fprintf (source_fp, "static const sal_Int16 index1[] = {\n\t"); @@ -217,7 +217,7 @@ static inline void printIndex1(FILE *source_fp, sal_Int16 *set) #endif } -static inline void printIndex2(FILE *source_fp, sal_Int16 const *set) +static void printIndex2(FILE *source_fp, sal_Int16 const *set) { #ifndef DICT_JA_ZH_IN_DATAFILE fputs ("static const sal_Int32 index2[] = {\n\t", source_fp); @@ -255,7 +255,7 @@ static inline void printIndex2(FILE *source_fp, sal_Int16 const *set) /* Generates a bitmask for the existence of sal_Unicode values in dictionary; it packs 8 sal_Bool values in 1 sal_uInt8 */ -static inline void printExistsMask(FILE *source_fp) +static void printExistsMask(FILE *source_fp) { #ifndef DICT_JA_ZH_IN_DATAFILE fprintf (source_fp, "static const sal_uInt8 existMark[] = {\n\t"); diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx index 421272851f42..77620fd4a9c3 100644 --- a/i18nutil/source/utility/casefolding.cxx +++ b/i18nutil/source/utility/casefolding.cxx @@ -120,7 +120,7 @@ Mapping casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 l return dummy; } -static inline bool +static bool is_ja_voice_sound_mark(sal_Unicode& current, sal_Unicode next) { sal_Unicode c = 0; diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx index 89bc2e4d0fc0..27abf60928e1 100644 --- a/idl/source/prj/globals.cxx +++ b/idl/source/prj/globals.cxx @@ -40,7 +40,7 @@ IdlDll::~IdlDll() { } -static inline SvStringHashEntry * INS( const OString& rName ) +static SvStringHashEntry * INS( const OString& rName ) { sal_uInt32 nIdx; GetIdlApp().pHashTable->Insert( rName, &nIdx ); diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx index 97910e3b7f7c..3926e47c2d43 100644 --- a/idl/source/prj/svidl.cxx +++ b/idl/source/prj/svidl.cxx @@ -81,7 +81,7 @@ static bool FileMove_Impl( const OUString & rFile1, const OUString & rFile2, boo //This function gets a system path to a file [fname], creates a temp file in //the same folder as [fname] and returns the system path of the temp file. -static inline OUString tempFileHelper(OUString const & fname) +static OUString tempFileHelper(OUString const & fname) { OUString aTmpFile; diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index d84e1c56e6c4..cb927de74e9f 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star::uno; namespace javaunohelper { -static inline OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env ) +static OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env ) { OSL_ASSERT( sizeof (sal_Unicode) == sizeof (jchar) ); jsize len = jni_env->GetStringLength( jstr ); diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 4589a46ffa6b..a1bf0d7d70d8 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -3438,7 +3438,7 @@ namespace { // cater for representable integer cases and we don't want to link against // libuno_sal, we'll have to have an own implementation. The special large // integer cases seems not be needed here. -inline bool lok_approxEqual(double a, double b) +bool lok_approxEqual(double a, double b) { static const double e48 = 1.0 / (16777216.0 * 16777216.0); if (a == b) diff --git a/lingucomponent/source/languageguessing/guess.cxx b/lingucomponent/source/languageguessing/guess.cxx index 680aa4fd75ad..545912dbb032 100644 --- a/lingucomponent/source/languageguessing/guess.cxx +++ b/lingucomponent/source/languageguessing/guess.cxx @@ -39,7 +39,7 @@ using namespace std; -static inline bool isSeparator(const char c){ +static bool isSeparator(const char c){ return c == GUESS_SEPARATOR_OPEN || c == GUESS_SEPARATOR_SEP || c == GUESS_SEPARATOR_CLOSE || c == '\0'; } diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index b49e4f555418..0374d38f0729 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -112,7 +112,7 @@ bool LinguIsUnspecified( const OUString & rBcp47 ) return rBcp47 == "zxx" || rBcp47 == "und" || rBcp47 == "mul"; } -static inline sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 ) +static sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 ) { return std::min(std::min(n1, n2), n3); } diff --git a/lotuswordpro/source/filter/xfilter/xfbase64.cxx b/lotuswordpro/source/filter/xfilter/xfbase64.cxx index 226541bf2659..3a1c82778f48 100644 --- a/lotuswordpro/source/filter/xfilter/xfbase64.cxx +++ b/lotuswordpro/source/filter/xfilter/xfbase64.cxx @@ -72,7 +72,7 @@ const sal_Char aBase64EncodeTable[] = * @descr Encode 3 byte to 4 byte. * Please refer to RFC to get the base64 algorithm. */ -static inline void Encode_(const sal_uInt8 *src, sal_Char* dest) +static void Encode_(const sal_uInt8 *src, sal_Char* dest) { sal_Int32 nBinaer = (src[ 0] << 16) + (src[1] << 8) + diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index c24c61c2fa15..57226a5a3e5b 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -263,7 +263,7 @@ const OUString& FilterBase::getFileUrl() const namespace { -inline bool lclIsDosDrive( const OUString& rUrl, sal_Int32 nPos = 0 ) +bool lclIsDosDrive( const OUString& rUrl, sal_Int32 nPos = 0 ) { return (rUrl.getLength() >= nPos + 3) && diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx index f5de48c30133..02d070a71a9d 100644 --- a/oox/source/core/recordparser.cxx +++ b/oox/source/core/recordparser.cxx @@ -157,7 +157,7 @@ void ContextStack::popContext() namespace { /** Reads a byte from the passed stream, returns true on success. */ -inline bool lclReadByte( sal_uInt8& ornByte, BinaryInputStream& rStrm ) +bool lclReadByte( sal_uInt8& ornByte, BinaryInputStream& rStrm ) { return rStrm.readMemory( &ornByte, 1 ) == 1; } 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, diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index ef30786b6f3d..ed7b6fb11d3a 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -335,14 +335,14 @@ static void impl_AddInt( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 pAttrList->add( nElement, OString::number( nValue ).getStr() ); } -static inline sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal ) +static sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal ) { sal_uInt16 nRet = *pVal++; nRet += ( *pVal++ ) << 8; return nRet; } -static inline sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize ) +static sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize ) { sal_Int32 nRet = 0; if ( ( nPointSize == 0xfff0 ) || ( nPointSize == 4 ) ) diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index 63f0ec24f8e9..bb8d0d9a1929 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno; namespace { -inline sal_Int32 lclConvertScreenPixelToHmm( double fPixel, double fPixelPerHmm ) +sal_Int32 lclConvertScreenPixelToHmm( double fPixel, double fPixelPerHmm ) { return static_cast< sal_Int32 >( (fPixelPerHmm > 0.0) ? (fPixel / fPixelPerHmm + 0.5) : 0.0 ); } diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index a8cc9a02ba77..badce2a89fc4 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -75,13 +75,13 @@ const sal_uInt32 OLE_PALETTECOLOR_MASK = 0x0000FFFF; const sal_uInt32 OLE_SYSTEMCOLOR_MASK = 0x0000FFFF; /** Swaps the red and blue component of the passed color. */ -inline sal_uInt32 lclSwapRedBlue( sal_uInt32 nColor ) +sal_uInt32 lclSwapRedBlue( sal_uInt32 nColor ) { return static_cast< sal_uInt32 >( (nColor & 0xFF00FF00) | ((nColor & 0x0000FF) << 16) | ((nColor & 0xFF0000) >> 16) ); } /** Returns the UNO RGB color from the passed encoded OLE BGR color. */ -inline ::Color lclDecodeBgrColor( sal_uInt32 nOleColor ) +::Color lclDecodeBgrColor( sal_uInt32 nOleColor ) { return ::Color( lclSwapRedBlue( nOleColor ) & 0xFFFFFF ); } diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx index e33c66a87f21..2442fa9bc489 100644 --- a/oox/source/vml/vmlinputstream.cxx +++ b/oox/source/vml/vmlinputstream.cxx @@ -35,13 +35,13 @@ using namespace ::com::sun::star::uno; namespace { -inline const sal_Char* lclFindCharacter( const sal_Char* pcBeg, const sal_Char* pcEnd, sal_Char cChar ) +const sal_Char* lclFindCharacter( const sal_Char* pcBeg, const sal_Char* pcEnd, sal_Char cChar ) { sal_Int32 nIndex = rtl_str_indexOfChar_WithLength( pcBeg, static_cast< sal_Int32 >( pcEnd - pcBeg ), cChar ); return (nIndex < 0) ? pcEnd : (pcBeg + nIndex); } -inline bool lclIsWhiteSpace( sal_Char cChar ) +bool lclIsWhiteSpace( sal_Char cChar ) { return cChar <= 32; } @@ -69,7 +69,7 @@ const sal_Char* lclTrimWhiteSpaceFromEnd( const sal_Char* pcBeg, const sal_Char* return pcEnd; } -inline void lclAppendToBuffer( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal_Char* pcEnd ) +void lclAppendToBuffer( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal_Char* pcEnd ) { rBuffer.append( pcBeg, static_cast< sal_Int32 >( pcEnd - pcBeg ) ); } diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index c85113293308..53476430287f 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -37,7 +37,7 @@ namespace { -inline OString toByteString(rtl_uString const * str) { +OString toByteString(rtl_uString const * str) { return OString( str->buffer, str->length, RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS); diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx index 91486be50ecf..fe5affc9d069 100644 --- a/sal/osl/all/debugbase.cxx +++ b/sal/osl/all/debugbase.cxx @@ -51,7 +51,7 @@ struct StaticDebugBaseAddressFilter } }; -inline bool isSubStr( char const* pStr, rtl::OString const& subStr ) +bool isSubStr( char const* pStr, rtl::OString const& subStr ) { return rtl_str_indexOfStr( pStr, subStr.getStr() ) >= 0; } diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index cff84e395561..89969c1c40af 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -28,13 +28,13 @@ const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/'; const sal_Unicode FPH_CHAR_DOT = '.'; const sal_Unicode FPH_CHAR_COLON = ':'; -static inline const rtl::OUString FPH_PATH_SEPARATOR() +static const rtl::OUString FPH_PATH_SEPARATOR() { return rtl::OUString(FPH_CHAR_PATH_SEPARATOR); } -static inline const rtl::OUString FPH_LOCAL_DIR_ENTRY() +static const rtl::OUString FPH_LOCAL_DIR_ENTRY() { return rtl::OUString(FPH_CHAR_DOT); } -static inline const rtl::OUString FPH_PARENT_DIR_ENTRY() +static const rtl::OUString FPH_PARENT_DIR_ENTRY() { return rtl::OUString(".."); } void osl_systemPathRemoveSeparator(rtl_uString* pustrPath) diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 2b960d017fea..7ba3d90a7037 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -36,7 +36,7 @@ namespace { - inline void set_file_type(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_type(const struct stat& file_stat, oslFileStatus* pStat) { /* links to directories state also to be a directory */ if (S_ISLNK(file_stat.st_mode)) @@ -57,7 +57,7 @@ namespace pStat->uValidFields |= osl_FileStatus_Mask_Type; } - inline void set_file_access_mask(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_access_mask(const struct stat& file_stat, oslFileStatus* pStat) { // user permissions if (S_IRUSR & file_stat.st_mode) @@ -99,7 +99,7 @@ namespace required on network file systems not using unix semantics (AFS, see fdo#43095). */ - inline void set_file_access_rights(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_access_rights(const rtl::OUString& file_path, oslFileStatus* pStat) { pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -110,7 +110,7 @@ namespace pStat->uAttributes |= osl_File_Attribute_Executable; } - inline void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) { pStat->uAttributes = osl::systemPathIsHiddenFileOrDirectoryEntry(file_path) ? osl_File_Attribute_Hidden : 0; pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -118,7 +118,7 @@ namespace /* the set_file_access_rights must be called after set_file_hidden_status(...) and set_file_access_mask(...) because of the hack in set_file_access_rights(...) */ - inline void set_file_attributes( + void set_file_attributes( const rtl::OUString& file_path, const struct stat& file_stat, const sal_uInt32 uFieldMask, oslFileStatus* pStat) { set_file_hidden_status(file_path, pStat); @@ -130,21 +130,21 @@ namespace set_file_access_rights(file_path, pStat); } - inline void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat) { pStat->aAccessTime.Seconds = file_stat.st_atime; pStat->aAccessTime.Nanosec = 0; pStat->uValidFields |= osl_FileStatus_Mask_AccessTime; } - inline void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) { pStat->aModifyTime.Seconds = file_stat.st_mtime; pStat->aModifyTime.Nanosec = 0; pStat->uValidFields |= osl_FileStatus_Mask_ModifyTime; } - inline void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) { if (S_ISREG(file_stat.st_mode)) { @@ -155,7 +155,7 @@ namespace /* we only need to call stat or lstat if one of the following flags is set */ - inline bool is_stat_call_necessary(sal_uInt32 field_mask, oslFileType file_type) + bool is_stat_call_necessary(sal_uInt32 field_mask, oslFileType file_type) { return ( ((field_mask & osl_FileStatus_Mask_Type) && (file_type == osl_File_Type_Unknown)) || @@ -168,7 +168,7 @@ namespace (field_mask & osl_FileStatus_Mask_Validate)); } - inline oslFileError set_link_target_url(const rtl::OUString& file_path, oslFileStatus* pStat) + oslFileError set_link_target_url(const rtl::OUString& file_path, oslFileStatus* pStat) { rtl::OUString link_target; if (!osl::realpath(file_path, link_target)) @@ -182,7 +182,7 @@ namespace return osl_File_E_None; } - inline oslFileError setup_osl_getFileStatus( + oslFileError setup_osl_getFileStatus( DirectoryItem_Impl * pImpl, oslFileStatus* pStat, rtl::OUString& file_path) { if ((pImpl == nullptr) || (pStat == nullptr)) diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index a6b80daa9e2a..a6dd0954bf41 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -29,7 +29,7 @@ #include <osl/detail/android-bootstrap.h> #endif -static inline rtl::OString OUStringToOString(const rtl_uString* s) +static rtl::OString OUStringToOString(const rtl_uString* s) { return rtl::OUStringToOString(rtl::OUString(const_cast<rtl_uString*>(s)), osl_getThreadTextEncoding()); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index bd3729513f7d..fcc8c41cf4ab 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -43,7 +43,7 @@ using namespace osl; /** detailed wrong message. */ -static inline OString errorToString(const osl::FileBase::RC _nError) +static OString errorToString(const osl::FileBase::RC _nError) { OString sResult; switch (_nError) { @@ -103,7 +103,7 @@ static OString errorToStr(osl::FileBase::RC const& nError) # define delta 1800 // time precision, 1.8s #endif -static inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta) +static bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta) { sal_Int32 nDeltaSeconds = m_aEndTime->Seconds - m_aStartTime->Seconds; sal_Int32 nDeltaNanoSec = sal_Int32(m_aEndTime->Nanosec) - sal_Int32(m_aStartTime->Nanosec); @@ -119,7 +119,7 @@ static inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime /** compare two OUString file name. */ -static inline bool compareFileName(const OUString & ustr1, const OUString & ustr2) +static bool compareFileName(const OUString & ustr1, const OUString & ustr2) { bool bOk; // on Windows, the separator is '\', so here change to '/', then compare @@ -145,14 +145,14 @@ static inline bool compareFileName(const OUString & ustr1, const OUString & ustr /** simple version to judge if a file name or directory name is a URL or a system path, just to see if it is start with "file:///";. */ -static inline bool isURL(const OUString& pathname) +static bool isURL(const OUString& pathname) { return pathname.startsWith(aPreURL); } /** concat two part to form a URL or system path, add PATH_SEPARATOR between them if necessary, add "file:///" to beginning if necessary. */ -static inline void concatURL(OUString & pathname1, const OUString & pathname2) +static void concatURL(OUString & pathname1, const OUString & pathname2) { // check if pathname1 is full qualified URL; if (!isURL(pathname1)) @@ -170,7 +170,7 @@ static inline void concatURL(OUString & pathname1, const OUString & pathname2) /** create a temp test file using OUString name of full qualified URL or system path. */ -static inline void createTestFile(const OUString& filename) +static void createTestFile(const OUString& filename) { OUString aPathURL = filename.copy(0); osl::FileBase::RC nError; @@ -189,7 +189,7 @@ static inline void createTestFile(const OUString& filename) /** create a temp test file using OUString name of full qualified URL or system path in a base directory. */ -static inline void createTestFile(const OUString& basename, const OUString& filename) +static void createTestFile(const OUString& basename, const OUString& filename) { OUString aBaseURL = basename.copy(0); @@ -199,7 +199,7 @@ static inline void createTestFile(const OUString& basename, const OUString& file /** delete a temp test file using OUString name. */ -static inline void deleteTestFile(const OUString& filename) +static void deleteTestFile(const OUString& filename) { OUString aPathURL = filename.copy(0); osl::FileBase::RC nError; @@ -216,7 +216,7 @@ static inline void deleteTestFile(const OUString& filename) /** delete a temp test file using OUString name of full qualified URL or system path in a base directory. */ -static inline void deleteTestFile(const OUString& basename, const OUString& filename) +static void deleteTestFile(const OUString& basename, const OUString& filename) { OUString aBaseURL = basename.copy(0); @@ -226,7 +226,7 @@ static inline void deleteTestFile(const OUString& basename, const OUString& file /** create a temp test directory using OUString name of full qualified URL or system path. */ -static inline void createTestDirectory(const OUString& dirname) +static void createTestDirectory(const OUString& dirname) { OUString aPathURL = dirname.copy(0); osl::FileBase::RC nError; @@ -240,7 +240,7 @@ static inline void createTestDirectory(const OUString& dirname) /** create a temp test directory using OUString name of full qualified URL or system path in a base directory. */ -static inline void createTestDirectory(const OUString& basename, const OUString& dirname) +static void createTestDirectory(const OUString& basename, const OUString& dirname) { OUString aBaseURL = basename.copy(0); @@ -250,7 +250,7 @@ static inline void createTestDirectory(const OUString& basename, const OUString& /** delete a temp test directory using OUString name of full qualified URL or system path. */ -static inline void deleteTestDirectory(const OUString& dirname) +static void deleteTestDirectory(const OUString& dirname) { OUString aPathURL = dirname.copy(0); osl::FileBase::RC nError; @@ -270,7 +270,7 @@ static inline void deleteTestDirectory(const OUString& dirname) /** delete a temp test directory using OUString name of full qualified URL or system path in a base directory. */ -static inline void deleteTestDirectory(const OUString& basename, const OUString& dirname) +static void deleteTestDirectory(const OUString& basename, const OUString& dirname) { OUString aBaseURL = basename.copy(0); @@ -288,7 +288,7 @@ enum class oslCheckMode { /** check if the file exist */ -static inline bool ifFileExist(const OUString & str) +static bool ifFileExist(const OUString & str) { File testFile(str); return (testFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None); @@ -296,7 +296,7 @@ static inline bool ifFileExist(const OUString & str) /** check if the file can be written */ -static inline bool ifFileCanWrite(const OUString & str) +static bool ifFileCanWrite(const OUString & str) { // on Windows, the file has no write right, but can be written #ifdef _WIN32 @@ -317,7 +317,7 @@ static inline bool ifFileCanWrite(const OUString & str) return bCheckResult; } -static inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) +static bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) { OUString aUString; DirectoryItem rItem; @@ -366,7 +366,7 @@ static inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) /** construct error message */ -static inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") +static OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") { OString aString; if (returnVal == rightVal) @@ -384,7 +384,7 @@ static inline OString outputError(const OString & returnVal, const OString & rig /** Change file mode, two version in UNIX and Windows;. */ #if (defined UNX) /* chmod() method is different in Windows */ -static inline void changeFileMode(OUString & filepath, sal_Int32 mode) +static void changeFileMode(OUString & filepath, sal_Int32 mode) { OString aString; OUString aUStr = filepath.copy(0); @@ -405,7 +405,7 @@ inline void changeFileMode(OUString & filepath, sal_Int32 mode) } #endif -static inline OUString getCurrentPID(); +static OUString getCurrentPID(); // Beginning of the test cases for osl::FileBase class @@ -5133,7 +5133,7 @@ namespace osl_Directory /** get Current PID. */ -inline OUString getCurrentPID() +OUString getCurrentPID() { //~ Get current PID and turn it into OUString; int nPID = 0; diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 04af99487f85..9910925e3c5a 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -27,7 +27,7 @@ using ::rtl::OUString; /** get dll file URL. */ -static inline ::rtl::OUString getDllURL() +static ::rtl::OUString getDllURL() { #if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name. ::rtl::OUString libPath( "test_Module_DLL.dll" ); diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index 74f45b2faa21..683cbf83f2ce 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -44,7 +44,7 @@ using ::rtl::OString; /** print last error of pipe system. */ -static inline void printPipeError( ::osl::Pipe const & aPipe ) +static void printPipeError( ::osl::Pipe const & aPipe ) { oslPipeError nError = aPipe.getError( ); printf("#printPipeError# " ); diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 8b99d7089b99..47d0eeba4d0c 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -71,7 +71,7 @@ using ::rtl::OString; /** get binary Path. */ -static inline ::rtl::OUString getExecutablePath() +static ::rtl::OUString getExecutablePath() { ::rtl::OUString dirPath; osl::Module::getUrlFromAddress( diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index cba8b125bb17..85b0e8f0fb0b 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -38,7 +38,7 @@ using namespace rtl; /** print a UNI_CODE String. */ -static inline void printUString( const ::rtl::OUString & str ) +static void printUString( const ::rtl::OUString & str ) { rtl::OString aString; diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 07c7059bbc56..ab3b8433d4c3 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -43,7 +43,7 @@ using ::rtl::OUStringToOString; /** print a UNI_CODE String. And also print some comments of the string. */ -static inline void printUString( const ::rtl::OUString & str, const sal_Char * msg ) +static void printUString( const ::rtl::OUString & str, const sal_Char * msg ) { if ( msg != nullptr ) { @@ -54,7 +54,7 @@ static inline void printUString( const ::rtl::OUString & str, const sal_Char * m printf("%s\n", aString.getStr( ) ); } -static inline ::rtl::OUString getModulePath() +static ::rtl::OUString getModulePath() { ::rtl::OUString suDirPath; ::osl::Module::getUrlFromAddress( diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 39e694e017d8..626d05c7b895 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -130,7 +130,7 @@ bool rtl_arena_segment_populate(rtl_arena_type * arena) @precond arena->m_lock acquired. @precond (*ppSegment == 0) */ -inline void rtl_arena_segment_get( +void rtl_arena_segment_get( rtl_arena_type * arena, rtl_arena_segment_type ** ppSegment ) @@ -151,7 +151,7 @@ inline void rtl_arena_segment_get( @precond arena->m_lock acquired. @postcond (*ppSegment == 0) */ -inline void rtl_arena_segment_put( +void rtl_arena_segment_put( rtl_arena_type * arena, rtl_arena_segment_type ** ppSegment ) @@ -178,7 +178,7 @@ inline void rtl_arena_segment_put( /** @precond arena->m_lock acquired. */ -inline void rtl_arena_freelist_insert ( +void rtl_arena_freelist_insert ( rtl_arena_type * arena, rtl_arena_segment_type * segment ) @@ -195,7 +195,7 @@ inline void rtl_arena_freelist_insert ( /** @precond arena->m_lock acquired. */ -inline void rtl_arena_freelist_remove( +void rtl_arena_freelist_remove( rtl_arena_type * arena, rtl_arena_segment_type * segment ) @@ -281,7 +281,7 @@ void rtl_arena_hash_rescale( /** Insert arena hash, and update stats. */ -inline void rtl_arena_hash_insert( +void rtl_arena_hash_insert( rtl_arena_type * arena, rtl_arena_segment_type * segment ) diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 855beec53348..108420dd0cc2 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -300,7 +300,7 @@ static OUString & getIniFileName_Impl() // ensure the given file url has no final slash -static inline void EnsureNoFinalSlash (rtl::OUString & url) +static void EnsureNoFinalSlash (rtl::OUString & url) { sal_Int32 i = url.getLength(); diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index 12571baf4b86..447aabc365f8 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -218,7 +218,7 @@ int getBitsInFracPart(double fAbsValue) } template< typename T > -inline void doubleToString(typename T::String ** pResult, +void doubleToString(typename T::String ** pResult, sal_Int32 * pResultCapacity, sal_Int32 nResultOffset, double fValue, rtl_math_StringFormat eFormat, sal_Int32 nDecPlaces, typename T::Char cDecSeparator, @@ -747,7 +747,7 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult, namespace { // if nExp * 10 + nAdd would result in overflow -inline bool long10Overflow( long& nExp, int nAdd ) +bool long10Overflow( long& nExp, int nAdd ) { if ( nExp > (LONG_MAX/10) || (nExp == (LONG_MAX/10) && nAdd > (LONG_MAX%10)) ) @@ -759,7 +759,7 @@ inline bool long10Overflow( long& nExp, int nAdd ) } template< typename CharT > -inline double stringToDouble(CharT const * pBegin, CharT const * pEnd, +double stringToDouble(CharT const * pBegin, CharT const * pEnd, CharT cDecSeparator, CharT cGroupSeparator, rtl_math_ConversionStatus * pStatus, CharT const ** pParsedEnd) diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index e4ccb80b68f4..3cc4d9927274 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -46,7 +46,7 @@ inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* pDest, } */ -static inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* _pDest, +static void rtl_str_ImplCopy( IMPL_RTL_STRCODE* _pDest, const IMPL_RTL_STRCODE* _pSrc, sal_Int32 _nCount ) { @@ -989,7 +989,7 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr ) /* ----------------------------------------------------------------------- */ namespace { - template<typename T, typename U> inline T IMPL_RTL_STRNAME( toInt )( const IMPL_RTL_STRCODE* pStr, + template<typename T, typename U> T IMPL_RTL_STRNAME( toInt )( const IMPL_RTL_STRCODE* pStr, sal_Int16 nRadix ) { static_assert(std::numeric_limits<T>::is_signed, "is signed"); @@ -1080,7 +1080,7 @@ sal_Int64 SAL_CALL IMPL_RTL_STRNAME( toInt64 )( const IMPL_RTL_STRCODE* pStr, /* ----------------------------------------------------------------------- */ namespace { - template <typename T> inline T IMPL_RTL_STRNAME( toUInt )( const IMPL_RTL_STRCODE* pStr, + template <typename T> T IMPL_RTL_STRNAME( toUInt )( const IMPL_RTL_STRCODE* pStr, sal_Int16 nRadix ) { static_assert(!std::numeric_limits<T>::is_signed, "is not signed"); diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx index 73fb8a474763..70f1e2e82c20 100644 --- a/sal/rtl/uri.cxx +++ b/sal/rtl/uri.cxx @@ -38,7 +38,7 @@ std::size_t const nCharClassSize = 128; sal_Unicode const cEscapePrefix = 0x25; // '%' -inline int getHexWeight(sal_uInt32 nUtf32) +int getHexWeight(sal_uInt32 nUtf32) { return nUtf32 >= 0x30 && nUtf32 <= 0x39 ? // '0'--'9' static_cast< int >(nUtf32 - 0x30) : @@ -49,12 +49,12 @@ inline int getHexWeight(sal_uInt32 nUtf32) -1; // not a hex digit } -inline bool isValid(sal_Bool const * pCharClass, sal_uInt32 nUtf32) +bool isValid(sal_Bool const * pCharClass, sal_uInt32 nUtf32) { return nUtf32 < nCharClassSize && pCharClass[nUtf32]; } -inline void writeUnicode(rtl_uString ** pBuffer, sal_Int32 * pCapacity, +void writeUnicode(rtl_uString ** pBuffer, sal_Int32 * pCapacity, sal_Unicode cChar) { rtl_uStringbuffer_insert(pBuffer, pCapacity, (*pBuffer)->length, &cChar, 1); @@ -339,10 +339,10 @@ struct Component bool isPresent() const { return pBegin != nullptr; } - inline sal_Int32 getLength() const; + sal_Int32 getLength() const; }; -inline sal_Int32 Component::getLength() const +sal_Int32 Component::getLength() const { assert(isPresent()); // taking length of non-present component return static_cast< sal_Int32 >(pEnd - pBegin); diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index bbe1d5840538..a2140bf81c26 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -95,23 +95,23 @@ private: bool m_bStartElementFinished; /// @throws SAXException - inline sal_uInt32 writeSequence(); + sal_uInt32 writeSequence(); // use only if to insert the bytes more space in the sequence is needed and // so the sequence has to write out and reset rPos to 0 // writes sequence only on overflow, sequence could be full on the end (rPos == SEQUENCESIZE) /// @throws SAXException - inline void AddBytes(sal_Int8* pTarget, sal_uInt32& rPos, + void AddBytes(sal_Int8* pTarget, sal_uInt32& rPos, const sal_Int8* pBytes, sal_uInt32 nBytesCount); /// @throws SAXException - inline bool convertToXML(const sal_Unicode * pStr, + bool convertToXML(const sal_Unicode * pStr, sal_Int32 nStrLen, bool bDoNormalization, bool bNormalizeWhitespace, sal_Int8 *pTarget, sal_uInt32& rPos); /// @throws SAXException - inline void FinishStartElement(); + void FinishStartElement(); public: explicit SaxWriterHelper(Reference< XOutputStream > const & m_TempOut) : m_out(m_TempOut) @@ -131,13 +131,13 @@ public: } /// @throws SAXException - inline void insertIndentation(sal_uInt32 m_nLevel); + void insertIndentation(sal_uInt32 m_nLevel); // returns whether it works correct or invalid characters were in the string // If there are invalid characters in the string it returns sal_False. // Than the calling method has to throw the needed Exception. /// @throws SAXException - inline bool writeString(const OUString& rWriteOutString, + bool writeString(const OUString& rWriteOutString, bool bDoNormalization, bool bNormalizeWhitespace); @@ -145,42 +145,42 @@ public: { return static_cast<sal_uInt32>(nCurrentPos - nLastLineFeedPos); } /// @throws SAXException - inline void startDocument(); + void startDocument(); // returns whether it works correct or invalid characters were in the strings // If there are invalid characters in one of the strings it returns sal_False. // Than the calling method has to throw the needed Exception. /// @throws SAXException - inline SaxInvalidCharacterError startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs); + SaxInvalidCharacterError startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs); /// @throws SAXException - inline bool FinishEmptyElement(); + bool FinishEmptyElement(); // returns whether it works correct or invalid characters were in the string // If there are invalid characters in the string it returns sal_False. // Than the calling method has to throw the needed Exception. /// @throws SAXException - inline bool endElement(const OUString& rName); + bool endElement(const OUString& rName); /// @throws SAXException - inline void endDocument(); + void endDocument(); // returns whether it works correct or invalid characters were in the strings // If there are invalid characters in the string it returns sal_False. // Than the calling method has to throw the needed Exception. /// @throws SAXException - inline bool processingInstruction(const OUString& rTarget, const OUString& rData); + bool processingInstruction(const OUString& rTarget, const OUString& rData); /// @throws SAXException - inline void startCDATA(); + void startCDATA(); /// @throws SAXException - inline void endCDATA(); + void endCDATA(); // returns whether it works correct or invalid characters were in the strings // If there are invalid characters in the string it returns sal_False. // Than the calling method has to throw the needed Exception. /// @throws SAXException - inline bool comment(const OUString& rComment); + bool comment(const OUString& rComment); /// @throws SAXException - inline void clearBuffer(); + void clearBuffer(); }; const bool g_bValidCharsBelow32[32] = @@ -192,7 +192,7 @@ const bool g_bValidCharsBelow32[32] = false,false,false,false,false,false,false,false }; -inline bool IsInvalidChar(const sal_Unicode aChar) +bool IsInvalidChar(const sal_Unicode aChar) { bool bRet(false); // check first for the most common characters @@ -207,7 +207,7 @@ inline bool IsInvalidChar(const sal_Unicode aChar) * write through to the output stream * *****/ -inline sal_uInt32 SaxWriterHelper::writeSequence() +sal_uInt32 SaxWriterHelper::writeSequence() { try { @@ -225,7 +225,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() return 0; } -inline void SaxWriterHelper::AddBytes(sal_Int8* pTarget, sal_uInt32& rPos, +void SaxWriterHelper::AddBytes(sal_Int8* pTarget, sal_uInt32& rPos, const sal_Int8* pBytes, sal_uInt32 nBytesCount) { OSL_ENSURE((rPos + nBytesCount) > SEQUENCESIZE, "wrong use of AddBytesMethod"); @@ -252,7 +252,7 @@ inline void SaxWriterHelper::AddBytes(sal_Int8* pTarget, sal_uInt32& rPos, must call calcXMLByteLength on the same string, to ensure, that there is enough memory for converting. */ -inline bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr, +bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr, sal_Int32 nStrLen, bool bDoNormalization, bool bNormalizeWhitespace, @@ -481,7 +481,7 @@ inline bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr, return bRet; } -inline void SaxWriterHelper::FinishStartElement() +void SaxWriterHelper::FinishStartElement() { if (!m_bStartElementFinished) { @@ -493,7 +493,7 @@ inline void SaxWriterHelper::FinishStartElement() } } -inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) +void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) { FinishStartElement(); if (m_nLevel > 0) @@ -531,7 +531,7 @@ inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) } } -inline bool SaxWriterHelper::writeString( const OUString& rWriteOutString, +bool SaxWriterHelper::writeString( const OUString& rWriteOutString, bool bDoNormalization, bool bNormalizeWhitespace ) { @@ -544,7 +544,7 @@ inline bool SaxWriterHelper::writeString( const OUString& rWriteOutString, nCurrentPos); } -inline void SaxWriterHelper::startDocument() +void SaxWriterHelper::startDocument() { const char pc[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; const int nLen = strlen( pc ); @@ -607,7 +607,7 @@ void CheckValidName(OUString const& rName) #endif } -inline SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs) +SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs) { FinishStartElement(); @@ -669,7 +669,7 @@ inline SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rN return eRet; } -inline bool SaxWriterHelper::FinishEmptyElement() +bool SaxWriterHelper::FinishEmptyElement() { if (m_bStartElementFinished) return false; @@ -688,7 +688,7 @@ inline bool SaxWriterHelper::FinishEmptyElement() return true; } -inline bool SaxWriterHelper::endElement(const OUString& rName) +bool SaxWriterHelper::endElement(const OUString& rName) { FinishStartElement(); @@ -712,7 +712,7 @@ inline bool SaxWriterHelper::endElement(const OUString& rName) return bRet; } -inline void SaxWriterHelper::endDocument() +void SaxWriterHelper::endDocument() { if (nCurrentPos > 0) { @@ -722,7 +722,7 @@ inline void SaxWriterHelper::endDocument() } } -inline void SaxWriterHelper::clearBuffer() +void SaxWriterHelper::clearBuffer() { FinishStartElement(); if (nCurrentPos > 0) @@ -735,7 +735,7 @@ inline void SaxWriterHelper::clearBuffer() } } -inline bool SaxWriterHelper::processingInstruction(const OUString& rTarget, const OUString& rData) +bool SaxWriterHelper::processingInstruction(const OUString& rTarget, const OUString& rData) { FinishStartElement(); mp_Sequence[nCurrentPos] = '<'; @@ -769,7 +769,7 @@ inline bool SaxWriterHelper::processingInstruction(const OUString& rTarget, cons return bRet; } -inline void SaxWriterHelper::startCDATA() +void SaxWriterHelper::startCDATA() { FinishStartElement(); if ((nCurrentPos + 9) <= SEQUENCESIZE) @@ -783,7 +783,7 @@ inline void SaxWriterHelper::startCDATA() nCurrentPos = writeSequence(); } -inline void SaxWriterHelper::endCDATA() +void SaxWriterHelper::endCDATA() { FinishStartElement(); if ((nCurrentPos + 3) <= SEQUENCESIZE) @@ -797,7 +797,7 @@ inline void SaxWriterHelper::endCDATA() nCurrentPos = writeSequence(); } -inline bool SaxWriterHelper::comment(const OUString& rComment) +bool SaxWriterHelper::comment(const OUString& rComment) { FinishStartElement(); mp_Sequence[nCurrentPos] = '<'; @@ -835,7 +835,7 @@ inline bool SaxWriterHelper::comment(const OUString& rComment) return bRet; } -inline sal_Int32 calcXMLByteLength( const OUString& rStr, +sal_Int32 calcXMLByteLength( const OUString& rStr, bool bDoNormalization, bool bNormalizeWhitespace ) { @@ -918,7 +918,7 @@ inline sal_Int32 calcXMLByteLength( const OUString& rStr, /** returns position of first ascii 10 within the string, -1 when no 10 in string. */ -inline sal_Int32 getFirstLineBreak( const OUString & str ) throw () +sal_Int32 getFirstLineBreak( const OUString & str ) throw () { const sal_Unicode *pSource = str.getStr(); sal_Int32 nLen = str.getLength(); @@ -1035,7 +1035,7 @@ sal_Int32 SAXWriter::getIndentPrefixLength( sal_Int32 nFirstLineBreakOccurrence return nLength; } -inline bool isFirstCharWhitespace( const sal_Unicode *p ) throw() +bool isFirstCharWhitespace( const sal_Unicode *p ) throw() { return *p == ' '; } diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx index 227a26cfb273..d0453e181063 100644 --- a/sc/qa/extras/new_cond_format.cxx +++ b/sc/qa/extras/new_cond_format.cxx @@ -23,7 +23,7 @@ using namespace css; -static inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor) +static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor) { rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << static_cast<int>(rColor.GetGreen()) << " B: " << static_cast<int>(rColor.GetBlue()); return rStrm; diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 85e31fcd1a66..25088b5a4106 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -689,7 +689,7 @@ void ScBroadcastAreaSlotMachine::ComputeAreaPoints( const ScRange& rRange, ScAddress( rRange.aStart.Col(), rRange.aEnd.Row(), 0 ) ) - rStart; } -static inline void ComputeNextSlot( SCSIZE & nOff, SCSIZE & nBreak, ScBroadcastAreaSlot** & pp, +static void ComputeNextSlot( SCSIZE & nOff, SCSIZE & nBreak, ScBroadcastAreaSlot** & pp, SCSIZE & nStart, ScBroadcastAreaSlot** const & ppSlots, SCSIZE nRowBreak ) { if ( nOff < nBreak ) diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 2617a72b115b..e6987e55dbaf 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -67,7 +67,7 @@ using namespace formula; namespace { -inline bool IsAmbiguousScriptNonZero( SvtScriptType nScript ) +bool IsAmbiguousScriptNonZero( SvtScriptType nScript ) { //TODO: move to a header file return ( nScript != SvtScriptType::LATIN && diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 38fb1edbd64b..b9852ccc8778 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -78,7 +78,7 @@ // factor from font size to optimal cell height (text width) #define SC_ROT_BREAK_FACTOR 6 -static inline bool IsAmbiguousScript( SvtScriptType nScript ) +static bool IsAmbiguousScript( SvtScriptType nScript ) { //TODO: move to a header file return ( nScript != SvtScriptType::LATIN && diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 85db140e11ac..dfe87dbe8298 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -2382,7 +2382,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo } } -static inline bool IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) +static bool IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) { return ( nRow1 > nRow2 ) || ( nRow1 == nRow2 && nCol1 > nCol2 ); } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index cb0f654d6592..c4e20cdddfc0 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -98,7 +98,7 @@ using namespace com::sun::star; namespace { -inline sal_uInt16 getScaleValue(SfxStyleSheetBase& rStyle, sal_uInt16 nWhich) +sal_uInt16 getScaleValue(SfxStyleSheetBase& rStyle, sal_uInt16 nWhich) { return static_cast<const SfxUInt16Item&>(rStyle.GetItemSet().Get(nWhich)).GetValue(); } diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 937d62c5d9f0..018a7a36ae9c 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -272,7 +272,7 @@ bool ScDPSaveGroupDimension::IsInGroup(const ScDPItemData& rItem) const namespace { -inline bool isInteger(double fValue) +bool isInteger(double fValue) { return rtl::math::approxEqual(fValue, rtl::math::approxFloor(fValue)); } diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index adf396026221..3ca29c0e69d8 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -206,13 +206,13 @@ ScTabSizeChangedHint::~ScTabSizeChangedHint() #define MAXMM 10000000 -static inline long TwipsToHmm (long nVal) +static long TwipsToHmm (long nVal) { return static_cast< long >( MetricField::ConvertDoubleValue (static_cast<sal_Int64>(nVal), 0, 0, FUNIT_TWIP, FUNIT_100TH_MM) ); } -static inline long HmmToTwips (long nVal) +static long HmmToTwips (long nVal) { return static_cast< long > ( MetricField::ConvertDoubleValue (static_cast<sal_Int64>(nVal), 0, 0, FUNIT_100TH_MM, FUNIT_TWIP) ); @@ -512,7 +512,7 @@ void ScDrawLayer::ResetTab( SCTAB nStart, SCTAB nEnd ) } } -static inline bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 ) +static bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 ) { return rPos.Col() >= nCol1 && rPos.Col() <= nCol2 && rPos.Row() >= nRow1 && rPos.Row() <= nRow2; @@ -1836,7 +1836,7 @@ OUString ScDrawLayer::GetVisibleName( const SdrObject* pObj ) return aName; } -static inline bool IsNamedObject( const SdrObject* pObj, const OUString& rName ) +static bool IsNamedObject( const SdrObject* pObj, const OUString& rName ) { // sal_True if rName is the object's Name or PersistName // (used to find a named object) diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 2f63a6ebd0b0..27a8d8ba2787 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -113,12 +113,12 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const return pPattern; } -static inline bool StrCmp( const OUString* pStr1, const OUString* pStr2 ) +static bool StrCmp( const OUString* pStr1, const OUString* pStr2 ) { return ( pStr1 ? ( pStr2 && ( *pStr1 == *pStr2 ) ) : ( pStr2 == nullptr ) ); } -static inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 ) +static bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 ) { // #i62090# The SfxItemSet in the SfxSetItem base class always has the same ranges // (single range from ATTR_PATTERN_START to ATTR_PATTERN_END), and the items are pooled, @@ -1109,7 +1109,7 @@ bool ScPatternAttr::IsVisible() const return false; } -static inline bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId ) +static bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId ) { const SfxPoolItem* pItem1 = &rSet1.Get(nId); const SfxPoolItem* pItem2 = &rSet2.Get(nId); diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index c729dd3b9c13..e00c594a782c 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -624,7 +624,7 @@ bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString& rR return false; } -static inline bool IsTypeName( const OUString& rName, const uno::Type& rType ) +static bool IsTypeName( const OUString& rName, const uno::Type& rType ) { return rName == rType.getTypeName(); } diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index ae057b346d26..2e5af33a2eef 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -695,7 +695,7 @@ static const sal_Unicode* lcl_r1c1_get_col( const sal_Unicode* p, return pEnd; } -static inline const sal_Unicode* lcl_r1c1_get_row( +static const sal_Unicode* lcl_r1c1_get_row( const sal_Unicode* p, const ScAddress::Details& rDetails, ScAddress* pAddr, ScRefFlags* nFlags ) @@ -888,7 +888,7 @@ static ScRefFlags lcl_ScRange_Parse_XL_R1C1( ScRange& r, return nBailOutFlags; } -static inline const sal_Unicode* lcl_a1_get_col( const sal_Unicode* p, +static const sal_Unicode* lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, ScRefFlags* nFlags, const OUString* pErrRef ) @@ -924,7 +924,7 @@ static inline const sal_Unicode* lcl_a1_get_col( const sal_Unicode* p, return p; } -static inline const sal_Unicode* lcl_a1_get_row( const sal_Unicode* p, +static const sal_Unicode* lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, ScRefFlags* nFlags, const OUString* pErrRef ) @@ -1879,7 +1879,7 @@ void ScRange::ParseRows( const OUString& rStr, } } -template<typename T > static inline void lcl_ScColToAlpha( T& rBuf, SCCOL nCol ) +template<typename T > static void lcl_ScColToAlpha( T& rBuf, SCCOL nCol ) { if (nCol < 26*26) { @@ -1910,21 +1910,21 @@ void ScColToAlpha( OUStringBuffer& rBuf, SCCOL nCol) lcl_ScColToAlpha(rBuf, nCol); } -template <typename T > static inline void lcl_a1_append_c ( T &rString, int nCol, bool bIsAbs ) +template <typename T > static void lcl_a1_append_c ( T &rString, int nCol, bool bIsAbs ) { if( bIsAbs ) rString.append("$"); lcl_ScColToAlpha( rString, sal::static_int_cast<SCCOL>(nCol) ); } -template <typename T > static inline void lcl_a1_append_r ( T &rString, sal_Int32 nRow, bool bIsAbs ) +template <typename T > static void lcl_a1_append_r ( T &rString, sal_Int32 nRow, bool bIsAbs ) { if ( bIsAbs ) rString.append("$"); rString.append( nRow + 1 ); } -template <typename T > static inline void lcl_r1c1_append_c ( T &rString, sal_Int32 nCol, bool bIsAbs, +template <typename T > static void lcl_r1c1_append_c ( T &rString, sal_Int32 nCol, bool bIsAbs, const ScAddress::Details& rDetails ) { rString.append("C"); @@ -1941,7 +1941,7 @@ template <typename T > static inline void lcl_r1c1_append_c ( T &rString, sal_In } } -template <typename T > static inline void lcl_r1c1_append_r ( T &rString, sal_Int32 nRow, bool bIsAbs, +template <typename T > static void lcl_r1c1_append_r ( T &rString, sal_Int32 nRow, bool bIsAbs, const ScAddress::Details& rDetails ) { rString.append("R"); @@ -1984,17 +1984,17 @@ static OUString getFileNameFromDoc( const ScDocument* pDoc ) } -static inline void lcl_string_append(OUStringBuffer &rString, const OUString &sString) +static void lcl_string_append(OUStringBuffer &rString, const OUString &sString) { rString.append(sString); } -static inline void lcl_string_append(OStringBuffer &rString, const OUString &sString) +static void lcl_string_append(OStringBuffer &rString, const OUString &sString) { rString.append(OUStringToOString( sString, RTL_TEXTENCODING_UTF8 )); } -template<typename T > static inline void lcl_Format( T& r, SCTAB nTab, SCROW nRow, SCCOL nCol, ScRefFlags nFlags, +template<typename T > static void lcl_Format( T& r, SCTAB nTab, SCROW nRow, SCCOL nCol, ScRefFlags nFlags, const ScDocument* pDoc, const ScAddress::Details& rDetails) { @@ -2182,11 +2182,11 @@ static void lcl_ScRange_Format_XL_Header( OUStringBuffer& rString, const ScRange } // helpers used in ScRange::Format -static inline bool lcl_ColAbsFlagDiffer(const ScRefFlags nFlags) +static bool lcl_ColAbsFlagDiffer(const ScRefFlags nFlags) { return static_cast<bool>(nFlags & ScRefFlags::COL_ABS) != static_cast<bool>(nFlags & ScRefFlags::COL2_ABS); } -static inline bool lcl_RowAbsFlagDiffer(const ScRefFlags nFlags) +static bool lcl_RowAbsFlagDiffer(const ScRefFlags nFlags) { return static_cast<bool>(nFlags & ScRefFlags::ROW_ABS) != static_cast<bool>(nFlags & ScRefFlags::ROW2_ABS); } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index a271166f476e..4fcb5fd93599 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4087,7 +4087,7 @@ void ScCompiler::AutoCorrectParsedSymbol() } } -static inline bool lcl_UpperAsciiOrI18n( OUString& rUpper, const OUString& rOrg, FormulaGrammar::Grammar eGrammar ) +static bool lcl_UpperAsciiOrI18n( OUString& rUpper, const OUString& rOrg, FormulaGrammar::Grammar eGrammar ) { if (FormulaGrammar::isODFF( eGrammar )) { diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 222f30cc3758..deee7197a277 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -273,7 +273,7 @@ void ScDetectiveFunc::Modified() pDoc->SetStreamValid(nTab, false); } -static inline bool Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1, +static bool Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1, SCCOL nStartCol2, SCROW nStartRow2, SCCOL nEndCol2, SCROW nEndRow2 ) { return nEndCol1 >= nStartCol2 && nEndCol2 >= nStartCol1 && @@ -711,7 +711,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) #define SC_DET_TOLERANCE 50 -static inline bool RectIsPoints( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) +static bool RectIsPoints( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) { return rRect.Left() >= rStart.X() - SC_DET_TOLERANCE && rRect.Left() <= rStart.X() + SC_DET_TOLERANCE diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx index 629072ece09f..80d6ccfbc0f4 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -289,7 +289,7 @@ bool ScFormulaResult::IsEmptyDisplayedAsString() const namespace { -inline bool isValue( formula::StackVar sv ) +bool isValue( formula::StackVar sv ) { return sv == formula::svDouble || sv == formula::svError || sv == formula::svEmptyCell @@ -300,7 +300,7 @@ inline bool isValue( formula::StackVar sv ) || sv == formula::svUnknown; } -inline bool isString( formula::StackVar sv ) +bool isString( formula::StackVar sv ) { switch (sv) { diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 9bdc5d1a805a..77c2c50d0dd8 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2168,12 +2168,12 @@ void ScInterpreter::ScType() PushInt( nType ); } -static inline bool lcl_FormatHasNegColor( const SvNumberformat* pFormat ) +static bool lcl_FormatHasNegColor( const SvNumberformat* pFormat ) { return pFormat && pFormat->GetColor( 1 ); } -static inline bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat ) +static bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat ) { return pFormat && (pFormat->GetFormatstring().indexOf('(') != -1); } @@ -3440,7 +3440,7 @@ void ScInterpreter::ScNumberValue() } //2do: this should be a proper unicode string method -static inline bool lcl_ScInterpreter_IsPrintable( sal_Unicode c ) +static bool lcl_ScInterpreter_IsPrintable( sal_Unicode c ) { return 0x20 <= c && c != 0x7f; } diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 6adc434a3864..b1e9b9fe77b7 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -3384,7 +3384,7 @@ void ScInterpreter::ScEuroConvert() // local functions namespace { -inline void lclSplitBlock( double& rfInt, sal_Int32& rnBlock, double fValue, double fSize ) +void lclSplitBlock( double& rfInt, sal_Int32& rnBlock, double fValue, double fSize ) { rnBlock = static_cast< sal_Int32 >( modf( (fValue + 0.1) / fSize, &rfInt ) * fSize + 0.1 ); } diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 1bd355d3af6e..a59a28ca501d 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -60,7 +60,7 @@ protected: //template< class T > double lcl_IterateInverse( const T& rFunction, double x0, double x1, bool& rConvError ) /** u*w<0.0 fails for values near zero */ -static inline bool lcl_HasChangeOfSign( double u, double w ) +static bool lcl_HasChangeOfSign( double u, double w ) { return (u < 0.0 && w > 0.0) || (u > 0.0 && w < 0.0); } diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 076451d571e5..6af632a8a88c 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1027,7 +1027,7 @@ void ScInterpreter::ScMatTrans() For a row or column vector to be replicated the larger matrix dimension is returned, else the smaller dimension. */ -static inline SCSIZE lcl_GetMinExtent( SCSIZE n1, SCSIZE n2 ) +static SCSIZE lcl_GetMinExtent( SCSIZE n1, SCSIZE n2 ) { if (n1 == 1) return n2; diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx index 035d6810fc64..c07eda00f9ed 100644 --- a/sc/source/core/tool/prnsave.cxx +++ b/sc/source/core/tool/prnsave.cxx @@ -48,7 +48,7 @@ void ScPrintSaverTab::SetRepeat( const ScRange* pCol, const ScRange* pRow ) mpRepeatRow.reset(pRow ? new ScRange(*pRow) : nullptr); } -static inline bool PtrEqual( const ScRange* p1, const ScRange* p2 ) +static bool PtrEqual( const ScRange* p1, const ScRange* p2 ) { return ( !p1 && !p2 ) || ( p1 && p2 && *p1 == *p2 ); } diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index 18a85f295bfd..230218c5334a 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -29,7 +29,7 @@ const sal_Unicode pDelimiters[] = { '=','(',')','+','-','*','/','^','&',' ','{','}','<','>',':', 0 }; -inline bool IsText( sal_Unicode c ) +bool IsText( sal_Unicode c ) { bool bFound = ScGlobal::UnicodeStrChr( pDelimiters, c ); if (bFound) @@ -41,7 +41,7 @@ inline bool IsText( sal_Unicode c ) return c != sep; } -inline bool IsText( bool& bQuote, sal_Unicode c ) +bool IsText( bool& bQuote, sal_Unicode c ) { if (c == '\'') { diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index c029cac75ace..034318eff13d 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1634,7 +1634,7 @@ public: } }; -inline double evaluate( double fVal, ScQueryOp eOp ) +double evaluate( double fVal, ScQueryOp eOp ) { if (!rtl::math::isFinite(fVal)) return fVal; diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 828e028c2942..7a1bf06e0ac4 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -128,7 +128,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclChRectangle& rRect ) return rStrm << rRect.mnX << rRect.mnY << rRect.mnWidth << rRect.mnHeight; } -inline void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef const & xRec ) +void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef const & xRec ) { if( xRec ) xRec->Save( rStrm ); @@ -164,7 +164,7 @@ void lclWriteChFrBlockRecord( XclExpStream& rStrm, const XclChFrBlock& rFrBlock, } template< typename Type > -inline bool lclIsAutoAnyOrGetValue( Type& rValue, const Any& rAny ) +bool lclIsAutoAnyOrGetValue( Type& rValue, const Any& rAny ) { return !rAny.hasValue() || !(rAny >>= rValue); } diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 131fbd000be8..81aab4194e24 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -108,7 +108,7 @@ using namespace oox; namespace { -inline long lcl_hmm2px(long nPixel) +long lcl_hmm2px(long nPixel) { return static_cast<long>(nPixel*PIXEL_PER_INCH/1000.0/CM_PER_INCH + 0.5); } diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 9214f5c1e3bf..8a7f69f3dc1b 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -832,7 +832,7 @@ XclExpScToken XclExpFmlaCompImpl::GetNextToken() namespace { /** Returns the Excel token ID of a comparison operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetCompareTokenId( OpCode eOpCode ) +sal_uInt8 lclGetCompareTokenId( OpCode eOpCode ) { switch( eOpCode ) { @@ -848,13 +848,13 @@ inline sal_uInt8 lclGetCompareTokenId( OpCode eOpCode ) } /** Returns the Excel token ID of a string concatenation operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetConcatTokenId( OpCode eOpCode ) +sal_uInt8 lclGetConcatTokenId( OpCode eOpCode ) { return (eOpCode == ocAmpersand) ? EXC_TOKID_CONCAT : EXC_TOKID_NONE; } /** Returns the Excel token ID of an addition/subtraction operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetAddSubTokenId( OpCode eOpCode ) +sal_uInt8 lclGetAddSubTokenId( OpCode eOpCode ) { switch( eOpCode ) { @@ -866,7 +866,7 @@ inline sal_uInt8 lclGetAddSubTokenId( OpCode eOpCode ) } /** Returns the Excel token ID of a multiplication/division operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetMulDivTokenId( OpCode eOpCode ) +sal_uInt8 lclGetMulDivTokenId( OpCode eOpCode ) { switch( eOpCode ) { @@ -878,19 +878,19 @@ inline sal_uInt8 lclGetMulDivTokenId( OpCode eOpCode ) } /** Returns the Excel token ID of a power operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetPowTokenId( OpCode eOpCode ) +sal_uInt8 lclGetPowTokenId( OpCode eOpCode ) { return (eOpCode == ocPow) ? EXC_TOKID_POWER : EXC_TOKID_NONE; } /** Returns the Excel token ID of a trailing unary operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetUnaryPostTokenId( OpCode eOpCode ) +sal_uInt8 lclGetUnaryPostTokenId( OpCode eOpCode ) { return (eOpCode == ocPercentSign) ? EXC_TOKID_PERCENT : EXC_TOKID_NONE; } /** Returns the Excel token ID of a leading unary operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetUnaryPreTokenId( OpCode eOpCode ) +sal_uInt8 lclGetUnaryPreTokenId( OpCode eOpCode ) { switch( eOpCode ) { @@ -903,19 +903,19 @@ inline sal_uInt8 lclGetUnaryPreTokenId( OpCode eOpCode ) } /** Returns the Excel token ID of a reference list operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetListTokenId( OpCode eOpCode, bool bStopAtSep ) +sal_uInt8 lclGetListTokenId( OpCode eOpCode, bool bStopAtSep ) { return ((eOpCode == ocUnion) || (!bStopAtSep && (eOpCode == ocSep))) ? EXC_TOKID_LIST : EXC_TOKID_NONE; } /** Returns the Excel token ID of a reference intersection operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetIntersectTokenId( OpCode eOpCode ) +sal_uInt8 lclGetIntersectTokenId( OpCode eOpCode ) { return (eOpCode == ocIntersect) ? EXC_TOKID_ISECT : EXC_TOKID_NONE; } /** Returns the Excel token ID of a reference range operator or EXC_TOKID_NONE. */ -inline sal_uInt8 lclGetRangeTokenId( OpCode eOpCode ) +sal_uInt8 lclGetRangeTokenId( OpCode eOpCode ) { return (eOpCode == ocRange) ? EXC_TOKID_RANGE : EXC_TOKID_NONE; } @@ -1218,7 +1218,7 @@ void XclExpFmlaCompImpl::ProcessBoolean( const XclExpScToken& rTokData ) namespace { -inline bool lclGetTokenString( OUString& rString, const XclExpScToken& rTokData ) +bool lclGetTokenString( OUString& rString, const XclExpScToken& rTokData ) { bool bIsStr = (rTokData.GetType() == svString) && (rTokData.GetOpCode() == ocPush); if( bIsStr ) @@ -1771,22 +1771,22 @@ void XclExpFmlaCompImpl::AppendTrailingParam( XclExpFuncData& rFuncData ) namespace { -inline bool lclIsRefRel2D( const ScSingleRefData& rRefData ) +bool lclIsRefRel2D( const ScSingleRefData& rRefData ) { return rRefData.IsColRel() || rRefData.IsRowRel(); } -inline bool lclIsRefDel2D( const ScSingleRefData& rRefData ) +bool lclIsRefDel2D( const ScSingleRefData& rRefData ) { return rRefData.IsColDeleted() || rRefData.IsRowDeleted(); } -inline bool lclIsRefRel2D( const ScComplexRefData& rRefData ) +bool lclIsRefRel2D( const ScComplexRefData& rRefData ) { return lclIsRefRel2D( rRefData.Ref1 ) || lclIsRefRel2D( rRefData.Ref2 ); } -inline bool lclIsRefDel2D( const ScComplexRefData& rRefData ) +bool lclIsRefDel2D( const ScComplexRefData& rRefData ) { return lclIsRefDel2D( rRefData.Ref1 ) || lclIsRefDel2D( rRefData.Ref2 ); } @@ -2204,25 +2204,25 @@ sal_uInt16 XclExpFmlaCompImpl::PopOperandPos() namespace { -inline void lclAppend( ScfUInt8Vec& orVector, sal_uInt16 nData ) +void lclAppend( ScfUInt8Vec& orVector, sal_uInt16 nData ) { orVector.resize( orVector.size() + 2 ); ShortToSVBT16( nData, &*(orVector.end() - 2) ); } -inline void lclAppend( ScfUInt8Vec& orVector, sal_uInt32 nData ) +void lclAppend( ScfUInt8Vec& orVector, sal_uInt32 nData ) { orVector.resize( orVector.size() + 4 ); UInt32ToSVBT32( nData, &*(orVector.end() - 4) ); } -inline void lclAppend( ScfUInt8Vec& orVector, double fData ) +void lclAppend( ScfUInt8Vec& orVector, double fData ) { orVector.resize( orVector.size() + 8 ); DoubleToSVBT64( fData, &*(orVector.end() - 8) ); } -inline void lclAppend( ScfUInt8Vec& orVector, const XclExpRoot& rRoot, const OUString& rString, XclStrFlags nStrFlags ) +void lclAppend( ScfUInt8Vec& orVector, const XclExpRoot& rRoot, const OUString& rString, XclStrFlags nStrFlags ) { XclExpStringRef xXclStr = XclExpStringHelper::CreateString( rRoot, rString, nStrFlags, EXC_TOK_STR_MAXLEN ); size_t nSize = orVector.size(); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 4c752f0f0b9f..f7d629ce3cd7 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -144,7 +144,7 @@ void XclExpProgressBar::Progress() namespace { /** Fills the passed Excel address with the passed Calc cell coordinates without checking any limits. */ -inline void lclFillAddress( XclAddress& rXclPos, SCCOL nScCol, SCROW nScRow ) +void lclFillAddress( XclAddress& rXclPos, SCCOL nScCol, SCROW nScRow ) { rXclPos.mnCol = static_cast< sal_uInt16 >( nScCol ); rXclPos.mnRow = static_cast< sal_uInt32 >( nScRow ); diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 401d052706c6..c530980aa2df 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -388,7 +388,7 @@ struct XclExpXti { rStrm << mnSupbook << mnFirstSBTab << mnLastSBTab; } }; -static inline bool operator==( const XclExpXti& rLeft, const XclExpXti& rRight ) +static bool operator==( const XclExpXti& rLeft, const XclExpXti& rRight ) { return (rLeft.mnSupbook == rRight.mnSupbook) && diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx index b0e929e05e6e..38e781d579f2 100644 --- a/sc/source/filter/excel/xestring.cxx +++ b/sc/source/filter/excel/xestring.cxx @@ -88,7 +88,7 @@ sal_uInt16 lclHashVector( const ::std::vector< Type >& rVec, const ValueHasher& /** Calculates a hash value from a vector. Uses XclDirectHasher to hash the vector elements. */ template< typename Type > -inline sal_uInt16 lclHashVector( const ::std::vector< Type >& rVec ) +sal_uInt16 lclHashVector( const ::std::vector< Type >& rVec ) { return lclHashVector( rVec, XclDirectHasher< Type >() ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 739215a6efbe..fbe65d55f897 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -143,7 +143,7 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclChRectangle& rRect ) return rStrm; } -inline void lclSetValueOrClearAny( Any& rAny, double fValue, bool bClear ) +void lclSetValueOrClearAny( Any& rAny, double fValue, bool bClear ) { if( bClear ) rAny.clear(); diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index 2da87f235a8a..93287121b554 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -46,7 +46,7 @@ namespace { /** Fills the passed Calc address with the passed Excel cell coordinates without checking any limits. */ -inline void lclFillAddress( ScAddress& rScPos, sal_uInt16 nXclCol, sal_uInt32 nXclRow, SCTAB nScTab ) +void lclFillAddress( ScAddress& rScPos, sal_uInt16 nXclCol, sal_uInt32 nXclRow, SCTAB nScTab ) { rScPos.SetCol( static_cast< SCCOL >( nXclCol ) ); rScPos.SetRow( static_cast< SCROW >( nXclRow ) ); diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index f7960c40e3c2..ce811f2471e9 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -148,7 +148,7 @@ struct XclImpXti explicit XclImpXti() : mnSupbook( SAL_MAX_UINT16 ), mnSBTabFirst( SAL_MAX_UINT16 ), mnSBTabLast( SAL_MAX_UINT16 ) {} }; -static inline XclImpStream& operator>>( XclImpStream& rStrm, XclImpXti& rXti ) +static XclImpStream& operator>>( XclImpStream& rStrm, XclImpXti& rXti ) { rXti.mnSupbook = rStrm.ReaduInt16(); rXti.mnSBTabFirst = rStrm.ReaduInt16(); diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 4d1774d9aed7..644a806dc8f3 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -923,7 +923,7 @@ void XclTokenArrayHelper::ConvertStringToList( namespace { -inline bool lclGetAddress( ScAddress& rAddress, const FormulaToken& rToken, const ScAddress& rPos ) +bool lclGetAddress( ScAddress& rAddress, const FormulaToken& rToken, const ScAddress& rPos ) { OpCode eOpCode = rToken.GetOpCode(); bool bIsSingleRef = (eOpCode == ocPush) && (rToken.GetType() == svSingleRef); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index b0613e294c9f..7eda5c9dae14 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1646,7 +1646,7 @@ void ScHTMLLayoutParser::ProcToken( HtmlImportInfo* pInfo ) // HTML DATA QUERY PARSER template< typename Type > -static inline Type getLimitedValue( const Type& rValue, const Type& rMin, const Type& rMax ) +static Type getLimitedValue( const Type& rValue, const Type& rMin, const Type& rMax ) { return std::max( std::min( rValue, rMax ), rMin ); } ScHTMLEntry::ScHTMLEntry( const SfxItemSet& rItemSet, ScHTMLTableId nTableId ) : diff --git a/sc/source/filter/oox/drawingbase.cxx b/sc/source/filter/oox/drawingbase.cxx index 4babd3468b89..92723180ffd7 100644 --- a/sc/source/filter/oox/drawingbase.cxx +++ b/sc/source/filter/oox/drawingbase.cxx @@ -38,13 +38,13 @@ using namespace ::oox::drawingml; namespace { /** Converts the passed 32-bit integer value from 1/100 mm to EMUs. */ -inline sal_Int64 lclHmmToEmu( sal_Int32 nValue ) +sal_Int64 lclHmmToEmu( sal_Int32 nValue ) { return (nValue < 0) ? -1 : convertHmmToEmu( nValue ); } /** Converts the passed 64-bit integer value from EMUs to 1/100 mm. */ -inline sal_Int32 lclEmuToHmm( sal_Int64 nValue ) +sal_Int32 lclEmuToHmm( sal_Int64 nValue ) { return (nValue < 0) ? -1 : convertEmuToHmm( nValue ); } diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 4ae2c43601b3..9e81b37c55c5 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -185,10 +185,10 @@ struct FunctionData FunctionParamInfo mpParamInfos[ FUNCINFO_PARAMINFOCOUNT ]; /// Information about all parameters. FuncFlags mnFlags; /// Additional flags. - inline bool isSupported(bool bImportFilter) const; + bool isSupported(bool bImportFilter) const; }; -inline bool FunctionData::isSupported(bool bImportFilter) const +bool FunctionData::isSupported(bool bImportFilter) const { /* For import filters: the FuncFlags::EXPORTONLY, FuncFlags::BIFFEXPORTONLY and FuncFlags::BIFFIMPORTONLY flag must not be set. diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx index 9a1a012bffba..8f702d58a8b3 100644 --- a/sc/source/filter/oox/richstring.cxx +++ b/sc/source/filter/oox/richstring.cxx @@ -44,7 +44,7 @@ namespace { const sal_uInt8 BIFF12_STRINGFLAG_FONTS = 0x01; const sal_uInt8 BIFF12_STRINGFLAG_PHONETICS = 0x02; -inline bool lclNeedsRichTextFormat( const oox::xls::Font* pFont ) +bool lclNeedsRichTextFormat( const oox::xls::Font* pFont ) { return pFont && pFont->needsRichTextFormat(); } diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index b0ee21d7461a..27993a47425f 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1395,7 +1395,7 @@ bool ApiBorderData::hasAnyOuterBorder() const namespace { -inline void lclSetBorderLineWidth( BorderLine& rBorderLine, +void lclSetBorderLineWidth( BorderLine& rBorderLine, sal_Int16 nOuter, sal_Int16 nDist = API_LINE_NONE, sal_Int16 nInner = API_LINE_NONE ) { rBorderLine.OuterLineWidth = nOuter; @@ -1668,7 +1668,7 @@ ApiSolidFillData::ApiSolidFillData() : namespace { -inline sal_Int32 lclGetMixedColorComp( sal_Int32 nPatt, sal_Int32 nFill, sal_Int32 nAlpha ) +sal_Int32 lclGetMixedColorComp( sal_Int32 nPatt, sal_Int32 nFill, sal_Int32 nAlpha ) { return ((nPatt - nFill) * nAlpha) / 0x80 + nFill; } diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index 31670efb2ed7..02824f90322b 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -49,7 +49,7 @@ const double MM100_PER_TWIP = MM100_PER_POINT / 20.0; const double MM100_PER_EMU = 1.0 / 360.0; /** Returns true, if the passed year is a leap year. */ -inline bool lclIsLeapYear( sal_Int32 nYear ) +bool lclIsLeapYear( sal_Int32 nYear ) { return ((nYear % 4) == 0) && (((nYear % 100) != 0) || ((nYear % 400) == 0)); } diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index a4485f3ffc16..14f020c96509 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -544,7 +544,7 @@ awt::Point WorksheetGlobals::getCellPosition( sal_Int32 nCol, sal_Int32 nRow ) c namespace { -inline sal_Int32 lclGetMidAddr( sal_Int32 nBegAddr, sal_Int32 nEndAddr, sal_Int32 nBegPos, sal_Int32 nEndPos, sal_Int32 nSearchPos ) +sal_Int32 lclGetMidAddr( sal_Int32 nBegAddr, sal_Int32 nEndAddr, sal_Int32 nBegPos, sal_Int32 nEndPos, sal_Int32 nSearchPos ) { // use sal_Int64 to prevent integer overflow return nBegAddr + 1 + static_cast< sal_Int32 >( static_cast< sal_Int64 >( nEndAddr - nBegAddr - 2 ) * (nSearchPos - nBegPos) / (nEndPos - nBegPos) ); diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 25dbfa9dcee5..0354f8649d72 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -86,13 +86,13 @@ static void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rStri rStrm.WriteZeroBytes( nLength - nStrBytes ); } -static inline void lcl_GenerateGUID( sal_uInt8* pGUID, bool& rValidGUID ) +static void lcl_GenerateGUID( sal_uInt8* pGUID, bool& rValidGUID ) { rtl_createUuid( pGUID, rValidGUID ? pGUID : nullptr, false ); rValidGUID = true; } -static inline void lcl_WriteGUID( XclExpStream& rStrm, const sal_uInt8* pGUID ) +static void lcl_WriteGUID( XclExpStream& rStrm, const sal_uInt8* pGUID ) { rStrm.SetSliceSize( 16 ); for( std::size_t nIndex = 0; nIndex < 16; nIndex++ ) diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 1c569b9a7a5d..d97b5e6dad49 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -295,7 +295,7 @@ static sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos ) } /** Expands the sequence's size and returns the base index of the new inserted elements. */ -static inline sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal_Int32 nExp ) +static sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal_Int32 nExp ) { OSL_ENSURE( nExp > 0, "lcl_ExpandSequence - invalid value" ); rSeq.realloc( rSeq.getLength() + nExp ); @@ -303,7 +303,7 @@ static inline sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal } /** Fills the property value rVal with the specified name and value from the item. */ -static inline void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropName, const SfxPoolItem& rItem, sal_uInt8 nMID ) +static void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropName, const SfxPoolItem& rItem, sal_uInt8 nMID ) { rVal.Name = rPropName; rItem.QueryValue( rVal.Value, nMID ); @@ -822,13 +822,13 @@ sal_Int32 ScAccessibleCsvRuler::implGetLastEqualFormatted( sal_Int32 nApiPos ) // Grid ======================================================================= /** Converts a grid columnm index to an API column index. */ -static inline sal_Int32 lcl_GetApiColumn( sal_uInt32 nGridColumn ) +static sal_Int32 lcl_GetApiColumn( sal_uInt32 nGridColumn ) { return (nGridColumn != CSV_COLUMN_HEADER) ? static_cast< sal_Int32 >( nGridColumn + 1 ) : 0; } /** Converts an API columnm index to a ScCsvGrid column index. */ -static inline sal_uInt32 lcl_GetGridColumn( sal_Int32 nApiColumn ) +static sal_uInt32 lcl_GetGridColumn( sal_Int32 nApiColumn ) { return (nApiColumn > 0) ? static_cast< sal_uInt32 >( nApiColumn - 1 ) : CSV_COLUMN_HEADER; } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index cbbc87301491..34e4cd1732bb 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -478,7 +478,7 @@ void ScInputHandler::DeleteRangeFinder() } } -static inline OUString GetEditText(const EditEngine* pEng) +static OUString GetEditText(const EditEngine* pEng) { return ScEditUtil::GetSpaceDelimitedString(*pEng); } diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index b24f53f47564..4824e0dc8f63 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1519,7 +1519,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm ) } } -static inline SfxChildWindow* lcl_GetChildWinFromCurrentView( sal_uInt16 nId ) +static SfxChildWindow* lcl_GetChildWinFromCurrentView( sal_uInt16 nId ) { SfxViewFrame* pViewFrm = SfxViewFrame::Current(); diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index 8fd3930b67ea..a60ef3f4aaf7 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -24,7 +24,7 @@ #include <docsh.hxx> #include <sc.hrc> -static inline sal_uLong TimeNow() // seconds +static sal_uLong TimeNow() // seconds { return static_cast<sal_uLong>(time(nullptr)); } diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index dcae0094c8b0..698d99e3e55f 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -44,7 +44,7 @@ double datastream_get_time(DebugTime nIdx) namespace { -inline double getNow() +double getNow() { TimeValue now; osl_getSystemTime(&now); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 0d25a473db1a..02eb818caaf7 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -4316,7 +4316,7 @@ bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, return bSuccess; } -static inline ScDirection DirFromFillDir( FillDir eDir ) +static ScDirection DirFromFillDir( FillDir eDir ) { if (eDir==FILL_TO_BOTTOM) return DIR_BOTTOM; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 24fe3c674fb6..4c6d682b45b2 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -717,7 +717,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc ) // Merge (combine documents) -static inline bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, bool bIgnore100Sec ) +static bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, bool bIgnore100Sec ) { return pA && pB && pA->GetActionNumber() == pB->GetActionNumber() && diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index ce54a91532d9..23af4d5af667 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -705,7 +705,7 @@ void lcl_GetColumnTypes( } } -inline void lcl_getLongVarCharEditString( OUString& rString, +void lcl_getLongVarCharEditString( OUString& rString, const ScRefCellValue& rCell, ScFieldEditEngine& rEditEngine ) { if (!rCell.mpEditText) @@ -715,7 +715,7 @@ inline void lcl_getLongVarCharEditString( OUString& rString, rString = rEditEngine.GetText( LINEEND_CRLF ); } -inline void lcl_getLongVarCharString( +void lcl_getLongVarCharString( OUString& rString, ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, SvNumberFormatter& rNumFmt ) { Color* pColor; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index f82630e600b1..86e17e3b6e52 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -77,7 +77,7 @@ namespace { const char SYLK_LF[] = "\x1b :"; - inline bool lcl_IsEndianSwap( const SvStream& rStrm ) + bool lcl_IsEndianSwap( const SvStream& rStrm ) { #ifdef OSL_BIGENDIAN return rStrm.GetEndian() != SvStreamEndian::BIG; @@ -847,7 +847,7 @@ static void lcl_WriteString( SvStream& rStrm, OUString& rString, sal_Unicode cQu ScImportExport::WriteUnicodeOrByteString( rStrm, rString ); } -static inline void lcl_WriteSimpleString( SvStream& rStrm, const OUString& rString ) +static void lcl_WriteSimpleString( SvStream& rStrm, const OUString& rString ) { ScImportExport::WriteUnicodeOrByteString( rStrm, rString ); } @@ -2363,7 +2363,7 @@ ScFormatFilterPlugin &ScFormatFilter::Get() // Precondition: pStr is guaranteed to be non-NULL and points to a 0-terminated // array. -static inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr, +static const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr, sal_Unicode c ) { while (*pStr) diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx index 57dcb4dee367..85989355a41e 100644 --- a/sc/source/ui/drawfunc/fusel2.cxx +++ b/sc/source/ui/drawfunc/fusel2.cxx @@ -37,7 +37,7 @@ #include <drawview.hxx> #include <svx/sdrhittesthelper.hxx> -static inline long Diff( const Point& rP1, const Point& rP2 ) +static long Diff( const Point& rP1, const Point& rP2 ) { long nX = rP1.X() - rP2.X(); if (nX<0) nX = -nX; diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 71e445fba3c2..65b67242a5bb 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -450,7 +450,7 @@ void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP ) aPrvSize.setHeight( maArray.GetHeight() + 4 ); } -static inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder ) +static void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder ) { rStyle.Set( pBorder, 1.0 / TWIPS_PER_POINT, 5 ); } diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 7c1f78aad522..f7bf1d0cbcf3 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -163,7 +163,7 @@ const SfxItemPropertyMapEntry* lcl_GetDataPilotItemMap() return aDataPilotItemMap_Impl; } -inline bool lclCheckValidDouble( double fValue, bool bAuto ) +bool lclCheckValidDouble( double fValue, bool bAuto ) { return bAuto || ::rtl::math::isFinite( fValue ); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a323618f47c2..e36dfc298e77 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1254,7 +1254,7 @@ namespace { /// @throws uno::RuntimeException template< typename RangeType > -inline table::CellRangeAddress lclGetRangeAddress( const uno::Reference< RangeType >& rxCellRange ) +table::CellRangeAddress lclGetRangeAddress( const uno::Reference< RangeType >& rxCellRange ) { return uno::Reference< sheet::XCellRangeAddressable >( rxCellRange, uno::UNO_QUERY_THROW )->getRangeAddress(); } @@ -4826,7 +4826,7 @@ sal_Unicode lclGetPrefixChar( const uno::Reference< sheet::XSheetCellRangeContai return cCurrPrefix; } -inline uno::Any lclGetPrefixVariant( sal_Unicode cPrefixChar ) +uno::Any lclGetPrefixVariant( sal_Unicode cPrefixChar ) { return uno::Any( (cPrefixChar == 0) ? OUString() : OUString( cPrefixChar ) ); } diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index 1876b30e9127..e70dd8220bb4 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -41,7 +41,7 @@ using namespace ::ooo::vba; namespace { template< typename Type > -inline bool lclGetProperty( Type& orValue, const uno::Reference< beans::XPropertySet >& rxPropSet, const OUString& rPropName ) +bool lclGetProperty( Type& orValue, const uno::Reference< beans::XPropertySet >& rxPropSet, const OUString& rPropName ) { try { @@ -57,7 +57,7 @@ inline bool lclGetProperty( Type& orValue, const uno::Reference< beans::XPropert @throws uno::RuntimeException */ -inline double lclPointsToHmm( const uno::Any& rPoints ) +double lclPointsToHmm( const uno::Any& rPoints ) { return PointsToHmm( ::rtl::math::approxFloor( rPoints.get< double >() / 0.75 ) * 0.75 ); } diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 595b7a325d28..37f7ce828fbb 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1058,7 +1058,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI namespace { template<typename IndexType> - inline void lcl_getBoundingRowColumnforTile(ScViewData* pViewData, long nTileStartPosPx, long nTileEndPosPx, sal_Int32& nTopLeftTileOffset, sal_Int32& nTopLeftTileOrigin, diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 2a381039cad0..dbe5bb107e94 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -486,7 +486,7 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt bShrink = pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet ).GetValue(); } -static inline bool SameValue( const ScRefCellValue& rCell, const ScRefCellValue& rOldCell ) +static bool SameValue( const ScRefCellValue& rCell, const ScRefCellValue& rOldCell ) { return rOldCell.meType == CELLTYPE_VALUE && rCell.meType == CELLTYPE_VALUE && rCell.mfValue == rOldCell.mfValue; @@ -991,7 +991,7 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, return true; } -static inline bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr* pNewPattern ) +static bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr* pNewPattern ) { OSL_ENSURE( pNewPattern, "pNewPattern" ); @@ -1068,7 +1068,7 @@ static inline bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPat } } -static inline void lcl_CreateInterpretProgress( bool& bProgress, ScDocument* pDoc, +static void lcl_CreateInterpretProgress( bool& bProgress, ScDocument* pDoc, const ScFormulaCell* pFCell ) { if ( !bProgress && pFCell->GetDirty() ) @@ -1078,7 +1078,7 @@ static inline void lcl_CreateInterpretProgress( bool& bProgress, ScDocument* pDo } } -static inline bool IsAmbiguousScript( SvtScriptType nScript ) +static bool IsAmbiguousScript( SvtScriptType nScript ) { return ( nScript != SvtScriptType::LATIN && nScript != SvtScriptType::ASIAN && diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 6087ef2bee21..d3011c54caed 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -78,17 +78,17 @@ namespace{ -inline bool lcl_GetBool(const SfxItemSet* pSet, sal_uInt16 nWhich) +bool lcl_GetBool(const SfxItemSet* pSet, sal_uInt16 nWhich) { return static_cast<const SfxBoolItem&>(pSet->Get(nWhich)).GetValue(); } -inline sal_uInt16 lcl_GetUShort(const SfxItemSet* pSet, sal_uInt16 nWhich) +sal_uInt16 lcl_GetUShort(const SfxItemSet* pSet, sal_uInt16 nWhich) { return static_cast<const SfxUInt16Item&>(pSet->Get(nWhich)).GetValue(); } -inline bool lcl_GetShow(const SfxItemSet* pSet, sal_uInt16 nWhich) +bool lcl_GetShow(const SfxItemSet* pSet, sal_uInt16 nWhich) { return ScVObjMode::VOBJ_MODE_SHOW == static_cast<const ScViewObjectModeItem&>(pSet->Get(nWhich)).GetValue(); } diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index f9b0ae4b7d8b..acb9a8ba3d57 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1426,7 +1426,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY } } -static inline void ShowHide( vcl::Window* pWin, bool bShow ) +static void ShowHide( vcl::Window* pWin, bool bShow ) { OSL_ENSURE(pWin || !bShow, "window is not present"); if (pWin) @@ -2310,14 +2310,12 @@ void ScTabView::SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector<ed namespace { -inline long lcl_GetRowHeightPx(const ScDocument* pDoc, SCROW nRow, SCTAB nTab) { const sal_uInt16 nSize = pDoc->GetRowHeight(nRow, nTab); return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL); } -inline long lcl_GetColWidthPx(const ScDocument* pDoc, SCCOL nCol, SCTAB nTab) { const sal_uInt16 nSize = pDoc->GetColWidth(nCol, nTab); diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index a6b8e7df568c..9bd869bc8c95 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -710,7 +710,7 @@ double ConvertToDec( const OUString& aStr, sal_uInt16 nBase, sal_uInt16 nCharLim } -static inline sal_Char GetMaxChar( sal_uInt16 nBase ) +static sal_Char GetMaxChar( sal_uInt16 nBase ) { const sal_Char* const c = "--123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; return c[ nBase ]; @@ -769,31 +769,31 @@ double Erfc( double x ) return ::rtl::math::erfc(x); } -static inline bool IsNum( sal_Unicode c ) +static bool IsNum( sal_Unicode c ) { return c >= '0' && c <= '9'; } -static inline bool IsComma( sal_Unicode c ) +static bool IsComma( sal_Unicode c ) { return c == '.' || c == ','; } -static inline bool IsExpStart( sal_Unicode c ) +static bool IsExpStart( sal_Unicode c ) { return c == 'e' || c == 'E'; } -static inline bool IsImagUnit( sal_Unicode c ) +static bool IsImagUnit( sal_Unicode c ) { return c == 'i' || c == 'j'; } -static inline sal_uInt16 GetVal( sal_Unicode c ) +static sal_uInt16 GetVal( sal_Unicode c ) { return sal_uInt16( c - '0' ); } diff --git a/scaddins/source/pricing/black_scholes.cxx b/scaddins/source/pricing/black_scholes.cxx index ff5c5f71cda6..126901ad5c20 100644 --- a/scaddins/source/pricing/black_scholes.cxx +++ b/scaddins/source/pricing/black_scholes.cxx @@ -86,16 +86,16 @@ namespace bs { // helper functions -static inline double sqr(double x) { +static double sqr(double x) { return x*x; } // normal density (see also ScInterpreter::phi) -static inline double dnorm(double x) { +static double dnorm(double x) { //return (1.0/sqrt(2.0*M_PI))*exp(-0.5*x*x); // windows may not have M_PI return 0.39894228040143268*exp(-0.5*x*x); } // cumulative normal distribution (see also ScInterpreter::integralPhi) -static inline double pnorm(double x) { +static double pnorm(double x) { //return 0.5*(erf(sqrt(0.5)*x)+1.0); // windows may not have erf return 0.5 * ::rtl::math::erfc(-x * 0.7071067811865475); } diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index f7bc21f9b8fb..bf7ac6744695 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1690,7 +1690,7 @@ OUString StringResourcePersistenceImpl::implGetPathForLocaleItem // White space according to Java property files specification in // http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream) -static inline bool isWhiteSpace( sal_Unicode c ) +static bool isWhiteSpace( sal_Unicode c ) { bool bWhite = ( c == 0x0020 || // space c == 0x0009 || // tab @@ -1700,7 +1700,7 @@ static inline bool isWhiteSpace( sal_Unicode c ) return bWhite; } -static inline void skipWhites( const sal_Unicode* pBuf, sal_Int32 nLen, sal_Int32& ri ) +static void skipWhites( const sal_Unicode* pBuf, sal_Int32 nLen, sal_Int32& ri ) { while( ri < nLen ) { @@ -1710,7 +1710,7 @@ static inline void skipWhites( const sal_Unicode* pBuf, sal_Int32 nLen, sal_Int3 } } -static inline bool isHexDigit( sal_Unicode c, sal_uInt16& nDigitVal ) +static bool isHexDigit( sal_Unicode c, sal_uInt16& nDigitVal ) { bool bRet = true; if( c >= '0' && c <= '9' ) @@ -1921,7 +1921,7 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile } -static inline sal_Unicode getHexCharForDigit( sal_uInt16 nDigitVal ) +static sal_Unicode getHexCharForDigit( sal_uInt16 nDigitVal ) { sal_Unicode cRet = ( nDigitVal < 10 ) ? ('0' + nDigitVal) : ('a' + (nDigitVal-10)); return cRet; diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 116663fd2d57..3fa01dd159e2 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1873,7 +1873,7 @@ void SdOOXMLExportTest2::testTdf118836() xDocShRef->DoClose(); } -static inline double getAdjustmentValue( uno::Reference<beans::XPropertySet>& xSet ) +static double getAdjustmentValue( uno::Reference<beans::XPropertySet>& xSet ) { auto aGeomPropSeq = xSet->getPropertyValue( "CustomShapeGeometry" ) .get<uno::Sequence<beans::PropertyValue>>(); @@ -1898,7 +1898,7 @@ static inline double getAdjustmentValue( uno::Reference<beans::XPropertySet>& xS return -1.0; } -static inline bool getScaleXValue(uno::Reference<beans::XPropertySet>& xSet) +static bool getScaleXValue(uno::Reference<beans::XPropertySet>& xSet) { bool bScaleX = false; diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx index 84382281b98b..9b2915024085 100644 --- a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx @@ -34,7 +34,7 @@ class PageEnumerationImpl : public Enumeration<SharedPageDescriptor> { public: - inline PageEnumerationImpl ( + PageEnumerationImpl ( const SlideSorterModel& rModel, const PageEnumeration::PagePredicate& rPredicate); PageEnumerationImpl(const PageEnumerationImpl&) = delete; @@ -56,7 +56,7 @@ private: It does not call AdvanceToNextValidElement() to skip elements that do not fulfill Predicate. */ - inline PageEnumerationImpl ( + PageEnumerationImpl ( const SlideSorterModel& rModel, const PageEnumeration::PagePredicate& rPredicate, int nIndex); @@ -64,7 +64,7 @@ private: /** Skip all elements that do not fulfill Predicate starting with the one pointed to by mnIndex. */ - inline void AdvanceToNextValidElement(); + void AdvanceToNextValidElement(); }; } // end of anonymouse namespace diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 942a5d60cc9f..261e680a778f 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -67,7 +67,7 @@ namespace pdfi { /// cut off very small numbers & clamp value to zero -static inline double normalize( double val ) +static double normalize( double val ) { return fabs(val) < 0.0000001 ? 0.0 : val; } @@ -415,12 +415,12 @@ static void writeImage_( OutputBuffer& o_rOutputBuf, // forwarders -static inline void writeImageLF( OutputBuffer& o_rOutputBuf, +static void writeImageLF( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, GfxImageColorMap* colorMap ) { writeImage_(o_rOutputBuf,str,width,height,colorMap); } -static inline void writeMaskLF( OutputBuffer& o_rOutputBuf, +static void writeMaskLF( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 563d07cd65d5..a5abc61b5022 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -119,7 +119,7 @@ static void CreateFilterArr() theSfxFilterListener::get(); } -static inline OUString ToUpper_Impl( const OUString &rStr ) +static OUString ToUpper_Impl( const OUString &rStr ) { return SvtSysLocale().GetCharClass().uppercase( rStr ); } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 86440fbc0bf8..226e59ba7431 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -564,7 +564,7 @@ static void MakeTree_Impl(StyleTreeArr_Impl& rArr) }); } -static inline bool IsExpanded_Impl( const std::vector<OUString>& rEntries, +static bool IsExpanded_Impl( const std::vector<OUString>& rEntries, const OUString &rStr) { for (const auto & rEntry : rEntries) diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx index 04fade568a21..5369b803a692 100644 --- a/sfx2/source/view/lokcharthelper.cxx +++ b/sfx2/source/view/lokcharthelper.cxx @@ -31,12 +31,12 @@ using namespace com::sun::star; namespace { -inline Point lcl_TwipsToHMM( const Point& rPoint ) +Point lcl_TwipsToHMM( const Point& rPoint ) { return Point(convertTwipToMm100(rPoint.getX()), convertTwipToMm100(rPoint.getY())); } -inline Size lcl_TwipsToHMM( const Size& rSize ) +Size lcl_TwipsToHMM( const Size& rSize ) { return Size(convertTwipToMm100(rSize.getWidth()), convertTwipToMm100(rSize.getHeight())); } diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx index 522203b040ae..fd24e3c16919 100644 --- a/shell/source/all/xml_parser.cxx +++ b/shell/source/all/xml_parser.cxx @@ -54,7 +54,7 @@ namespace /* private */ return p; } - inline xml_parser* get_parser_instance(void* data) + xml_parser* get_parser_instance(void* data) { return static_cast<xml_parser*>(XML_GetUserData( static_cast<XML_Parser>(data))); diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 09673698de9e..cfe971af958b 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -36,7 +36,7 @@ namespace } GError*& getRef() { return m_pError; } }; - inline GDBusProxy* lcl_GetPackageKitProxy(const OUString& sInterface) + GDBusProxy* lcl_GetPackageKitProxy(const OUString& sInterface) { const OString sFullInterface = OUStringToOString("org.freedesktop.PackageKit." + sInterface, RTL_TEXTENCODING_ASCII_US); GDBusProxy* proxy = nullptr; diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index d8a1d8837d96..ff8126285ff6 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -72,10 +72,10 @@ void ShowUsage() std::cout << "-rcf Name of the resource file footer" << std::endl; } -inline OUString OStringToOUString(const OString& str) +OUString OStringToOUString(const OString& str) { return OStringToOUString(str, osl_getThreadTextEncoding()); } -inline OString OUStringToOString(const OUString& str) +OString OUStringToOString(const OUString& str) { return OUStringToOString(str, osl_getThreadTextEncoding()); } /** Get the directory where the module diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx index 458a6da2fe79..746704dbfbd0 100644 --- a/shell/source/unix/sysshell/recently_used_file.cxx +++ b/shell/source/unix/sysshell/recently_used_file.cxx @@ -35,7 +35,7 @@ const char SLASH[] = "/"; namespace { -inline void ensure_final_slash(/*inout*/ OUString& path) +void ensure_final_slash(/*inout*/ OUString& path) { if (!path.isEmpty() && (SLASH[0] != path.pData->buffer[path.getLength() - 1])) diff --git a/slideshow/source/engine/opengl/Operation.cxx b/slideshow/source/engine/opengl/Operation.cxx index 674eb0da00d8..6789fcc5ae6c 100644 --- a/slideshow/source/engine/opengl/Operation.cxx +++ b/slideshow/source/engine/opengl/Operation.cxx @@ -115,7 +115,7 @@ makeRotateAndScaleDepthByHeight(const glm::vec3& Axis,const glm::vec3& Origin,do return std::make_shared<RotateAndScaleDepthByHeight>(Axis, Origin, Angle, bScale, bInter, T0, T1); } -static inline double intervalInter(double t, double T0, double T1) +static double intervalInter(double t, double T0, double T1) { return ( t - T0 ) / ( T1 - T0 ); } diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx index 9d6b457ae7f1..f73237e16baf 100644 --- a/slideshow/source/engine/opengl/TransitionImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionImpl.cxx @@ -923,13 +923,13 @@ std::shared_ptr<OGLTransitionImpl> makeRochade() return makeRochadeTransition(aLeavingSlide, aEnteringSlide, aSettings); } -static inline double randFromNeg1to1() +static double randFromNeg1to1() { return comphelper::rng::uniform_real_distribution(-1.0, std::nextafter(1.0, DBL_MAX)); } // TODO(Q3): extract to basegfx -static inline glm::vec3 randNormVectorInXYPlane() +static glm::vec3 randNormVectorInXYPlane() { glm::vec3 toReturn(randFromNeg1to1(),randFromNeg1to1(),0.0); return glm::normalize(toReturn); diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index b67e6fc08059..333412d90029 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; namespace std { // add operator!= for weak_ptr - static inline bool operator!=( slideshow::internal::LayerWeakPtr const& rLHS, + static bool operator!=( slideshow::internal::LayerWeakPtr const& rLHS, slideshow::internal::LayerWeakPtr const& rRHS ) { return rLHS.lock().get() != rRHS.lock().get(); diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index abb743e8efac..b4f224450ce2 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -142,7 +142,7 @@ int result = 32; } #endif -static inline unsigned int get_unaligned_uint(const unsigned char* cursor) +static unsigned int get_unaligned_uint(const unsigned char* cursor) { unsigned int result; @@ -254,7 +254,7 @@ void* next; } } -static inline void* pool_alloc(struct pool* pool) +static void* pool_alloc(struct pool* pool) { void* data; @@ -522,7 +522,7 @@ unsigned int i; } } -static inline int compare_key(struct hash const * hash, const char* a, const char* b, int len, int const * cost) +static int compare_key(struct hash const * hash, const char* a, const char* b, int len, int const * cost) { #ifdef HASH_STAT *cost += 1; @@ -715,7 +715,7 @@ static void cancel_relative(char const * base, char** ref_cursor, char** ref_cur *ref_cursor_out = cursor_out; } -static inline void eat_space(char ** token) +static void eat_space(char ** token) { while ((' ' == **token) || ('\t' == **token)) { ++(*token); @@ -726,7 +726,7 @@ static inline void eat_space(char ** token) * Prune LibreOffice specific duplicate dependencies to improve * gnumake startup time, and shrink the disk-space footprint. */ -static inline int +static int elide_dependency(const char* key, int key_len, const char **unpacked_end) { #if 0 @@ -788,7 +788,7 @@ static void emit_unpacked_target(const char* token, const char* end) } /* prefix paths to absolute */ -static inline void print_fullpaths(char* line) +static void print_fullpaths(char* line) { char* token; char* end; @@ -861,7 +861,7 @@ static inline void print_fullpaths(char* line) } } -static inline char * eat_space_at_end(char * end) +static char * eat_space_at_end(char * end) { char * real_end; assert('\0' == *end); @@ -875,7 +875,7 @@ static inline char * eat_space_at_end(char * end) } static char* phony_content_buffer; -static inline char* generate_phony_line(char const * phony_target, char const * extension) +static char* generate_phony_line(char const * phony_target, char const * extension) { char const * src; char* dest; @@ -900,7 +900,7 @@ char* last_dot = NULL; return phony_content_buffer; } -static inline int generate_phony_file(char* fn, char const * content) +static int generate_phony_file(char* fn, char const * content) { FILE* depfile; depfile = fopen(fn, "w"); diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 9ec4f68c2f9d..9c4af5cef2e8 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -71,7 +71,7 @@ using namespace ::xmloff::token; namespace { -inline bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar && cChar <= 0xF8FF; } +bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar && cChar <= 0xF8FF; } sal_Unicode ConvertMathToMathML( sal_Unicode cChar ) { diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 5ab63c36b7d7..6cc658415bd6 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -80,7 +80,7 @@ static OUString inv_getImplementationName() } // TODO: Implement centrally -static inline Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XIdlReflection > & xRefl ) +static Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XIdlReflection > & xRefl ) { return xRefl->forName( rType.getTypeName() ); } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 83a99da39f66..52d2eb3ff2d5 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -208,7 +208,7 @@ inline void AdapterImpl::release() } -static inline void constructRuntimeException( +static void constructRuntimeException( uno_Any * pExc, const OUString & rMsg ) { RuntimeException exc( rMsg ); @@ -218,7 +218,7 @@ static inline void constructRuntimeException( } -static inline bool type_equals( +static bool type_equals( typelib_TypeDescriptionReference * pType1, typelib_TypeDescriptionReference * pType2 ) { @@ -755,7 +755,7 @@ FactoryImpl::~FactoryImpl() } -static inline AdapterImpl * lookup_adapter( +static AdapterImpl * lookup_adapter( t_ptr_set ** pp_adapter_set, t_ptr_map & map, void * key, Sequence< Type > const & rTypes ) { diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx index 0e3d35937b15..57b0f2a05418 100644 --- a/stoc/source/proxy_factory/proxyfac.cxx +++ b/stoc/source/proxy_factory/proxyfac.cxx @@ -164,7 +164,7 @@ struct ProxyRoot : public ::cppu::OWeakAggObject // XAggregation virtual Any SAL_CALL queryAggregation( Type const & rType ) override; - inline ProxyRoot( ::rtl::Reference< FactoryImpl > const & factory, + ProxyRoot( ::rtl::Reference< FactoryImpl > const & factory, Reference< XInterface > const & xTarget ); ::rtl::Reference< FactoryImpl > m_factory; @@ -182,7 +182,7 @@ struct binuno_Proxy : public uno_Interface OUString const m_oid; TypeDescription m_typeDescr; - inline binuno_Proxy( + binuno_Proxy( ::rtl::Reference< ProxyRoot > const & root, UnoInterfaceReference const & target, OUString const & oid, TypeDescription const & typeDescr ); @@ -281,7 +281,7 @@ static void binuno_proxy_dispatch( } -inline binuno_Proxy::binuno_Proxy( +binuno_Proxy::binuno_Proxy( ::rtl::Reference< ProxyRoot > const & root, UnoInterfaceReference const & target, OUString const & oid, TypeDescription const & typeDescr ) @@ -296,7 +296,7 @@ inline binuno_Proxy::binuno_Proxy( uno_Interface::pDispatcher = binuno_proxy_dispatch; } -inline ProxyRoot::ProxyRoot( +ProxyRoot::ProxyRoot( ::rtl::Reference< FactoryImpl > const & factory, Reference< XInterface > const & xTarget ) : m_factory( factory ) diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index c169444d731c..e2e2bc565598 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -76,12 +76,12 @@ class acc_Intersection { Reference< security::XAccessControlContext > m_x1, m_x2; - inline acc_Intersection( + acc_Intersection( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ); public: - static inline Reference< security::XAccessControlContext > create( + static Reference< security::XAccessControlContext > create( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ); @@ -90,14 +90,14 @@ public: Any const & perm ) override; }; -inline acc_Intersection::acc_Intersection( +acc_Intersection::acc_Intersection( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ) : m_x1( x1 ) , m_x2( x2 ) {} -inline Reference< security::XAccessControlContext > acc_Intersection::create( +Reference< security::XAccessControlContext > acc_Intersection::create( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ) { @@ -122,12 +122,12 @@ class acc_Union { Reference< security::XAccessControlContext > m_x1, m_x2; - inline acc_Union( + acc_Union( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ); public: - static inline Reference< security::XAccessControlContext > create( + static Reference< security::XAccessControlContext > create( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ); @@ -136,14 +136,14 @@ public: Any const & perm ) override; }; -inline acc_Union::acc_Union( +acc_Union::acc_Union( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ) : m_x1( x1 ) , m_x2( x2 ) {} -inline Reference< security::XAccessControlContext > acc_Union::create( +Reference< security::XAccessControlContext > acc_Union::create( Reference< security::XAccessControlContext > const & x1, Reference< security::XAccessControlContext > const & x2 ) { @@ -200,7 +200,7 @@ class acc_CurrentContext Any m_restriction; public: - inline acc_CurrentContext( + acc_CurrentContext( Reference< XCurrentContext > const & xDelegate, Reference< security::XAccessControlContext > const & xRestriction ); @@ -208,7 +208,7 @@ public: virtual Any SAL_CALL getValueByName( OUString const & name ) override; }; -inline acc_CurrentContext::acc_CurrentContext( +acc_CurrentContext::acc_CurrentContext( Reference< XCurrentContext > const & xDelegate, Reference< security::XAccessControlContext > const & xRestriction ) : m_xDelegate( xDelegate ) @@ -237,7 +237,7 @@ Any acc_CurrentContext::getValueByName( OUString const & name ) } -inline Reference< security::XAccessControlContext > getDynamicRestriction( +Reference< security::XAccessControlContext > getDynamicRestriction( Reference< XCurrentContext > const & xContext ) { if (xContext.is()) @@ -305,7 +305,7 @@ class AccessController ThreadData m_rec; typedef vector< pair< OUString, Any > > t_rec_vec; - inline void clearPostPoned(); + void clearPostPoned(); void checkAndClearPostPoned(); PermissionCollection getEffectivePermissions( @@ -483,7 +483,7 @@ static void dumpPermissions( #endif -inline void AccessController::clearPostPoned() +void AccessController::clearPostPoned() { delete static_cast< t_rec_vec * >( m_rec.getData() ); m_rec.setData( nullptr ); diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index fdf97cb0817b..1390275b3246 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -47,7 +47,7 @@ namespace stoc_sec { -static inline sal_Int32 makeMask( +static sal_Int32 makeMask( OUString const & items, char const * const * strings ) { sal_Int32 mask = 0; @@ -79,7 +79,7 @@ static inline sal_Int32 makeMask( return mask; } -static inline OUString makeStrings( +static OUString makeStrings( sal_Int32 mask, char const * const * strings ) { OUStringBuffer buf( 48 ); @@ -513,7 +513,7 @@ Sequence< OUString > PermissionCollection::toStrings() const } #endif -inline static bool implies( +static bool implies( ::rtl::Reference< Permission > const & head, Permission const & demanded ) { for ( Permission * perm = head.get(); perm; perm = perm->m_next.get() ) diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index d8447a88750a..43aadfff0fbf 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -411,8 +411,8 @@ public: void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName, const Reference<XVetoableChangeListener >& aListener) override; protected: - inline bool is_disposed() const; - inline void check_undisposed() const; + bool is_disposed() const; + void check_undisposed() const; virtual void SAL_CALL disposing() override; bool haveFactoryWithThisImplementation(const OUString& aImplName); @@ -440,14 +440,14 @@ private: }; -inline bool OServiceManager::is_disposed() const +bool OServiceManager::is_disposed() const { // ought to be guarded by m_mutex: return (m_bInDisposing || rBHelper.bDisposed); } -inline void OServiceManager::check_undisposed() const +void OServiceManager::check_undisposed() const { if (is_disposed()) { diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 919a5edc7818..67aa604cef6c 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -76,14 +76,14 @@ static inline double unsigned_int64_to_double( sal_uInt64 n ) static const double DOUBLE_SAL_UINT64_MAX = double(((sal_uInt64(0xffffffff)) << 32) | sal_uInt64(0xffffffff)); -static inline double unsigned_int64_to_double( sal_uInt64 n ) +static double unsigned_int64_to_double( sal_uInt64 n ) { return static_cast<double>(n); } #endif -static inline double round( double aVal ) +static double round( double aVal ) { bool bPos = (aVal >= 0.0); aVal = ::fabs( aVal ); diff --git a/store/source/stordir.cxx b/store/source/stordir.cxx index c1d70ef7a84b..1fec9d435bb6 100644 --- a/store/source/stordir.cxx +++ b/store/source/stordir.cxx @@ -43,7 +43,7 @@ using namespace store; /* * convertTextToUnicode. */ -static inline sal_Size convertTextToUnicode ( +static sal_Size convertTextToUnicode ( rtl_TextToUnicodeConverter hConverter, const sal_Char *pSrcBuffer, sal_Size nSrcLength, sal_Unicode *pDstBuffer, sal_Size nDstLength) diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 76730bec7127..40afffa3e09a 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; using namespace svl; -static inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor) +static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor) { rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << static_cast<int>(rColor.GetGreen()) << " B: " << static_cast<int>(rColor.GetBlue()); return rStrm; diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index 90b43a8ea191..a3b7ef6060a3 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -39,12 +39,12 @@ struct ParsedAddrSpec bool isValid() const { return isPoorlyValid() && m_bAtFound; } - inline void reset(); + void reset(); - inline void finish(); + void finish(); }; -inline void ParsedAddrSpec::reset() +void ParsedAddrSpec::reset() { m_pBegin = nullptr; m_pEnd = nullptr; @@ -53,7 +53,7 @@ inline void ParsedAddrSpec::reset() m_bReparse = false; } -inline void ParsedAddrSpec::finish() +void ParsedAddrSpec::finish() { if (isPoorlyValid()) m_eLastElem = ELEMENT_END; @@ -97,7 +97,7 @@ class SvAddressParser_Impl inline void reset(); - inline void addTokenToAddrSpec(ElementType eTokenElem); + void addTokenToAddrSpec(ElementType eTokenElem); inline void addTokenToRealName(); @@ -136,7 +136,7 @@ inline void SvAddressParser_Impl::reset() m_eType = TOKEN_ATOM; } -inline void SvAddressParser_Impl::addTokenToAddrSpec(ElementType eTokenElem) +void SvAddressParser_Impl::addTokenToAddrSpec(ElementType eTokenElem) { if (!m_pAddrSpec->m_pBegin) m_pAddrSpec->m_pBegin = m_pCurTokenBegin; diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx index 406f643f0fd6..ad72b5a1addb 100644 --- a/svl/source/misc/sharedstringpool.cxx +++ b/svl/source/misc/sharedstringpool.cxx @@ -19,7 +19,7 @@ namespace svl { namespace { -inline sal_Int32 getRefCount( const rtl_uString* p ) +sal_Int32 getRefCount( const rtl_uString* p ) { return (p->refCount & 0x3FFFFFFF); } diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 290d81cca769..a424653679e8 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -282,7 +282,7 @@ OUString URIHelper::simpleNormalizedMakeRelative( namespace { -inline sal_Int32 nextChar(OUString const & rStr, sal_Int32 nPos) +sal_Int32 nextChar(OUString const & rStr, sal_Int32 nPos) { return rtl::isHighSurrogate(rStr[nPos]) && rStr.getLength() - nPos >= 2 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 diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index eb6557db7bea..7e70c1821719 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -3171,7 +3171,7 @@ Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const return aPoint; } -static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, +static long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, long aRefValue, bool bToLower) { long aResult = aCoarseValue; @@ -3190,7 +3190,7 @@ static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, return aResult; } -static inline void lcl_CorrectRectangle(tools::Rectangle & rRect, +static void lcl_CorrectRectangle(tools::Rectangle & rRect, const tools::Rectangle & rSource, const tools::Rectangle & rInGrid) { diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index a7edab8c1452..6084df6abb5a 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 )); } -static inline LanguageType GetDocAppScriptLang( SwDoc const & rDoc ) +static 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 8462cd90f252..a97d1e6bb822 100644 --- a/sw/source/core/bastyp/swregion.cxx +++ b/sw/source/core/bastyp/swregion.cxx @@ -135,7 +135,7 @@ void SwRegionRects::Invert() swap( aInvRegion ); } -static inline SwTwips CalcArea( const SwRect &rRect ) +static SwTwips CalcArea( const SwRect &rRect ) { return rRect.Width() * rRect.Height(); } diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 7971195a6052..4bd824f67f8b 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 -static inline sal_Int32 GetSttOrEnd( bool bCondition, const SwContentNode& rNd ) +static 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 359e63319d53..6115e918be4f 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -173,13 +173,13 @@ bool SwCursorShell::GotoFootnoteAnchor() return bRet; } -static inline bool CmpLE( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) +static 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 ); } -static inline bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt ) +static 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/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 0fdc1937ecae..6d8a8b8bf5dd 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -187,22 +187,22 @@ namespace } private: - inline void SaveBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreBkmks(SwDoc* pDoc, updater_t const & rUpdater); - inline void SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreRedlines(SwDoc* pDoc, updater_t const & rUpdater); - inline void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); - inline void RestoreFlys(SwDoc* pDoc, updater_t const & rUpdater, bool bAuto); - inline void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreUnoCursors(updater_t const & rUpdater); - inline void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreShellCursors(updater_t const & rUpdater); + void SaveBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreBkmks(SwDoc* pDoc, updater_t const & rUpdater); + void SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreRedlines(SwDoc* pDoc, updater_t const & rUpdater); + void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); + void RestoreFlys(SwDoc* pDoc, updater_t const & rUpdater, bool bAuto); + void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreUnoCursors(updater_t const & rUpdater); + void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + void RestoreShellCursors(updater_t const & rUpdater); static const SwPosition& GetRightMarkPos(::sw::mark::IMark const * pMark, bool bOther) { return bOther ? pMark->GetOtherMarkPos() : pMark->GetMarkPos(); }; static void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) { bOther ? pMark->SetOtherMarkPos(*pPos) : pMark->SetMarkPos(*pPos); }; }; - inline void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark) + void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark) { const SwPosition* pPos = &rPaM.GetBound(bGetPoint); if( pPos->nNode.GetIndex() == nNode && pPos->nContent.GetIndex() < nContent ) @@ -211,12 +211,12 @@ namespace rPaMEntries.push_back(aEntry); } } - inline void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) + void lcl_ChkPaMBoth( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) { lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, true, true); lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, false, false); } - inline void lcl_ChkUnoCrsrPaMBoth(std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) + void lcl_ChkUnoCrsrPaMBoth(std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nContent, SwPaM& rPaM) { lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, true, false); lcl_ChkPaM(rPaMEntries, nNode, nContent, rPaM, false, true); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 5f94d27311c1..076428024811 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -206,7 +206,7 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) namespace { - inline bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) + bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) { const SwContentNode* pCNd; return 0 == rPos2.nContent.GetIndex() && diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 7782dfe290f6..5fdaa58590e1 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -119,7 +119,7 @@ namespace pMark); } - inline std::unique_ptr<SwPosition> lcl_PositionFromContentNode( + std::unique_ptr<SwPosition> lcl_PositionFromContentNode( SwContentNode * const pContentNode, const bool bAtEnd) { @@ -132,7 +132,7 @@ namespace // else set it to the begin of the Node after rEnd, if there is one // else set it to the end of the node before rStt // else set it to the ContentNode of the Pos outside the Range - inline std::unique_ptr<SwPosition> lcl_FindExpelPosition( + std::unique_ptr<SwPosition> lcl_FindExpelPosition( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, const SwPosition& rOtherPosition) @@ -1205,7 +1205,7 @@ void MarkManager::dumpAsXml(xmlTextWriterPtr pWriter) const namespace { - inline bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) + bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx ) { return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && rPos.nContent > pIdx->GetIndex() ); } diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index b322e36d7cba..6aadff92cf86 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -912,7 +912,7 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1, namespace { - inline void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData) + void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData) { sal_uLong i = 0; sal_uLong j = 0; diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index c62ceb64cb4b..895d523e0403 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -48,7 +48,7 @@ namespace return pStartNode; } - inline bool lcl_PosCorrAbs(SwPosition & rPos, + bool lcl_PosCorrAbs(SwPosition & rPos, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -61,7 +61,7 @@ namespace return false; }; - inline bool lcl_PaMCorrAbs(SwPaM & rPam, + bool lcl_PaMCorrAbs(SwPaM & rPam, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) @@ -72,7 +72,7 @@ namespace return bRet; }; - inline void lcl_PaMCorrRel1(SwPaM * pPam, + void lcl_PaMCorrRel1(SwPaM * pPam, SwNode const * const pOldNode, const SwPosition& rNewPos, const sal_Int32 nCntIdx) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index db1d7351e7c3..3affc7cdd901 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -679,7 +679,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames, namespace { -inline OUString lcl_CutOffDBCommandType(const OUString& rName) +OUString lcl_CutOffDBCommandType(const OUString& rName) { return rName.replaceFirst(OUStringLiteral1(DB_DELIM), ".").getToken(0, DB_DELIM); } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index efd13d4fda10..92a49b7c5205 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -85,7 +85,7 @@ namespace { } } -static inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask ) +static sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask ) { if( 1 < nLevel ) { diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 55e00d45e104..fcc2cef19805 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -25,7 +25,7 @@ using namespace ::editeng; -static inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop ) +static const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop ) { return bTop ? pBox->GetTop() : pBox->GetBottom(); } @@ -110,7 +110,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTableLineBoxes& rCollTL return nLastPos; } -static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox, +static const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox, bool bTop, const SfxPoolItem** ppItem ) { diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index e90b0454aa5a..9b84ca53b1e1 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -84,7 +84,7 @@ using namespace com::sun::star; -static inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) +static bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) { bool bRet = rNd.GetFileFilterNms( &rText, nullptr ); if( bRet ) diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index e37646e8822b..28ec60d97d43 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -774,7 +774,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) } } -static inline bool lcl_IsTOXSection(SwSectionData const& rSectionData) +static bool lcl_IsTOXSection(SwSectionData const& rSectionData) { return (TOX_CONTENT_SECTION == rSectionData.GetType()) || (TOX_HEADER_SECTION == rSectionData.GetType()); diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index c6a6e0a19207..a5ee3f383cce 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 -static inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } +static 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 @@ -159,7 +159,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, return !rBoxes.empty(); } -static inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine ) +static void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine ) { if( rLineArr.end() == std::find( rLineArr.begin(), rLineArr.end(), pLine ) ) rLineArr.push_back( pLine ); @@ -535,7 +535,7 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) return bRet; } -static inline void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame ) +static 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 d592796fd248..acafa528ac01 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -815,7 +815,7 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const return pRet; } -static inline bool IsValidNextPrevNd( const SwNode& rNd ) +static bool IsValidNextPrevNd( const SwNode& rNd ) { return SwNodeType::Table == rNd.GetNodeType() || ( SwNodeType::ContentMask & rNd.GetNodeType() ) || diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 8319df67ed10..c37bc375b5da 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1312,7 +1312,7 @@ SwContentNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) return static_cast<SwContentNode*>(pNd); } -static inline bool TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd ) +static 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/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 6d9bcab5fcc8..36e401a2e4c6 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -55,7 +55,7 @@ // if selection is bigger as max nodes or more than max selections // => no attributes -static inline sal_uInt16 getMaxLookup() +static sal_uInt16 getMaxLookup() { return 1000; } @@ -548,7 +548,7 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus ) EndAllAction(); } -static inline SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType ) +static SvtScriptType lcl_SetScriptFlags( sal_uInt16 nType ) { switch( nType ) { diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 5bf6dd468477..3a21ae2ccdfe 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 -static inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } +static bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } class TableWait { diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 0b0de1ed1076..7f9b462159f6 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; namespace { -inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) +SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) { if ( bVert ) { diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 88d7a4e38e2c..e379c01c8375 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2143,7 +2143,7 @@ void SwBorderAttrs::IsLine_() * pre-/succeeding paragraph. */ -static inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 ) +static 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 de19e6ffec2e..542247a8500a 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1737,7 +1737,7 @@ void SwFootnoteBossFrame::CollectFootnotes( const SwContentFrame* _pRef, CollectFootnotes_( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrame ); } -static inline void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote ) +static 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/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 487f6247b948..3c621722b3f5 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1591,7 +1591,7 @@ static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, * @param _bBackgrdAlreadyDrawn * boolean (optional; default: false) indicating, if the background is already drawn. */ -static inline void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, +static void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, OutputDevice* _pOut, const SwRect& _rAlignedPaintRect, const GraphicObject& _rGraphicObj, diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 8c8574d3be21..8ca24da7f0ae 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1976,14 +1976,14 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) return bRet; } -static inline void Sub( SwRegionRects& rRegion, const SwRect& rRect ) +static void Sub( SwRegionRects& rRegion, const SwRect& rRect ) { if( rRect.Width() > 1 && rRect.Height() > 1 && rRect.IsOver( rRegion.GetOrigin() )) rRegion -= rRect; } -static inline void Add( SwRegionRects& rRegion, const SwRect& rRect ) +static void Add( SwRegionRects& rRegion, const SwRect& rRect ) { if( rRect.Width() > 1 && rRect.Height() > 1 ) rRegion += rRect; diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 82060a833d06..e77c7a657606 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -265,7 +265,7 @@ namespace { template<class T> -inline T lcl_MulDiv64(sal_uInt64 nA, sal_uInt64 nM, sal_uInt64 nD) +T lcl_MulDiv64(sal_uInt64 nA, sal_uInt64 nM, sal_uInt64 nD) { return static_cast<T>((nA*nM)/nD); } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index da7f5ce7066a..3bee295c6bd9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -173,7 +173,7 @@ static void ChkOutDev( const SwTextSizeInfo &rInf ) } #endif -static inline TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf ) +static TextFrameIndex GetMinLen( const SwTextSizeInfo &rInf ) { const TextFrameIndex nTextLen(rInf.GetText().getLength()); if (rInf.GetLen() == TextFrameIndex(COMPLETE_STRING)) diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 28933fa55922..f0f3646a38da 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); } -static inline void ClearFly( SwTextFormatInfo &rInf ) +static void ClearFly( SwTextFormatInfo &rInf ) { delete rInf.GetFly(); rInf.SetFly(nullptr); diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index b87396701d8d..a2d8761e968f 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -45,7 +45,7 @@ namespace { // A Follow on the same page as its master is nasty. -inline bool IsNastyFollow( const SwTextFrame *pFrame ) +bool IsNastyFollow( const SwTextFrame *pFrame ) { OSL_ENSURE( !pFrame->IsFollow() || !pFrame->GetPrev() || static_cast<const SwTextFrame*>(pFrame->GetPrev())->GetFollow() == pFrame, diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index e0e6d4223840..d5aa051ef7fb 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3094,7 +3094,7 @@ SwTextAttr * SwTextNode::GetTextAttrForCharAt( namespace { -inline sal_uInt16 lcl_BoundListLevel(const int nActualLevel) +sal_uInt16 lcl_BoundListLevel(const int nActualLevel) { return static_cast<sal_uInt16>( std::min( std::max(nActualLevel, 0), MAXLEVEL-1 ) ); } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index a2c43e2824aa..96b7da931ea1 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -963,7 +963,7 @@ SwFrameProperties_Impl::SwFrameProperties_Impl(): { } -static inline void lcl_FillCol ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pAny) +static void lcl_FillCol ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pAny) { if ( pAny ) { @@ -1027,7 +1027,7 @@ SwGraphicProperties_Impl::SwGraphicProperties_Impl( ) : { } -static inline void lcl_FillMirror ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, bool &rRet ) +static void lcl_FillMirror ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, bool &rRet ) { if(pHEvenMirror || pHOddMirror || pVMirror ) { diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index d16972e71e3c..83bd9f22c850 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. -static inline bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID) +static 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 ee146bb68d7f..eeb39421f96b 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -87,7 +87,7 @@ using namespace ::com::sun::star::style; namespace { - inline SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc) + SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc) { return pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier(); } diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index a2eec2792551..16756e475729 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -109,7 +109,7 @@ SwRead SwGetReaderXML() // SW_DLLPUBLIC return ReadXML; } -static inline void SetFltPtr( sal_uInt16 rPos, SwRead pReader ) +static void SetFltPtr( sal_uInt16 rPos, SwRead pReader ) { aReaderWriter[ rPos ].pReader = pReader; } diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 65a1ca26e45c..0c9e4a04c63b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6316,7 +6316,7 @@ void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, Fo EmbedFontStyle( name, XML_embedBoldItalic, family, ITALIC_NORMAL, WEIGHT_BOLD, pitch ); } -static inline char toHexChar( int value ) +static char toHexChar( int value ) { return value >= 10 ? value + 'A' - 10 : value + '0'; } diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 819e14c4ef21..6d2ed207fff6 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; } -static inline sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal) +static sal_uInt16 impl_GetUInt16(const sal_uInt8*& pVal) { sal_uInt16 nRet = *pVal++; nRet += (*pVal++) << 8; return nRet; } -static inline sal_Int32 impl_GetPointComponent(const sal_uInt8*& pVal, std::size_t& rVerticesPos, - sal_uInt16 nPointSize) +static 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/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 447083d83ab6..02f90c9123fb 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3632,7 +3632,7 @@ void WW8RStyle::ImportSprms(std::size_t nPosFc, short nLen, bool bPap) } } -static inline short WW8SkipOdd(SvStream* pSt ) +static short WW8SkipOdd(SvStream* pSt ) { if ( pSt->Tell() & 0x1 ) { @@ -3642,7 +3642,7 @@ static inline short WW8SkipOdd(SvStream* pSt ) return 0; } -static inline short WW8SkipEven(SvStream* pSt ) +static short WW8SkipEven(SvStream* pSt ) { if (!(pSt->Tell() & 0x1)) { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 3cb699a0a0d3..0547fb105046 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; } -static inline sal_uInt32 MSRoundTweak(sal_uInt32 x) +static sal_uInt32 MSRoundTweak(sal_uInt32 x) { return x; } @@ -1542,7 +1542,7 @@ static void FlySecur1(short& rSize, const bool bBorder) rSize = nMin; } -static inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId ) +static 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 @@ static inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt1 return aS.pSprm != nullptr; } -static inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId ) +static bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId ) { SprmResult aS = pStyle->HasParaSprm(nId); if (aS.pSprm && aS.nRemainingData >= 2) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 13c4999c0f46..0200cc99e4b9 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 -static inline sal_uInt8 Get_Byte( sal_uInt8 *& p ) +static sal_uInt8 Get_Byte( sal_uInt8 *& p ) { sal_uInt8 n = *p; p += 1; return n; } -static inline sal_uInt16 Get_UShort( sal_uInt8 *& p ) +static sal_uInt16 Get_UShort( sal_uInt8 *& p ) { const sal_uInt16 n = SVBT16ToShort( *reinterpret_cast<SVBT16*>(p) ); p += 2; return n; } -static inline sal_Int16 Get_Short( sal_uInt8 *& p ) +static sal_Int16 Get_Short( sal_uInt8 *& p ) { return Get_UShort(p); } -static inline sal_uInt32 Get_ULong( sal_uInt8 *& p ) +static sal_uInt32 Get_ULong( sal_uInt8 *& p ) { sal_uInt32 n = SVBT32ToUInt32( *reinterpret_cast<SVBT32*>(p) ); p += 4; return n; } -static inline sal_Int32 Get_Long( sal_uInt8 *& p ) +static sal_Int32 Get_Long( sal_uInt8 *& p ) { return Get_ULong(p); } diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 6fef435bd6a9..8c8b155b3a46 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; -static inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) +static bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) { rWrtSh.SwapPam(); bool bRet = pSect == rWrtSh.GetCurrSection(); @@ -348,9 +348,6 @@ SfxItemSet* SwColumnDlg::EvalCurrentSelection(void) } static -#if OSL_DEBUG_LEVEL < 2 -inline -#endif sal_uInt16 GetMaxWidth( SwColMgr const * pColMgr, sal_uInt16 nCols ) { sal_uInt16 nMax = pColMgr->GetActualSize(); diff --git a/sw/source/ui/table/autoformatpreview.cxx b/sw/source/ui/table/autoformatpreview.cxx index f89f33b3396b..d5e13e58b99f 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); } -static inline void lclSetStyleFromBorder(svx::frame::Style& rStyle, - const ::editeng::SvxBorderLine* pBorder) +static void lclSetStyleFromBorder(svx::frame::Style& rStyle, + const ::editeng::SvxBorderLine* pBorder) { rStyle.Set(pBorder, 0.05, 5); } diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 88caae484258..73b8b52ce965 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -31,7 +31,7 @@ using namespace utl; using namespace com::sun::star::uno; -static inline LanguageType lcl_LanguageOfType(sal_Int16 nType, LanguageType eWestern, LanguageType eCJK, LanguageType eCTL) +static LanguageType lcl_LanguageOfType(sal_Int16 nType, LanguageType eWestern, LanguageType eCJK, LanguageType eCTL) { return nType < FONT_STANDARD_CJK ? eWestern diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 702ea43077cc..61abefb4ffaa 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1070,7 +1070,7 @@ bool SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr return true; } -static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::Reference < XTransferable > &xRef ) +static uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::Reference < XTransferable > &xRef ) { return &xRef; } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 2c2b01533628..9bc9fe208798 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 -static inline bool IsMinMove(const Point &rStartPos, const Point &rLPt) +static 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 @@ static inline bool IsMinMove(const Point &rStartPos, const Point &rLPt) * in selecting, with DrawObjects; at SwgFlys to trigger * hyperlinks if applicable (Download/NewWindow!) */ -static inline bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) +static bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) { bool bRet = true; SdrObject* pObj; diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index 838789b4b6af..bb1a7191485c 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -33,7 +33,7 @@ using namespace utl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader) +static void lcl_assertEndingItem(xmlreader::XmlReader& reader) { int nsId; xmlreader::Span name; @@ -43,7 +43,7 @@ static inline void lcl_assertEndingItem(xmlreader::XmlReader& reader) (void) res; } -static inline OUString lcl_getValue(xmlreader::XmlReader& reader, +static OUString lcl_getValue(xmlreader::XmlReader& reader, const xmlreader::Span& span) { int nsId; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 30dfbed969c2..52c8a12bd17e 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; } -static inline sal_uInt16 GetPackCount() { return SAL_N_ELEMENTS(aSwFields); } +static 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/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 111b4e9703a8..8e945ddfc5c3 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -98,7 +98,7 @@ using namespace ::com::sun::star; /// selected text. Or in other words, the language a spell checker would use. /// If there is more than one language LANGUAGE_DONTKNOW will be returned. // check if nScriptType includes the script type associated to nLang -static inline bool lcl_checkScriptType( SvtScriptType nScriptType, LanguageType nLang ) +static bool lcl_checkScriptType( SvtScriptType nScriptType, LanguageType nLang ) { return bool(nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); } diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 60a9bdcb6aa6..5adc7629a37c 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::uno; namespace { -inline OUString lcl_FullPathName(const OUString& sPath, const OUString& sName) +OUString lcl_FullPathName(const OUString& sPath, const OUString& sName) { return sPath + "/" + sName + SwGlossaries::GetExtension(); } diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 061ae5dc1bbc..e52c3c778940 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -70,7 +70,7 @@ bool SwView::IsDocumentBorder() SvxZoomType::PAGEWIDTH_NOBORDER == m_pWrtShell->GetViewOptions()->GetZoomType(); } -static inline long GetLeftMargin( SwView const &rView ) +static 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/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 59436decddf1..074cb0c23b62 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -45,14 +45,14 @@ inline void SwWrtShell::CloseMark( bool bOkFlag ) namespace { -inline bool isUnicodeVariationSequenceSelector( sal_uInt32 nCode ) +bool isUnicodeVariationSequenceSelector( sal_uInt32 nCode ) { return ( nCode >= 0xFE00 && nCode <= 0xFE0F ) // Variation Selectors block || ( nCode >= 0xE0100 && nCode <= 0xE01EF );// Variation Selectors Supplement block } // Return if the character might be a base character of a CJK ideographic variation sequence -inline bool isCJKIVSCharacters( sal_uInt32 nCode ) +bool isCJKIVSCharacters( sal_uInt32 nCode ) { return ( nCode >= 0x4E00 && nCode <= 0x9FFF ) // CJK Unified Ideographs || ( nCode >= 0x3400 && nCode <= 0x4DBF ) // CJK Unified Ideographs Extension A diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 990d7d3b729e..764236c7d119 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -74,7 +74,7 @@ template<typename T, typename U = T> static Sequence<T> cloneSequence(const Sequence<T>& val); -inline static Sequence< OUString > getSupportedServiceNames() +static Sequence< OUString > getSupportedServiceNames() { OUString aName( SERVICENAME ); return Sequence< OUString >( &aName, 1 ); @@ -1045,7 +1045,7 @@ Sequence<T> cloneSequence(const Sequence<T>& val) } template< class T > -static inline bool makeSurrogate( +static bool makeSurrogate( Reference< T > & rOut, Reference< T > const & rOriginal ) { rOut.clear(); diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index dc5880c1b71c..8ad2c6ee109d 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -67,7 +67,7 @@ namespace bridge_object { -inline static Sequence< OUString > getSupportedServiceNames() +static Sequence< OUString > getSupportedServiceNames() { OUString aName( SERVICENAME ); return Sequence< OUString >( &aName, 1 ); diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index b53072590585..a5f26b912254 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -49,7 +49,7 @@ const sal_Int16 kYearMin = SAL_MIN_INT16; // Days until start of year from zero, so month and day of month can be added. // year 1 => 0 days, year 2 => 365 days, ... // year -1 => -366 days, year -2 => -731 days, ... -inline sal_Int32 ImpYearToDays( sal_Int16 nYear ) +sal_Int32 ImpYearToDays( sal_Int16 nYear ) { assert( nYear != 0 ); sal_Int32 nOffset; @@ -67,7 +67,7 @@ inline sal_Int32 ImpYearToDays( sal_Int16 nYear ) return nOffset + nYr*365 + nYr/4 - nYr/100 + nYr/400; } -inline bool ImpIsLeapYear( sal_Int16 nYear ) +bool ImpIsLeapYear( sal_Int16 nYear ) { // Leap years BCE are -1, -5, -9, ... // See @@ -81,7 +81,7 @@ inline bool ImpIsLeapYear( sal_Int16 nYear ) } // All callers must have sanitized or normalized month and year values! -inline sal_uInt16 ImplDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear ) +sal_uInt16 ImplDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear ) { if ( nMonth != 2 ) return aDaysInMonth[nMonth-1]; diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 6a53e29d9d03..2abdfff07b05 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -552,7 +552,7 @@ static sal_uInt32 const aMustEncodeMap[128] /* ~ */ PA +PD+PE+PF+PG+PH+PI+PJ+PK+PL+PM+PN+PO+PP+PQ, 0 }; -inline bool mustEncode(sal_uInt32 nUTF32, INetURLObject::Part ePart) +bool mustEncode(sal_uInt32 nUTF32, INetURLObject::Part ePart) { return !rtl::isAscii(nUTF32) || !(aMustEncodeMap[nUTF32] & ePart); } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 48cd2f4c2881..ac0510ad59f1 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -53,7 +53,7 @@ #define SMALL_DVALUE 0.0000001 #define FSQRT2 1.4142135623730950488016887242097 -static inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR ) +static double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR ) { const long nDX = rPt.X() - rCenter.X(); double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0 ) ? 0.000000001 : nDX ) ); diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index d2f2f4baec6a..0b0cafc2c85f 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -44,7 +44,7 @@ rtl_TextEncoding getCharsetEncoding(const sal_Char * pBegin, @return True if nChar is a US-ASCII white space character (US-ASCII 0x09 or 0x20). */ -inline bool isWhiteSpace(sal_uInt32 nChar) +bool isWhiteSpace(sal_uInt32 nChar) { return nChar == '\t' || nChar == ' '; } @@ -58,7 +58,7 @@ inline bool isWhiteSpace(sal_uInt32 nChar) corresponding weight (0--63); if nChar is the US-ASCII Base 64 padding character (US-ASCII '='), return -1; otherwise, return -2. */ -inline int getBase64Weight(sal_uInt32 nChar) +int getBase64Weight(sal_uInt32 nChar) { return rtl::isAsciiUpperCase(nChar) ? int(nChar - 'A') : rtl::isAsciiLowerCase(nChar) ? int(nChar - 'a' + 26) : @@ -68,7 +68,7 @@ inline int getBase64Weight(sal_uInt32 nChar) nChar == '=' ? -1 : -2; } -inline bool startsWithLineFolding(const sal_Unicode * pBegin, +bool startsWithLineFolding(const sal_Unicode * pBegin, const sal_Unicode * pEnd) { DBG_ASSERT(pBegin && pBegin <= pEnd, @@ -78,7 +78,7 @@ inline bool startsWithLineFolding(const sal_Unicode * pBegin, && isWhiteSpace(pBegin[2]); // CR, LF } -inline rtl_TextEncoding translateFromMIME(rtl_TextEncoding +rtl_TextEncoding translateFromMIME(rtl_TextEncoding eEncoding) { #if defined(_WIN32) @@ -89,7 +89,7 @@ inline rtl_TextEncoding translateFromMIME(rtl_TextEncoding #endif } -inline bool isMIMECharsetEncoding(rtl_TextEncoding eEncoding) +bool isMIMECharsetEncoding(rtl_TextEncoding eEncoding) { return rtl_isOctetTextEncoding(eEncoding); } @@ -182,7 +182,7 @@ std::unique_ptr<sal_Char[]> convertFromUnicode(const sal_Unicode * pBegin, @return A pointer past the UTF-16 characters put into the buffer (i.e., pBuffer + 1 or pBuffer + 2). */ -inline sal_Unicode * putUTF32Character(sal_Unicode * pBuffer, +sal_Unicode * putUTF32Character(sal_Unicode * pBuffer, sal_uInt32 nUTF32) { DBG_ASSERT(rtl::isUnicodeCodePoint(nUTF32), "putUTF32Character(): Bad char"); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index a99754d972bf..f1d7269069f9 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -46,16 +46,16 @@ c |= nSwapTmp; #include <algorithm> // !!! Do not inline if already the operators <<,>> are inline -inline static void SwapUShort( sal_uInt16& r ) +static void SwapUShort( sal_uInt16& r ) { r = OSL_SWAPWORD(r); } -inline static void SwapShort( short& r ) +static void SwapShort( short& r ) { r = OSL_SWAPWORD(r); } -inline static void SwapULong( sal_uInt32& r ) +static void SwapULong( sal_uInt32& r ) { r = OSL_SWAPDWORD(r); } -inline static void SwapLongInt( sal_Int32& r ) +static void SwapLongInt( sal_Int32& r ) { r = OSL_SWAPDWORD(r); } -inline static void SwapUInt64( sal_uInt64& r ) +static void SwapUInt64( sal_uInt64& r ) { union { @@ -72,7 +72,7 @@ inline static void SwapUInt64( sal_uInt64& r ) s.c[1] = OSL_SWAPDWORD(s.c[1]); r = s.n; } -inline static void SwapInt64( sal_Int64& r ) +static void SwapInt64( sal_Int64& r ) { union { @@ -91,7 +91,7 @@ inline static void SwapInt64( sal_Int64& r ) } #ifdef UNX -inline static void SwapFloat( float& r ) +static void SwapFloat( float& r ) { union { @@ -104,7 +104,7 @@ inline static void SwapFloat( float& r ) r = s.f; } -inline static void SwapDouble( double& r ) +static void SwapDouble( double& r ) { if( sizeof(double) != 8 ) { diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx index 61796adc1605..b1d094ac31e7 100644 --- a/ucb/source/ucp/expand/ucpexpand.cxx +++ b/ucb/source/ucp/expand/ucpexpand.cxx @@ -60,7 +60,7 @@ class ExpandContentProviderImpl : protected MutexHolder, public t_impl_helper uno::Reference< ucb::XContentIdentifier > const & xIdentifier ) const; protected: - inline void check() const; + void check() const; virtual void SAL_CALL disposing() override; public: @@ -85,7 +85,7 @@ public: }; -inline void ExpandContentProviderImpl::check() const +void ExpandContentProviderImpl::check() const { // xxx todo guard? // MutexGuard guard( m_mutex ); diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx index b7270ac91e2a..6162432be141 100644 --- a/ucb/source/ucp/ftp/ftpdirp.cxx +++ b/ucb/source/ucp/ftp/ftpdirp.cxx @@ -29,7 +29,7 @@ using namespace ftp; -static inline bool ascii_isWhitespace( sal_Unicode ch ) +static bool ascii_isWhitespace( sal_Unicode ch ) { return ((ch <= 0x20) && ch); } diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 7934e171e326..a084375aedda 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -354,7 +354,7 @@ static PathStatus getDerivedPath( return aStatus; } -static inline PathStatus getDerivedPath( +static PathStatus getDerivedPath( OUString& _rURL, Bootstrap::Impl::PathData const& _aBaseData, OUString const& _sRelativeURL, @@ -389,7 +389,7 @@ static OUString getExecutableBaseName() return sExecutable; } -static inline Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rResult) +static Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rResult) { return _rResult.status = checkStatusAndNormalizeURL(_rResult.path); } diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index e2f68df9388d..b9aec85c5a2a 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -744,8 +744,7 @@ bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString > c return bRet; } -static inline -OUString lcl_extractSetPropertyName( const OUString& rInPath, const OUString& rPrefix ) +static OUString lcl_extractSetPropertyName( const OUString& rInPath, const OUString& rPrefix ) { OUString const sSubPath = dropPrefixFromConfigurationPath( rInPath, rPrefix); return extractFirstFromConfigurationPath( sSubPath ); diff --git a/unotools/source/config/configpaths.cxx b/unotools/source/config/configpaths.cxx index cd2e9c7f06a7..6625b3d382d4 100644 --- a/unotools/source/config/configpaths.cxx +++ b/unotools/source/config/configpaths.cxx @@ -178,8 +178,7 @@ OUString extractFirstFromConfigurationPath(OUString const& _sInPath, OUString* _ } // find the position after the prefix in the nested path -static inline -sal_Int32 lcl_findPrefixEnd(OUString const& _sNestedPath, OUString const& _sPrefixPath) +static sal_Int32 lcl_findPrefixEnd(OUString const& _sNestedPath, OUString const& _sPrefixPath) { // TODO: currently handles only exact prefix matches sal_Int32 nPrefixLength = _sPrefixPath.getLength(); diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 42506f20027a..3dfacf08a875 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -68,7 +68,7 @@ static bool lcl_SetLocale( LanguageType &rLanguage, const uno::Any &rVal ) return bSucc; } -static inline const OUString lcl_LanguageToCfgLocaleStr( LanguageType nLanguage ) +static const OUString lcl_LanguageToCfgLocaleStr( LanguageType nLanguage ) { OUString aRes; if (LANGUAGE_SYSTEM != nLanguage) diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 11f09a68fe95..a17c81f2ca8a 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -1230,7 +1230,7 @@ static sal_Unicode* ImplAdd9UNum( sal_Unicode* pBuf, sal_uInt32 nNumber ) return pBuf; } -static inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const OUString& rStr ) +static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const OUString& rStr ) { if ( rStr.getLength() == 1 ) *pBuf++ = rStr[0]; @@ -1244,14 +1244,14 @@ static inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const OUString& rSt return pBuf; } -static inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, sal_Unicode c ) +static sal_Unicode* ImplAddString( sal_Unicode* pBuf, sal_Unicode c ) { *pBuf = c; pBuf++; return pBuf; } -static inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBuf, sal_Int32 nLen ) +static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBuf, sal_Int32 nLen ) { memcpy( pBuf, pCopyBuf, nLen * sizeof(sal_Unicode) ); return pBuf + nLen; @@ -1514,7 +1514,7 @@ OUString LocaleDataWrapper::getDuration( const tools::Time& rTime, bool bSec, bo // --- simple number formatting --------------------------------------- -static inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, sal_uInt16 nDecimals ) +static size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, sal_uInt16 nDecimals ) { // approximately 3.2 bits per digit const size_t nDig = ((sizeof(sal_Int64) * 8) / 3) + 1; diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index 6a10c1e6f1ac..b2b25d6df1b5 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -144,7 +144,7 @@ namespace else return false; } - inline bool getISO8601TimeToken(const OUString &i_str, sal_Int32 &io_index, OUString &o_strInt, bool &o_bFraction, OUString &o_strFrac) + bool getISO8601TimeToken(const OUString &i_str, sal_Int32 &io_index, OUString &o_strInt, bool &o_bFraction, OUString &o_strFrac) { OUString resInt; OUString resFrac; @@ -161,7 +161,7 @@ namespace return true; } } - inline bool getISO8601TimeZoneToken(const OUString &i_str, sal_Int32 &io_index, OUString &o_strInt) + bool getISO8601TimeZoneToken(const OUString &i_str, sal_Int32 &io_index, OUString &o_strInt) { const sal_Unicode c0 = '0'; const sal_Unicode c9 = '9'; diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx index 4404fe4144b0..590d04be03db 100644 --- a/vcl/headless/svpprn.cxx +++ b/vcl/headless/svpprn.cxx @@ -56,7 +56,7 @@ static OUString getPdfDir( const PrinterInfo& rInfo ) return aDir; } -static inline int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); } +static int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); } static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx index 903c492c0d35..823942121f3f 100644 --- a/vcl/opengl/RenderList.cxx +++ b/vcl/opengl/RenderList.cxx @@ -148,7 +148,7 @@ void appendPolyLine(vcl::LineBuilder& rBuilder, const basegfx::B2DPolygon& rPoly } } -inline void appendTrapezoid(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices, +void appendTrapezoid(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4, Color nColor, GLfloat fTransparency) diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 5a5a2d4fc3d9..5c35e8e41265 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -48,7 +48,7 @@ namespace { -inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType) +bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType) { switch(nBits) { @@ -75,7 +75,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT return false; } -inline bool isValidBitCount( sal_uInt16 nBitCount ) +bool isValidBitCount( sal_uInt16 nBitCount ) { return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || (nBitCount == 16) || (nBitCount == 24) || (nBitCount == 32); } diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 45234e9bab00..657588f3beda 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -75,7 +75,7 @@ LocaleDataWrapper& vcl::I18nHelper::ImplGetLocaleDataWrapper() const return *mpLocaleDataWrapper; } -static inline bool is_formatting_mark( sal_Unicode c ) +static bool is_formatting_mark( sal_Unicode c ) { if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers return true; diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index 506638cc0ee5..e647cab8de65 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -41,7 +41,7 @@ namespace { template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( +std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const Task& task ) { stream << "a: " << task.IsActive() << " p: " << static_cast<int>(task.GetPriority()); @@ -60,7 +60,7 @@ inline std::basic_ostream<charT, traits> & operator <<( * @see http://clang.llvm.org/compatibility.html#undep_incomplete */ template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( +std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const Timer& timer ) { bool bIsIdle = (dynamic_cast<const Idle*>( &timer ) != nullptr); @@ -78,14 +78,14 @@ inline std::basic_ostream<charT, traits> & operator <<( } template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( +std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const Idle& idle ) { return stream << static_cast<const Timer*>( &idle ); } template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( +std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const ImplSchedulerData& data ) { stream << " i: " << data.mbInScheduler; @@ -311,7 +311,7 @@ inline void Scheduler::UpdateSystemTimer( ImplSchedulerContext &rSchedCtx, Scheduler::ImplStartTimer( nMinPeriod, bForce, nTime ); } -static inline void AppendSchedulerData( ImplSchedulerContext &rSchedCtx, +static void AppendSchedulerData( ImplSchedulerContext &rSchedCtx, ImplSchedulerData * const pSchedulerData) { assert(pSchedulerData->mpTask); @@ -329,7 +329,7 @@ static inline void AppendSchedulerData( ImplSchedulerContext &rSchedCtx, pSchedulerData->mpNext = nullptr; } -static inline ImplSchedulerData* DropSchedulerData( +static ImplSchedulerData* DropSchedulerData( ImplSchedulerContext &rSchedCtx, ImplSchedulerData * const pPrevSchedulerData, const ImplSchedulerData * const pSchedulerData, const int nTaskPriority) { diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 09f80fbd0af7..43cdf894e3c2 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -451,7 +451,7 @@ void Application::Execute() pSVData->maAppData.mbInAppExecute = false; } -static inline bool ImplYield(bool i_bWait, bool i_bAllEvents) +static bool ImplYield(bool i_bWait, bool i_bAllEvents) { ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/source/bitmap/BitmapDuoToneFilter.cxx b/vcl/source/bitmap/BitmapDuoToneFilter.cxx index 521d1cc6d98e..65d4b3f41442 100644 --- a/vcl/source/bitmap/BitmapDuoToneFilter.cxx +++ b/vcl/source/bitmap/BitmapDuoToneFilter.cxx @@ -15,8 +15,7 @@ #include <bitmapwriteaccess.hxx> -static inline sal_uInt8 lcl_getDuotoneColorComponent(sal_uInt8 base, sal_uInt16 color1, - sal_uInt16 color2) +static sal_uInt8 lcl_getDuotoneColorComponent(sal_uInt8 base, sal_uInt16 color1, sal_uInt16 color2) { color2 = color2 * base / 0xFF; color1 = color1 * (0xFF - base) / 0xFF; diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index e724730dff99..07c10c50a138 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1774,7 +1774,7 @@ static bool ImplCurrencyProcessKeyInput( const KeyEvent& rKEvt, return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rWrapper ); } -static inline bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue, +static bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rWrapper ) { // fetch number diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 3a0a0b9da8f2..6418e1cb30e1 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -212,7 +212,7 @@ bool ImplCurrencyGetValue( const OUString& rStr, BigInt& rValue, } // namespace -static inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, +static bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper ) { return ImplCurrencyGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper ); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 287b80c09710..b701185d6c3a 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -227,7 +227,7 @@ static const sal_Unicode static_aLFText[] = { '\n', 0 }; static const sal_Unicode static_aCRText[] = { '\r', 0 }; static const sal_Unicode static_aCRLFText[] = { '\r', '\n', 0 }; -static inline const sal_Unicode* static_getLineEndText( LineEnd aLineEnd ) +static const sal_Unicode* static_getLineEndText( LineEnd aLineEnd ) { const sal_Unicode* pRet = nullptr; diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index c2146b962248..be79226ffbef 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -167,7 +167,7 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLo return nullptr; } -static inline OUString ImpGetExtension( const OUString &rPath ) +static OUString ImpGetExtension( const OUString &rPath ) { OUString aExt; INetURLObject aURL( rPath ); diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index 3101056824ad..0f14529eec5c 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -53,7 +53,7 @@ int CompatibleWriter::WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const void* } /// Convert to inch, then assume 96 DPI. -inline double pointToPixel(const double fPoint, const double fResolutionDPI) +double pointToPixel(const double fPoint, const double fResolutionDPI) { return fPoint * fResolutionDPI / 72.; } diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index f91c0fbee9d1..3c19112a6f72 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -1703,7 +1703,7 @@ void Type1Emitter::emitAllCrypted() // #i110387# quick-and-dirty double->ascii conversion // needed because sprintf/ecvt/etc. alone are too localized (LC_NUMERIC) // also strip off trailing zeros in fraction while we are at it -static inline int dbl2str( char* pOut, double fVal) +static int dbl2str( char* pOut, double fVal) { const int nLen = psp::getValueOfDouble( pOut, fVal, 6); return nLen; diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 76f083663ba0..93318fbd30ae 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -232,7 +232,7 @@ class TrueColorPixelPtr<ScanlineFormat::N8BitPal> // converting truecolor formats template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc ) { rDst.SetColor( rSrc.GetRed(), rSrc.GetGreen(), rSrc.GetBlue() ); @@ -240,7 +240,7 @@ static inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, } template <> -inline void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N16BitTcMsbMask> ( +void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N16BitTcMsbMask> ( const TrueColorPixelPtr<ScanlineFormat::N16BitTcMsbMask>& rDst, const TrueColorPixelPtr<ScanlineFormat::N16BitTcLsbMask>& rSrc ) { @@ -252,7 +252,7 @@ inline void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N1 } template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount ) { TrueColorPixelPtr<DSTFMT> aDst( rDst ); @@ -267,7 +267,7 @@ static inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, // alpha blending truecolor pixels template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal ) { static const unsigned nAlphaShift = 8; @@ -294,7 +294,7 @@ static inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, } template <ScanlineFormat MASKFMT, ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, const TrueColorPixelPtr<MASKFMT>& rMsk, int nPixelCount ) { @@ -376,7 +376,7 @@ static bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine, } template <ScanlineFormat SRCFMT> -static inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc ) +static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc ) { TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits ); @@ -581,7 +581,7 @@ static bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine, // some specializations to reduce the code size template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24BitTcBgr>( +bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24BitTcBgr>( TrueColorPixelPtr<ScanlineFormat::N24BitTcBgr>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) @@ -591,7 +591,7 @@ inline bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24Bit } template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32BitTcAbgr>( +bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32BitTcAbgr>( TrueColorPixelPtr<ScanlineFormat::N32BitTcAbgr>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) @@ -601,7 +601,7 @@ inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32Bi } template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcBgra,ScanlineFormat::N32BitTcBgra>( +bool ImplBlendToBitmap<ScanlineFormat::N32BitTcBgra,ScanlineFormat::N32BitTcBgra>( TrueColorPixelPtr<ScanlineFormat::N32BitTcBgra>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 62262bae7990..1b4c13458ea6 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -135,14 +135,14 @@ struct DIBV5Header : public DIBInfoHeader {} }; -inline sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount ) +sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount ) { return ( nInputCount <= 1 ) ? 1 : ( nInputCount <= 4 ) ? 4 : ( nInputCount <= 8 ) ? 8 : 24; } -inline bool isBitfieldCompression( ScanlineFormat nScanlineFormat ) +bool isBitfieldCompression( ScanlineFormat nScanlineFormat ) { return (ScanlineFormat::N16BitTcLsbMask == nScanlineFormat) || (ScanlineFormat::N32BitTcMask == nScanlineFormat); } diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 5a733c8dd9f2..8a6bbbd5cf76 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -108,13 +108,13 @@ meta_action_name(MetaActionType nMetaAction) #endif } -inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) +void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) { rPt.setX( FRound( fScaleX * rPt.X() ) ); rPt.setY( FRound( fScaleY * rPt.Y() ) ); } -inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY ) +void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY ) { Point aTL( rRect.TopLeft() ); Point aBR( rRect.BottomRight() ); @@ -126,13 +126,13 @@ inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScal rRect.Justify(); } -inline void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY ) +void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY ) { for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ ) ImplScalePoint( rPoly[ i ], fScaleX, fScaleY ); } -inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY ) +void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY ) { if( !rLineInfo.IsDefault() ) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 59c605349dc1..a70c73c3a2ed 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -508,8 +508,8 @@ void doTestCode() static const sal_Int32 nLog10Divisor = 3; static const double fDivisor = 1000.0; -static inline double pixelToPoint( double px ) { return px/fDivisor; } -static inline sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } +static double pixelToPoint( double px ) { return px/fDivisor; } +static sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } const sal_uInt8 PDFWriterImpl::s_nPadString[32] = { @@ -4093,7 +4093,7 @@ sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont ) return nBest; } -static inline const Color& replaceColor( const Color& rCol1, const Color& rCol2 ) +static const Color& replaceColor( const Color& rCol1, const Color& rCol2 ) { return (rCol1 == COL_TRANSPARENT) ? rCol2 : rCol1; } diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 59448f1f8635..a4ce58af0e20 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1547,7 +1547,7 @@ static const long setRun[256] = 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */ }; -static inline bool isSet( const Scanline i_pLine, long i_nIndex ) +static bool isSet( const Scanline i_pLine, long i_nIndex ) { return (i_pLine[ i_nIndex/8 ] & (0x80 >> (i_nIndex&7))) != 0; } diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 5af7829b0e03..ce2d60ba7d66 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1677,7 +1677,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const } } -static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr ) +static bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr ) { bool bIsRect = false; const Point* pPoints = rPoly.GetConstPointAry(); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index e2fd9aeb88a3..510120b9c068 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -210,7 +210,7 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang ) return nChar; } -static inline bool IsControlChar( sal_UCS4 cChar ) +static bool IsControlChar( sal_UCS4 cChar ) { // C0 control characters if( (0x0001 <= cChar) && (cChar <= 0x001F) ) diff --git a/vcl/source/gdi/scrptrun.cxx b/vcl/source/gdi/scrptrun.cxx index 38db1ac2fa35..cbf16d6e85bd 100644 --- a/vcl/source/gdi/scrptrun.cxx +++ b/vcl/source/gdi/scrptrun.cxx @@ -124,7 +124,7 @@ namespace vcl { const char ScriptRun::fgClassID=0; -static inline UBool sameScript(int32_t scriptOne, int32_t scriptTwo) +static UBool sameScript(int32_t scriptOne, int32_t scriptTwo) { return scriptOne <= USCRIPT_INHERITED || scriptTwo <= USCRIPT_INHERITED || scriptOne == scriptTwo; } diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index bcc431e15d11..97f1d987e6d5 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -44,7 +44,7 @@ namespace // Good ole HAKMEM tradition. Calc number of 1 bits in 32bit word, // unrolled loop. See e.g. Hackers Delight, p. 66 - inline sal_Int32 bitcount( sal_uInt32 val ) + sal_Int32 bitcount( sal_uInt32 val ) { val = val - ((val >> 1) & 0x55555555); val = (val & 0x33333333) + ((val >> 2) & 0x33333333); diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index aa3cce22863d..b78625fb54ad 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -76,7 +76,7 @@ namespace vcl namespace { - inline bool equalsLayout( const rendering::IntegerBitmapLayout& rLHS, + bool equalsLayout( const rendering::IntegerBitmapLayout& rLHS, const rendering::IntegerBitmapLayout& rRHS ) { return diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 4d0f1d993cd6..60507cb3b188 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -22,7 +22,7 @@ namespace { -inline bool isSpace( sal_Unicode cChar ) +bool isSpace( sal_Unicode cChar ) { return cChar == ' ' || cChar == '\t' || @@ -30,12 +30,12 @@ inline bool isSpace( sal_Unicode cChar ) cChar == 0x0c || cChar == 0x0b; } -inline bool isProtect( sal_Unicode cChar ) +bool isProtect( sal_Unicode cChar ) { return cChar == '`' || cChar == '\'' || cChar == '"'; } -inline void CopyUntil( char*& pTo, const char*& pFrom, char cUntil, bool bIncludeUntil = false ) +void CopyUntil( char*& pTo, const char*& pFrom, char cUntil, bool bIncludeUntil = false ) { do { @@ -66,7 +66,7 @@ inline void CopyUntil( char*& pTo, const char*& pFrom, char cUntil, bool bInclud pFrom++; } -inline void CopyUntil( sal_Unicode*& pTo, const sal_Unicode*& pFrom, sal_Unicode cUntil, bool bIncludeUntil = false ) +void CopyUntil( sal_Unicode*& pTo, const sal_Unicode*& pFrom, sal_Unicode cUntil, bool bIncludeUntil = false ) { do { diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index ffc1299925d8..fbd4624ce4b8 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1340,7 +1340,7 @@ namespace { // Co = Cs + Cd*(1-As) premultiplied alpha -or- // Co = (AsCs + AdCd*(1-As)) / Ao - inline sal_uInt8 CalcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceAlpha, + sal_uInt8 CalcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceAlpha, const sal_uInt8 nDstAlpha, const sal_uInt8 nResAlpha, const sal_uInt8 nDestColor ) { int c = nResAlpha ? ( static_cast<int>(nSourceAlpha)*nSourceColor + static_cast<int>(nDstAlpha)*nDestColor - @@ -1348,7 +1348,7 @@ namespace return sal_uInt8( c ); } - inline BitmapColor AlphaBlend( int nX, int nY, + BitmapColor AlphaBlend( int nX, int nY, const long nMapX, const long nMapY, BitmapReadAccess const * pP, diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 739955bd00af..2b2eff84978d 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -249,7 +249,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly, namespace { - inline sal_uInt8 GetGradientColorValue( long nValue ) + sal_uInt8 GetGradientColorValue( long nValue ) { if ( nValue < 0 ) return 0; diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index c890037017e7..17cda2bf157e 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -313,7 +313,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, rMapRes.mnMapScDenomY = aTempY.GetDenominator(); } -static inline void ImplCalcMapResolution( const MapMode& rMapMode, +static void ImplCalcMapResolution( const MapMode& rMapMode, long nDPIX, long nDPIY, ImplMapRes& rMapRes, ImplThresholdRes& rThresRes ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 86d1c6eadc3e..0ad3226ed0de 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -79,7 +79,7 @@ struct ImplStatusItem std::unique_ptr<SalLayout> mxLayoutCache; }; -static inline long ImplCalcProgressWidth( sal_uInt16 nMax, long nSize ) +static long ImplCalcProgressWidth( sal_uInt16 nMax, long nSize ) { return ((nMax*(nSize+(nSize/2)))-(nSize/2)+(STATUSBAR_PRGS_OFFSET*2)); } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 9c75767561ea..a105df5f6e36 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -382,7 +382,7 @@ void Window::SetZoom( const Fraction& rZoom ) } } -static inline long WinFloatRound( double fVal ) +static long WinFloatRound( double fVal ) { return( fVal > 0.0 ? static_cast<long>( fVal + 0.5 ) : -static_cast<long>( -fVal + 0.5 ) ); } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 590032d10753..57f37695e1d2 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1961,7 +1961,7 @@ static MouseEventModifiers ImplGetMouseButtonMode( SalMouseEvent const * pEvent return nMode; } -static inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent const * pEvent ) +static bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, true, pEvent->mnX, pEvent->mnY, @@ -1969,7 +1969,7 @@ static inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent ImplGetMouseMoveMode( pEvent ) ); } -static inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent const * pEvent ) +static bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, false, pEvent->mnX, pEvent->mnY, @@ -1977,7 +1977,7 @@ static inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent c ImplGetMouseMoveMode( pEvent ) ); } -static inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent const * pEvent ) +static bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONDOWN, false, pEvent->mnX, pEvent->mnY, @@ -1990,7 +1990,7 @@ static inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseE ImplGetMouseButtonMode( pEvent ) ); } -static inline bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent const * pEvent ) +static bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONUP, false, pEvent->mnX, pEvent->mnY, diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index b3251495b323..dbe1995f5150 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -85,21 +85,21 @@ typedef unsigned long Pixel; using namespace vcl_sal; #ifdef DBG_UTIL -static inline const char *Null( const char *p ) { return p ? p : ""; } -static inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); } -static inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); } +static const char *Null( const char *p ) { return p ? p : ""; } +static const char *GetEnv( const char *p ) { return Null( getenv( p ) ); } +static const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); } -static inline const char *GetAtomName( Display *d, Atom a ) +static const char *GetAtomName( Display *d, Atom a ) { return Null( XGetAtomName( d, a ) ); } -static inline double Hypothenuse( long w, long h ) +static double Hypothenuse( long w, long h ) { return sqrt( static_cast<double>((w*w)+(h*h)) ); } #endif -static inline int ColorDiff( int r, int g, int b ) +static int ColorDiff( int r, int g, int b ) { return (r*r)+(g*g)+(b*b); } -static inline int ColorDiff( Color c1, int r, int g, int b ) +static int ColorDiff( Color c1, int r, int g, int b ) { return ColorDiff( static_cast<int>(c1.GetRed())-r, static_cast<int>(c1.GetGreen())-g, static_cast<int>(c1.GetBlue())-b ); } @@ -788,7 +788,7 @@ OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const return aRet; } -static inline KeySym sal_XModifier2Keysym( Display *pDisplay, +static KeySym sal_XModifier2Keysym( Display *pDisplay, XModifierKeymap const *pXModMap, int n ) { diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 56f6fe1d2d6c..eccba34fdce2 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -119,7 +119,7 @@ static bool is_gnome_desktop( Display* pDisplay ) static bool bWasXError = false; -static inline bool WasXError() +static bool WasXError() { bool bRet = bWasXError; bWasXError = false; diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 7f3f27022099..57399b238c89 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -41,13 +41,13 @@ using namespace x11; * helper functions */ -static inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) +static void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) { pBuffer[ 0 ] = (nNumber & 0xff); pBuffer[ 1 ] = ((nNumber>>8)&0xff); } -static inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) +static void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) { pBuffer[ 0 ] = (nNumber & 0xff); pBuffer[ 1 ] = ((nNumber>>8)&0xff); @@ -55,7 +55,7 @@ static inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) pBuffer[ 3 ] = ((nNumber>>24)&0xff); } -static inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) +static sal_uInt16 readLE16( const sal_uInt8* pBuffer ) { //This is untainted data which comes from a controlled source //so, using a byte-swapping pattern which coverity doesn't @@ -66,7 +66,7 @@ static inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) return v; } -static inline sal_uInt32 readLE32( const sal_uInt8* pBuffer ) +static sal_uInt32 readLE32( const sal_uInt8* pBuffer ) { //This is untainted data which comes from a controlled source //so, using a byte-swapping pattern which coverity doesn't @@ -83,7 +83,7 @@ static inline sal_uInt32 readLE32( const sal_uInt8* pBuffer ) * scanline helpers */ -static inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) +static void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) { switch( depth ) { @@ -194,12 +194,12 @@ static sal_uInt8* X11_getPaletteBmpFromImage( return pBuffer; } -static inline unsigned long doRightShift( unsigned long nValue, int nShift ) +static unsigned long doRightShift( unsigned long nValue, int nShift ) { return (nShift > 0) ? (nValue >> nShift) : (nValue << (-nShift)); } -static inline unsigned long doLeftShift( unsigned long nValue, int nShift ) +static unsigned long doLeftShift( unsigned long nValue, int nShift ) { return (nShift > 0) ? (nValue << nShift) : (nValue >> (-nShift)); } diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 7ea19def9e67..06ee4f180b1b 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -81,7 +81,7 @@ using namespace com::sun::star::lang; * static helpers */ -static inline sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer ) +static sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer ) { sal_uInt16 nRet = static_cast<sal_uInt16>(pBuffer[1]) | (static_cast<sal_uInt16>(pBuffer[0]) << 8); diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index e1960f36dfb3..f008a0294df0 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -61,7 +61,7 @@ void GlyphCache::ClearFontOptions() } } -static inline sal_IntPtr GetFontId(const LogicalFontInstance& rFontInstance) +static sal_IntPtr GetFontId(const LogicalFontInstance& rFontInstance) { if (rFontInstance.GetFontFace()) return rFontInstance.GetFontFace()->GetFontId(); diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index b7aabb648a6e..873abc28575f 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -138,9 +138,9 @@ namespace } } -static inline int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); } +static int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); } -static inline int TenMuToPt( int nUnits ) { return static_cast<int>((static_cast<double>(nUnits)/35.27777778)+0.5); } +static int TenMuToPt( int nUnits ) { return static_cast<int>((static_cast<double>(nUnits)/35.27777778)+0.5); } static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 1ecbcdd5e5d5..560c7caf4af6 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2873,7 +2873,7 @@ struct KeyAlternate KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {} }; -static inline KeyAlternate +static KeyAlternate GetAlternateKeyCode( const sal_uInt16 nKeyCode ) { KeyAlternate aAlternate; diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx index 620e34d928aa..aff9cee2d91e 100644 --- a/vcl/unx/gtk/a11y/atkaction.cxx +++ b/vcl/unx/gtk/a11y/atkaction.cxx @@ -164,7 +164,7 @@ action_wrapper_get_name (AtkAction *action, * The keybindings in <full-path> should be separated by ":" */ -static inline void +static void appendKeyStrokes(OStringBuffer& rBuffer, const uno::Sequence< awt::KeyStroke >& rKeyStrokes) { for( sal_Int32 i = 0; i < rKeyStrokes.getLength(); i++ ) diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx index f5a5324b6680..91e526e0d3b8 100644 --- a/vcl/unx/gtk/a11y/atktable.cxx +++ b/vcl/unx/gtk/a11y/atktable.cxx @@ -23,7 +23,7 @@ using namespace ::com::sun::star; -static inline AtkObject * +static AtkObject * atk_object_wrapper_conditional_ref( const uno::Reference< accessibility::XAccessible >& rxAccessible ) { if( rxAccessible.is() ) diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index b40598a65fd1..4facd6011646 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -170,8 +170,7 @@ get_value( const uno::Sequence< beans::PropertyValue >& rAttributeList, #define get_weight_value( list, index ) get_value( list, index, Weight2String ) #define get_language_string( list, index ) get_value( list, index, Locale2String ) -static inline -double toPoint(sal_Int16 n) +static double toPoint(sal_Int16 n) { // 100th mm -> pt return static_cast<double>(n * 72) / 2540; diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index 63a9cc53a118..02bb04cc18b5 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -177,7 +177,7 @@ AtkStateType mapAtkState( sal_Int16 nState ) return type; } -static inline AtkRole getRoleForName( const gchar * name ) +static AtkRole getRoleForName( const gchar * name ) { AtkRole ret = atk_role_for_name( name ); if( ATK_ROLE_INVALID == ret ) diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 8b96ea38e577..195093551d81 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -348,7 +348,7 @@ struct KeyAlternate KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {} }; -static inline KeyAlternate +static KeyAlternate GetAlternateKeyCode( const sal_uInt16 nKeyCode ) { KeyAlternate aAlternate; diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index ac188941d819..2889535dba05 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -450,7 +450,7 @@ void NWPixmapCacheList::ThemeChanged( ) /********************************************************* * Make border manipulation easier *********************************************************/ -static inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc ) +static void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc ) { aDst.left = pSrc->left; aDst.top = pSrc->top; @@ -3683,7 +3683,7 @@ static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen, /************************************************************************ * helper for GtkSalFrame ************************************************************************/ -static inline Color getColor( const GdkColor& rCol ) +static Color getColor( const GdkColor& rCol ) { return Color( rCol.red >> 8, rCol.green >> 8, rCol.blue >> 8 ); } diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index d957775cfc94..09725122c13f 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -351,7 +351,7 @@ struct KeyAlternate KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {} }; -static inline KeyAlternate +static KeyAlternate GetAlternateKeyCode( const sal_uInt16 nKeyCode ) { KeyAlternate aAlternate; diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 17433d0a8f8e..98aa46f51efc 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2774,7 +2774,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar /************************************************************************ * helper for GtkSalFrame ************************************************************************/ -static inline ::Color getColor( const GdkRGBA& rCol ) +static ::Color getColor( const GdkRGBA& rCol ) { return ::Color( static_cast<int>(rCol.red * 0xFFFF) >> 8, static_cast<int>(rCol.green * 0xFFFF) >> 8, static_cast<int>(rCol.blue * 0xFFFF) >> 8 ); } diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index d71c62b4a95c..e59ddae7bea5 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -1307,7 +1307,7 @@ OUString ExtensionIteratorBase::implGetFileFromPackage( return aFile; } -static inline bool isLetter( sal_Unicode c ) +static bool isLetter( sal_Unicode c ) { return rtl::isAsciiAlpha(c); } diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 19d4b5b3f942..0667b3fdfd55 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -1014,7 +1014,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP return xHelpPackage; } -static inline bool isLetter( sal_Unicode c ) +static bool isLetter( sal_Unicode c ) { return rtl::isAsciiAlpha(c); } diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index e4651faa0f1d..d2255d17640b 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -138,7 +138,7 @@ struct RDFaEntry { } }; -static inline bool isWS(const sal_Unicode i_Char) +static bool isWS(const sal_Unicode i_Char) { return ('\t' == i_Char) || ('\n' == i_Char) || ('\r' == i_Char) || (' ' == i_Char); diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 224ae8e95cbe..7673c9d48756 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::beans; using namespace ::comphelper; using namespace ::xmloff::token; -static inline bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) +static bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) { return (rLine1.InnerLineWidth == rLine2.InnerLineWidth) && (rLine1.OuterLineWidth == rLine2.OuterLineWidth) && @@ -40,7 +40,7 @@ static inline bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const (rLine1.LineWidth == rLine2.LineWidth); } -static inline void lcl_RemoveState( XMLPropertyState* pState ) +static void lcl_RemoveState( XMLPropertyState* pState ) { pState->mnIndex = -1; pState->maValue.clear(); diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index d607e15540dd..cb192f8df4fb 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -250,25 +250,25 @@ SvXMLEnumStringMapEntry<FieldIdEnum> const aFieldServiceNameMapping[] = // property accessor helper functions -static inline bool GetBoolProperty(const OUString&, +static bool GetBoolProperty(const OUString&, const Reference<XPropertySet> &); -static inline bool GetOptionalBoolProperty(const OUString&, +static bool GetOptionalBoolProperty(const OUString&, const Reference<XPropertySet> &, const Reference<XPropertySetInfo> &, bool bDefault); -static inline double GetDoubleProperty(const OUString&, +static double GetDoubleProperty(const OUString&, const Reference<XPropertySet> &); -static inline OUString const GetStringProperty(const OUString&, +static OUString const GetStringProperty(const OUString&, const Reference<XPropertySet> &); -static inline sal_Int32 GetIntProperty(const OUString&, +static sal_Int32 GetIntProperty(const OUString&, const Reference<XPropertySet> &); -static inline sal_Int16 GetInt16Property(const OUString&, +static sal_Int16 GetInt16Property(const OUString&, const Reference<XPropertySet> &); -static inline sal_Int8 GetInt8Property(const OUString&, +static sal_Int8 GetInt8Property(const OUString&, const Reference<XPropertySet> &); -static inline util::DateTime const GetDateTimeProperty( const OUString& sPropName, +static util::DateTime const GetDateTimeProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet); -static inline Sequence<OUString> const GetStringSequenceProperty( +static Sequence<OUString> const GetStringSequenceProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet); @@ -3457,7 +3457,7 @@ OUString XMLTextFieldExport::MakeSequenceRefName( // to be relegated (does that word exist?) to a more appropriate place -inline bool GetBoolProperty( +bool GetBoolProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3466,7 +3466,7 @@ inline bool GetBoolProperty( return bBool; } -inline bool GetOptionalBoolProperty( +bool GetOptionalBoolProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet, const Reference<XPropertySetInfo> & xPropSetInfo, @@ -3476,7 +3476,7 @@ inline bool GetOptionalBoolProperty( ? GetBoolProperty( sPropName, xPropSet ) : bDefault; } -inline double GetDoubleProperty( +double GetDoubleProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3486,7 +3486,7 @@ inline double GetDoubleProperty( return fDouble; } -inline OUString const GetStringProperty( +OUString const GetStringProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3496,7 +3496,7 @@ inline OUString const GetStringProperty( return sString; } -inline sal_Int32 GetIntProperty( +sal_Int32 GetIntProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3506,7 +3506,7 @@ inline sal_Int32 GetIntProperty( return nInt; } -inline sal_Int16 GetInt16Property( +sal_Int16 GetInt16Property( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3516,7 +3516,7 @@ inline sal_Int16 GetInt16Property( return nInt; } -inline sal_Int8 GetInt8Property( +sal_Int8 GetInt8Property( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3526,7 +3526,7 @@ inline sal_Int8 GetInt8Property( return nInt; } -inline util::DateTime const GetDateTimeProperty( +util::DateTime const GetDateTimeProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { @@ -3536,7 +3536,7 @@ inline util::DateTime const GetDateTimeProperty( return aTime; } -inline Sequence<OUString> const GetStringSequenceProperty( +Sequence<OUString> const GetStringSequenceProperty( const OUString& sPropName, const Reference<XPropertySet> & xPropSet) { diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index fec77d042c9c..6a7feee467a9 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::uno; namespace xmlscript { -static inline bool readBorderProps( +static bool readBorderProps( ElementDescriptor * element, Style & style ) { if (element->readProp( &style._border, "Border" )) { @@ -49,7 +49,7 @@ static inline bool readBorderProps( return false; } -static inline bool readFontProps( ElementDescriptor * element, Style & style ) +static bool readFontProps( ElementDescriptor * element, Style & style ) { bool ret = element->readProp( &style._descr, "FontDescriptor" ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 6d8fde165719..32ca0eb15ce0 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -1237,7 +1237,7 @@ void ElementDescriptor::readEvents() } } -static inline bool equalFont( Style const & style1, Style const & style2 ) +static bool equalFont( Style const & style1, Style const & style2 ) { awt::FontDescriptor const & f1 = style1._descr; awt::FontDescriptor const & f2 = style2._descr; |