sc/source/core/data/formulacell.cxx | 3 +-- sc/source/core/data/grouptokenconverter.cxx | 13 ++----------- sc/source/core/inc/grouptokenconverter.hxx | 2 +- sc/source/ui/inc/checklistmenu.hxx | 7 ++++++- 4 files changed, 10 insertions(+), 15 deletions(-)
New commits: commit 84aee1ae9d4e03054dfcf5f8a9f10ecd2b0496b8 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 16 09:07:39 2016 +0000 coverity#1356339 Uninitialized pointer field Change-Id: I3a99a0bcfb58c72b444c7a5596f4bfa53b306025 diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index a75c299..693de5e 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -251,7 +251,12 @@ class ScSearchEdit : public Edit private: ScTabStops* mpTabStops; public: - ScSearchEdit(Window* pParent) : Edit(pParent) {} + ScSearchEdit(Window* pParent) + : Edit(pParent) + , mpTabStops(nullptr) + { + } + virtual ~ScSearchEdit() {} virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; commit 1c122eb61d1ea6e8eb597d16cc3df0826bde8c9f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 15 21:11:24 2016 +0000 Undo my poor mans recursion control in favour of the real thing i.e. undo commit ea441294e15b23f703f139055e9a18287745ca23 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 2 13:19:32 2015 +0100 avoid endless recursion in fdo84763-2.ods and rely on commit 29ee431c1cf859c3d5a5041cff5cb04b89db27a0 Author: Eike Rathke <er...@redhat.com> Date: Tue Mar 15 17:39:03 2016 +0100 Resolves: tdf#93196 add RecursionCounter guard also to InterpretFormulaGroup() ... same as for ScFormulaCell::InterpretTail() Change-Id: I85dc6e37d987ce9fe41a9e4c337e02a1cec4f0c8 diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index d483ef7..a2891ae 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -4036,8 +4036,7 @@ bool ScFormulaCell::InterpretFormulaGroup() ScTokenArray aCode; ScGroupTokenConverter aConverter(aCode, *pDocument, *this, xGroup->mpTopCell->aPos); - std::vector<ScTokenArray*> aLoopControl; - if (!aConverter.convert(*pCode, aLoopControl)) + if (!aConverter.convert(*pCode)) { SAL_INFO("sc.opencl", "conversion of group " << this << " failed, disabling"); mxGroup->meCalcState = sc::GroupCalcDisabled; diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx index de3fbf2..da3964c 100644 --- a/sc/source/core/data/grouptokenconverter.cxx +++ b/sc/source/core/data/grouptokenconverter.cxx @@ -89,7 +89,7 @@ ScGroupTokenConverter::ScGroupTokenConverter(ScTokenArray& rGroupTokens, ScDocum { } -bool ScGroupTokenConverter::convert(ScTokenArray& rCode, std::vector<ScTokenArray*>& rConversionStack) +bool ScGroupTokenConverter::convert(ScTokenArray& rCode) { #if 0 { // debug to start with: @@ -232,16 +232,7 @@ bool ScGroupTokenConverter::convert(ScTokenArray& rCode, std::vector<ScTokenArra mrGroupTokens.AddOpCode(ocOpen); - if (std::find(rConversionStack.begin(), rConversionStack.end(), pNamedTokens) != rConversionStack.end()) - { - SAL_WARN("sc", "loop in recursive ScGroupTokenConverter::convert"); - return false; - } - - rConversionStack.push_back(pNamedTokens); - bool bOk = convert(*pNamedTokens, rConversionStack); - rConversionStack.pop_back(); - if (!bOk) + if (!convert(*pNamedTokens)) return false; mrGroupTokens.AddOpCode(ocClose); diff --git a/sc/source/core/inc/grouptokenconverter.hxx b/sc/source/core/inc/grouptokenconverter.hxx index b221363..9685681 100644 --- a/sc/source/core/inc/grouptokenconverter.hxx +++ b/sc/source/core/inc/grouptokenconverter.hxx @@ -30,7 +30,7 @@ class SC_DLLPUBLIC ScGroupTokenConverter public: ScGroupTokenConverter(ScTokenArray& rGroupTokens, ScDocument& rDoc, ScFormulaCell& rCell, const ScAddress& rPos); - bool convert(ScTokenArray& rCode, std::vector<ScTokenArray*>& rConversionStack); + bool convert(ScTokenArray& rCode); }; #endif // INCLUDED_SC_SOURCE_CORE_INC_GROUPTOKENCONVERTER_HXX
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits