diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 11:55:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-19 08:07:04 +0000 |
commit | f019ee7cf9e278cd8a27b1c36172ad4c8124080c (patch) | |
tree | 2bd572ff8dc882f5f790165bf54c044af9c37190 /basic | |
parent | 9e54e0708df58b054996d6f6c66852a50d25e742 (diff) |
loplugin:expandablemethodds in basctl..chart2
Change-Id: I96f565a974fe3e316ae2ab04f8731b8bbfb87993
Reviewed-on: https://gerrit.libreoffice.org/29998
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/inc/sbstdobj.hxx | 1 | ||||
-rw-r--r-- | basic/source/comp/exprgen.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/exprnode.cxx | 4 | ||||
-rw-r--r-- | basic/source/inc/expr.hxx | 9 | ||||
-rw-r--r-- | basic/source/runtime/stdobj1.cxx | 2 |
5 files changed, 6 insertions, 16 deletions
diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx index b0840a84a3a6..7cc22584fab7 100644 --- a/basic/inc/sbstdobj.hxx +++ b/basic/inc/sbstdobj.hxx @@ -90,7 +90,6 @@ public: bool IsUnderline() const { return bUnderline; } void SetSize( sal_uInt16 nS ) { nSize = nS; } sal_uInt16 GetSize() const { return nSize; } - void SetFontName( const OUString& rName ) { aName = rName; } const OUString& GetFontName() const { return aName; } }; diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index 7581d6e2029c..1b0638881bce 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -108,7 +108,7 @@ void SbiExprNode::Gen( SbiCodeGen& rGen, RecursiveMode eRecMode ) } } // special treatment for WITH - else if( (pWithParent_ = GetWithParent()) != nullptr ) + else if( (pWithParent_ = pWithParent) != nullptr ) { eOp = SbiOpcode::ELEM_; // .-Term in WITH } @@ -141,12 +141,12 @@ void SbiExprNode::Gen( SbiCodeGen& rGen, RecursiveMode eRecMode ) eOp = SbiOpcode::ELEM_; } } - else if( IsTypeOf() ) + else if( eNodeType == SbxTYPEOF ) { pLeft->Gen(rGen); rGen.Gen( SbiOpcode::TESTCLASS_, nTypeStrId ); } - else if( IsNew() ) + else if( eNodeType == SbxNEW ) { rGen.Gen( SbiOpcode::CREATE_, 0, nTypeStrId ); } diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index 70de50941fd2..cfde488b0900 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -223,9 +223,9 @@ void SbiExprNode::FoldConstants(SbiParser* pParser) { if( IsOperand() || eTok == LIKE ) return; - if (IsUnary()) + if (pLeft && !pRight) FoldConstantsUnaryNode(pParser); - else if (IsBinary()) + else if (pLeft && pRight) FoldConstantsBinaryNode(pParser); if( eNodeType == SbxNUMVAL ) diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx index 748d6b26e400..68a7bf90be0f 100644 --- a/basic/source/inc/expr.hxx +++ b/basic/source/inc/expr.hxx @@ -109,10 +109,6 @@ class SbiExprNode final { // operators (and operands) void CollectBits(); // converting numbers to strings bool IsOperand() { return eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW; } - bool IsTypeOf() - { return eNodeType == SbxTYPEOF; } - bool IsNew() - { return eNodeType == SbxNEW; } bool IsNumber(); bool IsLvalue(); // true, if usable as Lvalue void GenElement( SbiCodeGen&, SbiOpcode ); @@ -132,12 +128,7 @@ public: { return eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL; } void ConvertToIntConstIfPossible(); bool IsVariable(); - bool IsUnary() - { return pLeft && !pRight; } - bool IsBinary() - { return pLeft && pRight; } - SbiExprNode* GetWithParent() { return pWithParent; } void SetWithParent( SbiExprNode* p ) { pWithParent = p; } SbxDataType GetType() { return eType; } diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index cd963d12301b..a46520bbd544 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -202,7 +202,7 @@ void SbStdFont::PropName( SbxVariable* pVar, SbxArray*, bool bWrite ) { if( bWrite ) { - SetFontName( pVar->GetOUString() ); + aName = pVar->GetOUString(); } else { |