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 /sc | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (diff) |
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
57 files changed, 114 insertions, 117 deletions
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); |