summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-15 23:10:07 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-19 16:32:15 +0200
commitc78c42f63f91f28dfae7340d379fa1b8136633c0 (patch)
tree22f5bdd4210608b5598b7d39c791c553a3fb6a5f
parent1c6bea8e677861d201e9b21b5f0e356f77dabaaf (diff)
Resolves: tdf#119623 record group positions also for top cells
So listeners can be re-established for remaining grouped cells if top cell is deleted (which ends listening and probably was the cause to exclude them here). Change-Id: Ic91b74c65013452d56b5cfbc132722c4314743c8 Reviewed-on: https://gerrit.libreoffice.org/61808 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit fbec372ba829b3f32b3c0874920b2ee36220ef9d) Reviewed-on: https://gerrit.libreoffice.org/61818 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/core/data/column4.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 832351d275a7..d08321073668 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1539,10 +1539,12 @@ void ScColumn::EndListeningIntersectedGroups(
{
ScFormulaCell* pFC = sc::formula_block::at(*it->data, aPos.second);
ScFormulaCellGroupRef xGroup = pFC->GetCellGroup();
- if (xGroup && !pFC->IsSharedTop())
+ if (xGroup)
{
- // End listening.
- pFC->EndListeningTo(rCxt);
+ if (!pFC->IsSharedTop())
+ // End listening.
+ pFC->EndListeningTo(rCxt);
+
if (pGroupPos)
// Record the position of the top cell of the group.
pGroupPos->push_back(xGroup->mpTopCell->aPos);
@@ -1555,10 +1557,12 @@ void ScColumn::EndListeningIntersectedGroups(
{
ScFormulaCell* pFC = sc::formula_block::at(*it->data, aPos.second);
ScFormulaCellGroupRef xGroup = pFC->GetCellGroup();
- if (xGroup && !pFC->IsSharedTop())
+ if (xGroup)
{
- // End listening.
- pFC->EndListeningTo(rCxt);
+ if (!pFC->IsSharedTop())
+ // End listening.
+ pFC->EndListeningTo(rCxt);
+
if (pGroupPos)
{
// Record the position of the bottom cell of the group.