summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/sharedformula.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-05 15:51:46 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-10 09:34:06 +0200
commit23a02eac6884cf3669e3a6b5935b4a56fb16b5e6 (patch)
tree71556852826cf89d0e62fe7dfa047782b4a079ff /sc/source/core/tool/sharedformula.cxx
parente226392c0289ab0f0d90615967a2c2a6b24daf3a (diff)
tdf#90694 reset group area listeners when splitting group
(cherry picked from commit 2f6a06856ad8df0c11a112d1e457b408e9a7af1d) tdf#90694 reset group area listeners on correct top Follow-up on 2f6a06856ad8df0c11a112d1e457b408e9a7af1d, rTop is top of created group, listening needs to be ended on original (previous) group. (cherry picked from commit 5d6448a5131488eac3a6af16bff06140663c3db4) 1f975a0a6c85e649aa07ce5c6e97bc6e917ff9ce Change-Id: Ib3e85e1f7e12447fc2998711663ea1e9d1b322e5 Reviewed-on: https://gerrit.libreoffice.org/16104 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/tool/sharedformula.cxx')
-rw-r--r--sc/source/core/tool/sharedformula.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index b1cd80d1fe7c..84025b91fc04 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -55,12 +55,24 @@ void SharedFormulaUtil::splitFormulaCellGroup(const CellStoreType::position_type
}
xGroup->mnLength = nRow - xGroup->mpTopCell->aPos.Row();
+ ScFormulaCell& rPrevTop = *sc::formula_block::at(*aPos.first->data, aPos.second - xGroup->mnLength);
+
+#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)
+ {
+ rPrevTop.EndListeningTo( rPrevTop.GetDocument(), NULL, ScAddress( ScAddress::UNINITIALIZED));
+ rPrevTop.SetNeedsListening(true);
+ }
+#endif
+
if (xGroup->mnLength == 1)
{
// The top group consists of only one cell. Ungroup this.
ScFormulaCellGroupRef xNone;
- ScFormulaCell& rPrev = *sc::formula_block::at(*aPos.first->data, aPos.second-1);
- rPrev.SetCellGroup(xNone);
+ rPrevTop.SetCellGroup(xNone);
}
// Apply the lower group object to the lower cells.