diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-03 20:57:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-03 20:55:50 +0000 |
commit | 6cb9e6dad798ec59f055aebe84a9c4a21e4be40d (patch) | |
tree | 21a7d6c0b165251ba8e0f36e73c851d41ac9dd04 /include/formula | |
parent | 7e8806cd728bf906e1a8f1d649bef7337f297b1c (diff) |
Remove redundant 'inline' keyword
...from function definitions occurring within class definitions. Done with
a rewriting Clang plugin (to be pushed later).
Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 26 | ||||
-rw-r--r-- | include/formula/formdata.hxx | 30 | ||||
-rw-r--r-- | include/formula/formulahelper.hxx | 2 | ||||
-rw-r--r-- | include/formula/grammar.hxx | 14 | ||||
-rw-r--r-- | include/formula/token.hxx | 16 | ||||
-rw-r--r-- | include/formula/tokenarray.hxx | 42 |
6 files changed, 65 insertions, 65 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index f9ab53a78352..3c65b94973f3 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -114,16 +114,16 @@ public: void copyFrom( const OpCodeMap& r ); /// Get the symbol String -> OpCode hash map for finds. - inline const OpCodeHashMap* getHashMap() const { return mpHashMap; } + const OpCodeHashMap* getHashMap() const { return mpHashMap; } /// Get the symbol String -> AddIn String hash map for finds. - inline const ExternalHashMap* getExternalHashMap() const { return mpExternalHashMap; } + const ExternalHashMap* getExternalHashMap() const { return mpExternalHashMap; } /// Get the AddIn String -> symbol String hash map for finds. - inline const ExternalHashMap* getReverseExternalHashMap() const { return mpReverseExternalHashMap; } + const ExternalHashMap* getReverseExternalHashMap() const { return mpReverseExternalHashMap; } /// Get the symbol string matching an OpCode. - inline const OUString& getSymbol( const OpCode eOp ) const + const OUString& getSymbol( const OpCode eOp ) const { DBG_ASSERT( sal_uInt16(eOp) < mnSymbols, "OpCodeMap::getSymbol: OpCode out of range"); if (sal_uInt16(eOp) < mnSymbols) @@ -133,31 +133,31 @@ public: } /// Get the first character of the symbol string matching an OpCode. - inline sal_Unicode getSymbolChar( const OpCode eOp ) const { return getSymbol(eOp)[0]; }; + sal_Unicode getSymbolChar( const OpCode eOp ) const { return getSymbol(eOp)[0]; }; /// Get the grammar. - inline FormulaGrammar::Grammar getGrammar() const { return meGrammar; } + FormulaGrammar::Grammar getGrammar() const { return meGrammar; } /// Get the symbol count. - inline sal_uInt16 getSymbolCount() const { return mnSymbols; } + sal_uInt16 getSymbolCount() const { return mnSymbols; } /** Are these English symbols, as opposed to native language (which may be English as well)? */ - inline bool isEnglish() const { return mbEnglish; } + bool isEnglish() const { return mbEnglish; } /// Is it an ODF 1.1 compatibility mapping? - inline bool isPODF() const { return FormulaGrammar::isPODF( meGrammar); } + bool isPODF() const { return FormulaGrammar::isPODF( meGrammar); } /* TODO: add isAPI() once a FormulaLanguage was added. */ /// Is it an ODFF / ODF 1.2 mapping? - inline bool isODFF() const { return FormulaGrammar::isODFF( meGrammar); } + bool isODFF() const { return FormulaGrammar::isODFF( meGrammar); } /// Is it an OOXML mapping? - inline bool isOOXML() const { return FormulaGrammar::isOOXML( meGrammar); } + bool isOOXML() const { return FormulaGrammar::isOOXML( meGrammar); } /// Does it have external symbol/name mappings? - inline bool hasExternals() const { return !mpExternalHashMap->empty(); } + bool hasExternals() const { return !mpExternalHashMap->empty(); } /// Put entry of symbol String and OpCode pair. void putOpCode( const OUString & rStr, const OpCode eOp, const CharClass* pCharClass ); @@ -250,7 +250,7 @@ public: /** Set symbol map corresponding to one of predefined formula::FormulaGrammar::Grammar, including an address reference convention. */ - inline FormulaGrammar::Grammar GetGrammar() const { return meGrammar; } + FormulaGrammar::Grammar GetGrammar() const { return meGrammar; } /** Whether current symbol set and grammar need transformation of Table structured references to A1 style references when writing / exporting diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx index b708244bf08c..9fce5d6e54d2 100644 --- a/include/formula/formdata.hxx +++ b/include/formula/formdata.hxx @@ -37,23 +37,23 @@ public: virtual void SaveValues(); - inline sal_uInt16 GetMode() const { return nMode; } - inline sal_Int32 GetFStart() const { return nFStart; } - inline sal_uInt16 GetOffset() const { return nOffset; } - inline sal_uInt16 GetEdFocus() const { return nEdFocus; } - inline const OUString& GetUndoStr() const { return aUndoStr; } - inline bool GetMatrixFlag()const{ return bMatrix;} + sal_uInt16 GetMode() const { return nMode; } + sal_Int32 GetFStart() const { return nFStart; } + sal_uInt16 GetOffset() const { return nOffset; } + sal_uInt16 GetEdFocus() const { return nEdFocus; } + const OUString& GetUndoStr() const { return aUndoStr; } + bool GetMatrixFlag()const{ return bMatrix;} const VclPtr<vcl::Window>& GetFocusWindow()const { return xFocusWin; } - inline const Selection& GetSelection()const { return aSelection;} + const Selection& GetSelection()const { return aSelection;} - inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; } - inline void SetFStart( sal_Int32 nNew ) { nFStart = nNew; } - inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; } - inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; } - inline void SetUndoStr( const OUString& rNew ) { aUndoStr = rNew; } - inline void SetMatrixFlag(bool bNew) { bMatrix=bNew;} - inline void SetFocusWindow(const VclPtr<vcl::Window>& rWin) { xFocusWin=rWin;} - inline void SetSelection(const Selection& aSel) { aSelection=aSel;} + void SetMode( sal_uInt16 nNew ) { nMode = nNew; } + void SetFStart( sal_Int32 nNew ) { nFStart = nNew; } + void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; } + void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; } + void SetUndoStr( const OUString& rNew ) { aUndoStr = rNew; } + void SetMatrixFlag(bool bNew) { bMatrix=bNew;} + void SetFocusWindow(const VclPtr<vcl::Window>& rWin) { xFocusWin=rWin;} + void SetSelection(const Selection& aSel) { aSelection=aSel;} protected: void Reset(); FormEditData( const FormEditData& ); diff --git a/include/formula/formulahelper.hxx b/include/formula/formulahelper.hxx index 58371f1e786e..753ef8e8178e 100644 --- a/include/formula/formulahelper.hxx +++ b/include/formula/formulahelper.hxx @@ -48,7 +48,7 @@ namespace formula public: FormulaHelper(const IFunctionManager* _pFunctionManager); - inline const CharClass* GetCharClass() const { return m_pCharClass; } + const CharClass* GetCharClass() const { return m_pCharClass; } bool GetNextFunc( const OUString& rFormula, bool bBack, diff --git a/include/formula/grammar.hxx b/include/formula/grammar.hxx index 2bd6585a017d..5d7933dee24a 100644 --- a/include/formula/grammar.hxx +++ b/include/formula/grammar.hxx @@ -161,7 +161,7 @@ public: }; /// If English parsing/formatting is associated with a grammar. - static inline bool isEnglish( const Grammar eGrammar ) + static bool isEnglish( const Grammar eGrammar ) { return (eGrammar & kEnglishBit) != 0; } @@ -172,12 +172,12 @@ public: static bool isSupported( const Grammar eGrammar ); - static inline sal_Int32 extractFormulaLanguage( const Grammar eGrammar ) + static sal_Int32 extractFormulaLanguage( const Grammar eGrammar ) { return eGrammar & kFlagMask; } - static inline AddressConvention extractRefConvention( const Grammar eGrammar ) + static AddressConvention extractRefConvention( const Grammar eGrammar ) { return static_cast<AddressConvention>( ((eGrammar & ~kEnglishBit) >> kConventionShift) - @@ -189,28 +189,28 @@ public: static Grammar mergeToGrammar( const Grammar eGrammar, const AddressConvention eConv ); /// If grammar is of ODF 1.1 - static inline bool isPODF( const Grammar eGrammar ) + static bool isPODF( const Grammar eGrammar ) { return extractFormulaLanguage( eGrammar) == css::sheet::FormulaLanguage::ODF_11; } /// If grammar is of ODFF - static inline bool isODFF( const Grammar eGrammar ) + static bool isODFF( const Grammar eGrammar ) { return extractFormulaLanguage( eGrammar) == css::sheet::FormulaLanguage::ODFF; } /// If grammar is of OOXML - static inline bool isOOXML( const Grammar eGrammar ) + static bool isOOXML( const Grammar eGrammar ) { return extractFormulaLanguage( eGrammar) == css::sheet::FormulaLanguage::OOXML; } /// If grammar has an Excel syntax, determined by address convention. - static inline bool isExcelSyntax( const Grammar eGrammar ) + static bool isExcelSyntax( const Grammar eGrammar ) { AddressConvention eConv = extractRefConvention( eGrammar ); switch (eConv) diff --git a/include/formula/token.hxx b/include/formula/token.hxx index 9ba7728c09fa..e6e5bc459b51 100644 --- a/include/formula/token.hxx +++ b/include/formula/token.hxx @@ -103,9 +103,9 @@ public: virtual ~FormulaToken(); - inline void Delete() { delete this; } - inline void DeleteIfZeroRef() { if (mnRefCnt == 0) delete this; } - inline StackVar GetType() const { return eType; } + void Delete() { delete this; } + void DeleteIfZeroRef() { if (mnRefCnt == 0) delete this; } + StackVar GetType() const { return eType; } bool IsFunction() const; // pure functions, no operators bool IsExternalRef() const; @@ -113,19 +113,19 @@ public: sal_uInt8 GetParamCount() const; - inline void IncRef() const + void IncRef() const { osl_atomic_increment(&mnRefCnt); } - inline void DecRef() const + void DecRef() const { if (!osl_atomic_decrement(&mnRefCnt)) const_cast<FormulaToken*>(this)->Delete(); } - inline oslInterlockedCount GetRef() const { return mnRefCnt; } - inline OpCode GetOpCode() const { return eOp; } + oslInterlockedCount GetRef() const { return mnRefCnt; } + OpCode GetOpCode() const { return eOp; } /** Dummy methods to avoid switches and casts where possible, @@ -190,7 +190,7 @@ public: /** This is dirty and only the compiler should use it! */ struct PrivateAccess { friend class FormulaCompiler; private: PrivateAccess() { } }; - inline void NewOpCode( OpCode e, const PrivateAccess& ) { eOp = e; } + void NewOpCode( OpCode e, const PrivateAccess& ) { eOp = e; } }; inline void intrusive_ptr_add_ref(const FormulaToken* p) diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 65b12a940fd4..39e326b63ade 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -80,10 +80,10 @@ public: FORMULA_MISSING_CONVENTION_OOXML }; explicit MissingConvention( Convention eConvention ) : meConvention(eConvention) {} - inline bool isPODF() const { return meConvention == FORMULA_MISSING_CONVENTION_PODF; } - inline bool isODFF() const { return meConvention == FORMULA_MISSING_CONVENTION_ODFF; } - inline bool isOOXML() const { return meConvention == FORMULA_MISSING_CONVENTION_OOXML; } - inline Convention getConvention() const { return meConvention; } + bool isPODF() const { return meConvention == FORMULA_MISSING_CONVENTION_PODF; } + bool isODFF() const { return meConvention == FORMULA_MISSING_CONVENTION_ODFF; } + bool isOOXML() const { return meConvention == FORMULA_MISSING_CONVENTION_OOXML; } + Convention getConvention() const { return meConvention; } private: Convention meConvention; }; @@ -172,14 +172,14 @@ protected: */ sal_uInt16 RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount ); - inline void SetCombinedBitsRecalcMode( ScRecalcMode nBits ) + void SetCombinedBitsRecalcMode( ScRecalcMode nBits ) { nMode |= (nBits & ~ScRecalcMode::EMask); } - inline ScRecalcMode GetCombinedBitsRecalcMode() const + ScRecalcMode GetCombinedBitsRecalcMode() const { return nMode & ~ScRecalcMode::EMask; } /** Exclusive bits already set in nMode are zero'ed, nBits may contain combined bits, but only one exclusive bit may be set! */ - inline void SetMaskedRecalcMode( ScRecalcMode nBits ) + void SetMaskedRecalcMode( ScRecalcMode nBits ) { nMode = GetCombinedBitsRecalcMode() | nBits; } public: @@ -249,36 +249,36 @@ public: void SetHyperLink( bool bVal ) { bHyperLink = bVal; } bool IsHyperLink() const { return bHyperLink; } - inline ScRecalcMode GetRecalcMode() const { return nMode; } + ScRecalcMode GetRecalcMode() const { return nMode; } /** Bits aren't set directly but validated and maybe handled according to priority if more than one exclusive bit was set. */ void AddRecalcMode( ScRecalcMode nBits ); - inline void ClearRecalcMode() { nMode = ScRecalcMode::NORMAL; } - inline void SetExclusiveRecalcModeNormal() + void ClearRecalcMode() { nMode = ScRecalcMode::NORMAL; } + void SetExclusiveRecalcModeNormal() { SetMaskedRecalcMode( ScRecalcMode::NORMAL ); } - inline void SetExclusiveRecalcModeAlways() + void SetExclusiveRecalcModeAlways() { SetMaskedRecalcMode( ScRecalcMode::ALWAYS ); } - inline void SetExclusiveRecalcModeOnLoad() + void SetExclusiveRecalcModeOnLoad() { SetMaskedRecalcMode( ScRecalcMode::ONLOAD ); } - inline void SetExclusiveRecalcModeOnLoadOnce() + void SetExclusiveRecalcModeOnLoadOnce() { SetMaskedRecalcMode( ScRecalcMode::ONLOAD_ONCE ); } - inline void SetRecalcModeForced() + void SetRecalcModeForced() { nMode |= ScRecalcMode::FORCED; } - inline void SetRecalcModeOnRefMove() + void SetRecalcModeOnRefMove() { nMode |= ScRecalcMode::ONREFMOVE; } - inline bool IsRecalcModeNormal() const + bool IsRecalcModeNormal() const { return bool(nMode & ScRecalcMode::NORMAL); } - inline bool IsRecalcModeAlways() const + bool IsRecalcModeAlways() const { return bool(nMode & ScRecalcMode::ALWAYS); } - inline bool IsRecalcModeOnLoad() const + bool IsRecalcModeOnLoad() const { return bool(nMode & ScRecalcMode::ONLOAD); } - inline bool IsRecalcModeOnLoadOnce() const + bool IsRecalcModeOnLoadOnce() const { return bool(nMode & ScRecalcMode::ONLOAD_ONCE); } - inline bool IsRecalcModeForced() const + bool IsRecalcModeForced() const { return bool(nMode & ScRecalcMode::FORCED); } - inline bool IsRecalcModeOnRefMove() const + bool IsRecalcModeOnRefMove() const { return bool(nMode & ScRecalcMode::ONREFMOVE); } /** Get OpCode of the most outer function */ |