[Libreoffice-commits] core.git: formula/source include/formula
Noel Grandin
noel at peralex.com
Tue Jan 12 00:37:55 PST 2016
formula/source/core/api/token.cxx | 9 +++------
formula/source/ui/dlg/formula.cxx | 4 ++--
include/formula/formula.hxx | 2 +-
include/formula/tokenarray.hxx | 6 ++----
4 files changed, 8 insertions(+), 13 deletions(-)
New commits:
commit 0078512edadbba9b8acefffce4c51220a3b00118
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 10:25:21 2016 +0200
loplugin:unusedmethods unused return value in include/formula
Change-Id: Ic5d6c11d955ef5ef53dea0bb4e5bec8167874a91
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index ff166e1..e868bbf 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -901,7 +901,7 @@ FormulaToken* FormulaTokenArray::ReplaceToken( sal_uInt16 nOffset, FormulaToken*
}
}
-sal_uInt16 FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
+void FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
{
if (nOffset < nLen)
{
@@ -948,13 +948,10 @@ sal_uInt16 FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount
else
nIndex -= nStop - nOffset;
}
-
- return nCount;
}
else
{
SAL_WARN("formula.core","FormulaTokenArray::RemoveToken - nOffset " << nOffset << " >= nLen " << nLen);
- return 0;
}
}
@@ -994,9 +991,9 @@ FormulaToken* FormulaTokenArray::AddDouble( double fVal )
return Add( new FormulaDoubleToken( fVal ) );
}
-FormulaToken* FormulaTokenArray::AddExternal( const sal_Unicode* pStr )
+void FormulaTokenArray::AddExternal( const sal_Unicode* pStr )
{
- return AddExternal( OUString( pStr ) );
+ AddExternal( OUString( pStr ) );
}
FormulaToken* FormulaTokenArray::AddExternal( const OUString& rStr,
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 1cf839d..26fbf81 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1742,9 +1742,9 @@ void FormulaModalDialog::SetMeText(const OUString& _sText)
m_pImpl->SetMeText(_sText);
}
-bool FormulaModalDialog::CheckMatrix(OUString& aFormula)
+void FormulaModalDialog::CheckMatrix(OUString& aFormula)
{
- return m_pImpl->CheckMatrix(aFormula);
+ m_pImpl->CheckMatrix(aFormula);
}
void FormulaModalDialog::Update()
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index 760f4b3..37e4743 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -72,7 +72,7 @@ protected:
void SetMeText(const OUString& _sText);
void Update();
- bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
+ void CheckMatrix(OUString& aFormula /*IN/OUT*/);
void Update(const OUString& _sExp);
void StoreFormEditData(FormEditData* pData);
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index bf3056a..d88f884 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -159,10 +159,8 @@ protected:
Start offset into pCode.
@param nCount
Count of tokens to remove.
-
- @return The actual number of tokens removed from pCode array.
*/
- sal_uInt16 RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount );
+ void RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount );
inline void SetCombinedBitsRecalcMode( ScRecalcMode nBits )
{ nMode |= (nBits & ~RECALCMODE_EMASK); }
@@ -304,7 +302,7 @@ public:
FormulaToken* AddString( const svl::SharedString& rStr );
FormulaToken* AddDouble( double fVal );
- FormulaToken* AddExternal( const sal_Unicode* pStr );
+ void AddExternal( const sal_Unicode* pStr );
/** Xcl import may play dirty tricks with OpCode!=ocExternal.
Others don't use! */
FormulaToken* AddExternal( const OUString& rStr, OpCode eOp = ocExternal );
More information about the Libreoffice-commits
mailing list