summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-16 10:05:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-18 08:37:57 +0200
commit346b900594a84581056ba56061ea513f4e6f101d (patch)
treecf617262c91c9b8f94f02b6ada55b6994a70eb9b /formula
parent2bc84658cce1df5050fe788dd0c8a0906a1ca2c3 (diff)
loplugin:mergeclasses merge IFormulaToken into FormulaToken
Change-Id: I5dbf870ff27f1039e24f4350787cf5bfc5f4ccaf Reviewed-on: https://gerrit.libreoffice.org/57487 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
-rw-r--r--formula/source/core/api/token.cxx2
-rw-r--r--formula/source/ui/dlg/structpg.cxx19
-rw-r--r--formula/source/ui/dlg/structpg.hxx10
4 files changed, 17 insertions, 16 deletions
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 <formula/formdata.hxx>
#include <formula/formula.hxx>
#include <formula/IFunctionDescription.hxx>
+#include <formula/token.hxx>
#include <bitmaps.hlst>
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<IFormulaToken*>(pToken) );
+ const_cast<FormulaToken*>(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<IFormulaToken*>(pIFormulaToken));
+ const_cast<FormulaToken*>(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<const IFormulaToken *>(pEntry->GetUserData());
+ const FormulaToken * pToken = static_cast<const FormulaToken *>(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<const IFormulaToken *>(pCurEntry->GetUserData());
+ pSelectedToken = static_cast<const FormulaToken *>(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;