Kaydet (Commit) 3c913c38 authored tarafından Takeshi Abe's avatar Takeshi Abe

starmath: Omit SmParser::GetError()'s argument

as it was always 0.

Change-Id: I59570967deb139f258e7aeaab17619f714bc7bb5
Reviewed-on: https://gerrit.libreoffice.org/49640Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst 97a73d27
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
void AddError(SmParseError Type, SmNode *pNode); void AddError(SmParseError Type, SmNode *pNode);
const SmErrorDesc* NextError(); const SmErrorDesc* NextError();
const SmErrorDesc* PrevError(); const SmErrorDesc* PrevError();
const SmErrorDesc* GetError(size_t i); const SmErrorDesc* GetError();
static const SmTokenTableEntry* GetTokenTableEntry( const OUString &rName ); static const SmTokenTableEntry* GetTokenTableEntry( const OUString &rName );
const std::set< OUString >& GetUsedSymbols() const { return m_aUsedSymbols; } const std::set< OUString >& GetUsedSymbols() const { return m_aUsedSymbols; }
}; };
......
...@@ -2418,14 +2418,10 @@ const SmErrorDesc *SmParser::PrevError() ...@@ -2418,14 +2418,10 @@ const SmErrorDesc *SmParser::PrevError()
} }
const SmErrorDesc *SmParser::GetError(size_t i) const SmErrorDesc *SmParser::GetError()
{ {
if ( i < m_aErrDescList.size() ) if ( !m_aErrDescList.empty() )
return m_aErrDescList[ i ].get(); return m_aErrDescList.front().get();
if ( static_cast<size_t>(m_nCurError) < m_aErrDescList.size() )
return m_aErrDescList[ m_nCurError ].get();
return nullptr; return nullptr;
} }
......
...@@ -1295,7 +1295,7 @@ void SmViewShell::SetStatusText(const OUString& rText) ...@@ -1295,7 +1295,7 @@ void SmViewShell::SetStatusText(const OUString& rText)
void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc) void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc)
{ {
assert(GetDoc()); assert(GetDoc());
if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError(0)) ) if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError()) )
{ {
SetStatusText( pErrorDesc->m_aText ); SetStatusText( pErrorDesc->m_aText );
GetEditWindow()->MarkError( Point( pErrorDesc->m_pNode->GetColumn(), GetEditWindow()->MarkError( Point( pErrorDesc->m_pNode->GetColumn(),
......
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