sc/source/core/inc/interpre.hxx | 2 +- sc/source/core/tool/interpr4.cxx | 7 ++----- sc/source/core/tool/interpr5.cxx | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-)
New commits: commit d27b9f0f95367be3e9b4047bfa0648337241f7fa Author: Eike Rathke <er...@redhat.com> Date: Thu Aug 25 12:21:57 2016 +0200 ScInterpreter::Push() with const FormulaToken& Change-Id: I721963c4a372da0d36ed973edd375fe01ab502fb diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index c6987f8..6551f5b 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -257,7 +257,7 @@ bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, /** Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken. Increments RefCount of the original token if not substituted. */ -void Push( formula::FormulaToken& r ); +void Push( const formula::FormulaToken& r ); /** Does not substitute with formula::FormulaErrorToken in case nGlobalError is set. Used to push RPN tokens or from within Push() or tokens that are already diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 4a232f3..c6e3f20 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -639,7 +639,7 @@ void ScInterpreter::PushWithoutError( const FormulaToken& r ) } } -void ScInterpreter::Push( FormulaToken& r ) +void ScInterpreter::Push( const FormulaToken& r ) { if ( sp >= MAXSTACK ) SetError( errStackOverflow ); @@ -648,10 +648,7 @@ void ScInterpreter::Push( FormulaToken& r ) if (nGlobalError) { if (r.GetType() == svError) - { - r.SetError( nGlobalError); PushWithoutError( r); - } else PushTempTokenWithoutError( new FormulaErrorToken( nGlobalError)); } diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 5321791..d5f09f7 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -3180,8 +3180,8 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth) void ScInterpreter::ScMatRef() { - // Falls Deltarefs drin sind... - Push( (FormulaToken&)*pCur ); + // In case it contains relative references resolve them as usual. + Push( *pCur ); ScAddress aAdr; PopSingleRef( aAdr ); commit 2561ec3f149cec3836982a29c017c0c6eaaa224b Author: Eike Rathke <er...@redhat.com> Date: Thu Aug 25 11:36:17 2016 +0200 away with the unconst cast Change-Id: Ie6a70fa9863bb70dbcf560fc523d8a38dfe67b71 diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 5ff5cfa..4a232f3 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3887,7 +3887,7 @@ StackVar ScInterpreter::Interpret() if ( eOp == ocPush ) { // RPN code push without error - PushWithoutError( (FormulaToken&) *pCur ); + PushWithoutError( *pCur ); } else if (pTokenMatrixMap && !(eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChoose) && _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits