[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Mar 24 02:12:40 UTC 2017
sc/source/core/tool/interpr4.cxx | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
New commits:
commit a7ad759726752453856e5bb997ef73d61a56b072
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 23 21:29:16 2017 -0400
Remove near-duplicated code.
Change-Id: I46e743ae47c76c4e9c22d092f501636ebab92878
Reviewed-on: https://gerrit.libreoffice.org/35606
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index f527a86e8627..5510b8f9c655 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -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 )
More information about the Libreoffice-commits
mailing list