summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-15 23:10:07 +0200
committerAndras Timar <andras.timar@collabora.com>2019-04-24 22:48:14 +0200
commitc444aab457f1383cb94f9ab7b39ae87d37a4c817 (patch)
tree7232adfe6040c8cdcfd8bc52a3f24795e4943213
parent46968a28c47b12ce4557fda5dd96641f3e0a4fa6 (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
-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 520bd815873c..4739eace586b 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1522,10 +1522,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);
@@ -1538,10 +1540,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.