[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

Eike Rathke erack at redhat.com
Tue Aug 16 20:01:53 UTC 2016


 sc/source/core/data/column.cxx |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

New commits:
commit 328d0fcbe2a9dbcb3431d6142073bfe0ea6792cb
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 15 21:23:18 2016 +0200

    Resolves: tdf#100852 update miBroadcasterPos before copying it
    
    Change-Id: I9ab9acfb0871355ceb2c3c83f51e7ba05a74d8f2
    (cherry picked from commit 7b768dd9a78d2a979eb4d1b1b5b33a4f01a1a98a)
    Reviewed-on: https://gerrit.libreoffice.org/28151
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index fdecc5f..bb1f564 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1510,7 +1510,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 )


More information about the Libreoffice-commits mailing list