diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-15 21:23:18 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-15 21:26:47 +0200 |
commit | 7b768dd9a78d2a979eb4d1b1b5b33a4f01a1a98a (patch) | |
tree | 1ac54d2e396862d157ab3282ceb244d2c971c885 /sc/source/core/data/column.cxx | |
parent | 40231526b6a0d6d8713932b3ae60d665f615833c (diff) |
Resolves: tdf#100852 update miBroadcasterPos before copying it
Change-Id: I9ab9acfb0871355ceb2c3c83f51e7ba05a74d8f2
Diffstat (limited to 'sc/source/core/data/column.cxx')
-rw-r--r-- | sc/source/core/data/column.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 183327a5334b..4257ea1ccbb8 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1511,7 +1511,27 @@ public: ~CopyByCloneHandler() { if (mpDestPos) + { + // If broadcasters were setup in the same column, + // maDestPos.miBroadcasterPos doesn't match + // mrDestCol.maBroadcasters because it is never passed anywhere. + // Assign a corresponding iterator before copying all over. + // Otherwise this may result in wrongly copying a singular + // iterator. + + { + /* XXX Using a temporary ColumnBlockPosition just for + * initializing from ScColumn::maBroadcasters.begin() is ugly, + * on the other hand we don't want to expose + * ScColumn::maBroadcasters to the outer world and have a + * getter. */ + sc::ColumnBlockPosition aTempBlock; + mrDestCol.InitBlockPosition(aTempBlock); + maDestPos.miBroadcasterPos = aTempBlock.miBroadcasterPos; + } + *mpDestPos = maDestPos; + } } void setStartListening( bool b ) |