Remove near-duplicated code.

Change-Id: I46e743ae47c76c4e9c22d092f501636ebab92878
Reviewed-on: https://gerrit.libreoffice.org/35606
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
This commit is contained in:
Kohei Yoshida
2017-03-23 21:29:16 -04:00
committed by Kohei Yoshida
parent 522e9c65fa
commit a7ad759726

View File

@@ -940,26 +940,11 @@ void ScInterpreter::SingleRefToVars( const ScSingleRefData & rRef,
void ScInterpreter::PopSingleRef(SCCOL& rCol, SCROW &rRow, SCTAB& rTab)
{
if( sp )
{
--sp;
const FormulaToken* p = pStack[ sp ];
switch (p->GetType())
{
case svError:
nGlobalError = p->GetError();
break;
case svSingleRef:
SingleRefToVars( *p->GetSingleRef(), rCol, rRow, rTab);
if (!pDok->m_TableOpList.empty())
ReplaceCell( rCol, rRow, rTab );
break;
default:
SetError( FormulaError::IllegalParameter);
}
}
else
SetError( FormulaError::UnknownStackVariable);
ScAddress aAddr(rCol, rRow, rTab);
PopSingleRef(aAddr);
rCol = aAddr.Col();
rRow = aAddr.Row();
rTab = aAddr.Tab();
}
void ScInterpreter::PopSingleRef( ScAddress& rAdr )