From 346b900594a84581056ba56061ea513f4e6f101d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Jul 2018 10:05:03 +0200 Subject: loplugin:mergeclasses merge IFormulaToken into FormulaToken Change-Id: I5dbf870ff27f1039e24f4350787cf5bfc5f4ccaf Reviewed-on: https://gerrit.libreoffice.org/57487 Tested-by: Jenkins Reviewed-by: Noel Grandin --- formula/source/core/api/FormulaCompiler.cxx | 2 +- formula/source/core/api/token.cxx | 2 +- formula/source/ui/dlg/structpg.cxx | 19 ++++++++++--------- formula/source/ui/dlg/structpg.hxx | 10 +++++----- 4 files changed, 17 insertions(+), 16 deletions(-) (limited to 'formula') diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index ac42bd3df588..5d4c3e76ec5b 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2193,7 +2193,7 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf // shall separate a function-name from the left parenthesis (() // that follows it." and Excel even chokes on it. const FormulaToken* p = maArrIterator.PeekPrevNoSpaces(); - if (p && p->isFunction()) + if (p && p->IsFunction()) { p = maArrIterator.PeekNextNoSpaces(); if (p && p->GetOpCode() == ocOpen) diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index a8fb0b42541d..37b19d3b21f3 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -71,7 +71,7 @@ FormulaToken::FormulaToken( StackVar eTypeP, OpCode e ) : } FormulaToken::FormulaToken( const FormulaToken& r ) : - IFormulaToken(), eOp(r.eOp), eType( r.eType ), mnRefCnt(0) + eOp(r.eOp), eType( r.eType ), mnRefCnt(0) { } diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index e63ed7420c46..56a94d40a8fb 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include namespace formula @@ -45,10 +46,10 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ): SvTreeListEntry* StructListBox::InsertStaticEntry( const OUString& rText, const Image& rEntryImg, - SvTreeListEntry* pParent, sal_uLong nPos, const IFormulaToken* pToken ) + SvTreeListEntry* pParent, sal_uLong nPos, const FormulaToken* pToken ) { SvTreeListEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, false, nPos, - const_cast(pToken) ); + const_cast(pToken) ); return pEntry; } @@ -117,7 +118,7 @@ void StructPage::ClearStruct() } SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent, - sal_uInt16 nFlag, sal_uLong nPos, const IFormulaToken* pIFormulaToken ) + sal_uInt16 nFlag, sal_uLong nPos, const FormulaToken* pIFormulaToken ) { m_pTlbStruct->SetActiveFlag( false ); @@ -126,7 +127,7 @@ SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry { case STRUCT_FOLDER: pEntry = m_pTlbStruct->InsertEntry( rText, pParent, false, nPos, - const_cast(pIFormulaToken)); + const_cast(pIFormulaToken)); break; case STRUCT_END: pEntry = m_pTlbStruct->InsertStaticEntry( rText, maImgEnd, pParent, nPos, pIFormulaToken ); @@ -149,14 +150,14 @@ OUString StructPage::GetEntryText(SvTreeListEntry* pEntry) const return aString; } -const IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry) +const FormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry) { if (pEntry != nullptr) { - const IFormulaToken * pToken = static_cast(pEntry->GetUserData()); + const FormulaToken * pToken = static_cast(pEntry->GetUserData()); if (pToken != nullptr) { - if ( !(pToken->isFunction() || pToken->getArgumentCount() > 1 ) ) + if ( !(pToken->IsFunction() || pToken->GetParamCount() > 1 ) ) { return GetFunctionEntry(m_pTlbStruct->GetParent(pEntry)); } @@ -178,10 +179,10 @@ IMPL_LINK( StructPage, SelectHdl, SvTreeListBox*, pTlb, void ) SvTreeListEntry* pCurEntry = m_pTlbStruct->GetCurEntry(); if (pCurEntry != nullptr) { - pSelectedToken = static_cast(pCurEntry->GetUserData()); + pSelectedToken = static_cast(pCurEntry->GetUserData()); if (pSelectedToken != nullptr) { - if ( !(pSelectedToken->isFunction() || pSelectedToken->getArgumentCount() > 1) ) + if ( !(pSelectedToken->IsFunction() || pSelectedToken->GetParamCount() > 1) ) { pSelectedToken = GetFunctionEntry(pCurEntry); } diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index 7d1992798924..25e8fec9f6a1 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -31,7 +31,7 @@ namespace formula { -class IFormulaToken; +class FormulaToken; class StructListBox : public SvTreeListBox { private: @@ -51,7 +51,7 @@ public: const Image& rEntryImg, SvTreeListEntry* pParent, sal_uLong nPos, - const IFormulaToken* pToken ); + const FormulaToken* pToken ); void SetActiveFlag(bool bFlag); bool GetActiveFlag() { return bActiveFlag;} @@ -69,13 +69,13 @@ private: Image maImgEnd; Image maImgError; - const IFormulaToken* pSelectedToken; + const FormulaToken* pSelectedToken; DECL_LINK( SelectHdl, SvTreeListBox*, void ); using Window::GetParent; - const IFormulaToken* GetFunctionEntry(SvTreeListEntry* pEntry); + const FormulaToken* GetFunctionEntry(SvTreeListEntry* pEntry); public: @@ -85,7 +85,7 @@ public: void ClearStruct(); SvTreeListEntry* InsertEntry(const OUString& rText, SvTreeListEntry* pParent, - sal_uInt16 nFlag, sal_uLong nPos, const IFormulaToken* pScToken); + sal_uInt16 nFlag, sal_uLong nPos, const FormulaToken* pScToken); OUString GetEntryText(SvTreeListEntry* pEntry) const; -- cgit