tdf#90694 reset group area listeners when splitting group
Change-Id: Ib3e85e1f7e12447fc2998711663ea1e9d1b322e5
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index 4236a9f..c21b31e 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -52,6 +52,17 @@ void SharedFormulaUtil::splitFormulaCellGroup(const CellStoreType::position_type
xGroup2->mpCode = xGroup->mpCode->Clone();
}
#if USE_FORMULA_GROUP_LISTENER
// At least group area listeners will have to be adapted. As long as
// there's no update mechanism and no separated handling of group area and
// other listeners, all listeners of this group's top cell are to be reset.
if (nLength2)
{
rTop.EndListeningTo( rTop.GetDocument(), NULL, ScAddress( ScAddress::UNINITIALIZED));
rTop.SetNeedsListening(true);
}
#endif
xGroup->mnLength = nRow - xGroup->mpTopCell->aPos.Row();
if (xGroup->mnLength == 1)
{