summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-14 10:03:16 +0200
committerNoel Grandin <noel@peralex.com>2016-01-14 11:45:21 +0200
commit5669ea31ddacf87bab6283dc9de0aeccb761b5cb (patch)
treea3eb0409c3c20684781cdc71d8a30c5976797830
parent50f024844b1e00249e638df6db029f09465c4c10 (diff)
loplugin:unusedmethods unused return value in starmath
Change-Id: Ic70c3d727ecadd082f7e5d293fc2b279b1287b8f
-rw-r--r--starmath/inc/caret.hxx3
-rw-r--r--starmath/inc/dialog.hxx8
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/inc/parse.hxx2
-rw-r--r--starmath/inc/utility.hxx1
-rw-r--r--starmath/source/document.cxx4
-rw-r--r--starmath/source/parse.cxx4
-rw-r--r--starmath/source/rtfexport.cxx5
-rw-r--r--starmath/source/rtfexport.hxx2
-rw-r--r--starmath/source/utility.cxx5
10 files changed, 11 insertions, 25 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
index 5b9076baa695..0dff68094a18 100644
--- a/starmath/inc/caret.hxx
+++ b/starmath/inc/caret.hxx
@@ -36,9 +36,6 @@ struct SmCaretPos{
int Index;
/** True, if this is a valid caret position */
bool IsValid() const { return pSelectedNode != nullptr; }
- bool operator!=(const SmCaretPos &pos) const {
- return pos.pSelectedNode != pSelectedNode || Index != pos.Index;
- }
bool operator==(const SmCaretPos &pos) const {
return pos.pSelectedNode == pSelectedNode && Index == pos.Index;
}
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 4e7f374268ae..0af5816ee5fa 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -481,14 +481,14 @@ public:
// Dialog
virtual short Execute() override;
- bool SelectOldSymbolSet(const OUString &rSymbolSetName)
+ void SelectOldSymbolSet(const OUString &rSymbolSetName)
{
- return SelectSymbolSet(*pOldSymbolSets, rSymbolSetName, false);
+ SelectSymbolSet(*pOldSymbolSets, rSymbolSetName, false);
}
- bool SelectOldSymbol(const OUString &rSymbolName)
+ void SelectOldSymbol(const OUString &rSymbolName)
{
- return SelectSymbol(*pOldSymbols, rSymbolName, false);
+ SelectSymbol(*pOldSymbols, rSymbolName, false);
}
bool SelectSymbolSet(const OUString &rSymbolSetName)
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 2cda3759af52..dde99d513209 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -178,7 +178,7 @@ public:
const OUString GetComment() const;
// to replace chars that can not be saved with the document...
- bool ReplaceBadChars();
+ void ReplaceBadChars();
void UpdateText();
void SetText(const OUString& rBuffer);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 98733d243146..8c512208dce1 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -116,7 +116,7 @@ public:
bool IsExportSymbolNames() const { return m_bExportSymNames; }
void SetExportSymbolNames(bool bVal) { m_bExportSymNames = bVal; }
- size_t AddError(SmParseError Type, SmNode *pNode);
+ void AddError(SmParseError Type, SmNode *pNode);
const SmErrorDesc* NextError();
const SmErrorDesc* PrevError();
const SmErrorDesc* GetError(size_t i);
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 4c86f33e12e4..4fa044806ef7 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -135,7 +135,6 @@ public:
vcl::Font Get(sal_uInt16 nPos = 0) const;
SmFontPickList& operator = (const SmFontPickList& rList);
- vcl::Font operator [] (sal_uInt16 nPos) const;
void ReadFrom(const SmFontDialog& rDialog);
void WriteTo(SmFontDialog& rDialog) const;
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index f1c799b5f7ba..758fb8a95a0e 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -807,7 +807,7 @@ bool SmDocShell::Save()
/*
* replace bad characters that can not be saved. (#i74144)
* */
-bool SmDocShell::ReplaceBadChars()
+void SmDocShell::ReplaceBadChars()
{
bool bReplace = false;
@@ -827,8 +827,6 @@ bool SmDocShell::ReplaceBadChars()
if (bReplace)
aText = aBuf.makeStringAndClear();
}
-
- return bReplace;
}
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 33499be9186e..ab64bb35e27b 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2414,7 +2414,7 @@ SmNode *SmParser::ParseExpression(const OUString &rBuffer)
}
-size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
+void SmParser::AddError(SmParseError Type, SmNode *pNode)
{
std::unique_ptr<SmErrorDesc> pErrDesc(new SmErrorDesc);
@@ -2445,8 +2445,6 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->m_aText += SM_RESSTR(nRID);
m_aErrDescList.push_back(std::move(pErrDesc));
-
- return m_aErrDescList.size()-1;
}
diff --git a/starmath/source/rtfexport.cxx b/starmath/source/rtfexport.cxx
index de092ea59d76..1abce82cff5c 100644
--- a/starmath/source/rtfexport.cxx
+++ b/starmath/source/rtfexport.cxx
@@ -20,16 +20,15 @@ SmRtfExport::SmRtfExport(const SmNode* pIn)
{
}
-bool SmRtfExport::ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding)
+void SmRtfExport::ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding)
{
if (!m_pTree)
- return false;
+ return;
m_pBuffer = &rBuffer;
m_nEncoding = nEncoding;
m_pBuffer->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE LO_STRING_SVTOOLS_RTF_MOMATH " ");
HandleNode(m_pTree, 0);
m_pBuffer->append("}"); // moMath
- return true;
}
// NOTE: This is still work in progress and unfinished, but it already covers a good
diff --git a/starmath/source/rtfexport.hxx b/starmath/source/rtfexport.hxx
index 24a50d3d31cd..7071b9f74fa7 100644
--- a/starmath/source/rtfexport.hxx
+++ b/starmath/source/rtfexport.hxx
@@ -21,7 +21,7 @@ class SmRtfExport : public SmWordExportBase
{
public:
explicit SmRtfExport(const SmNode* pIn);
- bool ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding);
+ void ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding);
private:
virtual void HandleVerticalStack(const SmNode* pNode, int nLevel) override;
virtual void HandleText(const SmNode* pNode, int nLevel) override;
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 39b04440402b..f66c385dc72d 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -66,11 +66,6 @@ SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList)
return *this;
}
-vcl::Font SmFontPickList::operator [] (sal_uInt16 nPos) const
-{
- return aFontVec[nPos];
-}
-
vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const
{
return nPos < aFontVec.size() ? aFontVec[nPos] : vcl::Font();