Kaydet (Commit) 5669ea31 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedmethods unused return value in starmath

Change-Id: Ic70c3d727ecadd082f7e5d293fc2b279b1287b8f
üst 50f02484
......@@ -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;
}
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment