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:
committed by
Kohei Yoshida
parent
522e9c65fa
commit
a7ad759726
@@ -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 )
|
||||
|
Reference in New Issue
Block a user