[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Feb 27 02:49:10 PST 2013


 sc/source/core/data/table2.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit f741827f918e4d1a31a9fad92c52cb2836072e8e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Feb 27 11:44:06 2013 +0100

    the method is actually called twice, fdo#60306
    
    Who the hell had the insane idea to call this method twice. Please give
    me tar and feathers. I'm a big fan of this type of punishment now.
    
    Change-Id: Idd5a17fb69162b2cd00d05223b4561041985e929

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4d32cb3..a53ad1d 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -740,12 +740,15 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
             aCol[i].CopyFromClip(nRow1, nRow2, nDy, nInsFlag, bAsLink, bSkipAttrForEmpty, pTable->aCol[i - nDx]);
 
 
-        // make sure that there are no old references to the cond formats
-        sal_uInt16 nWhichArray[2];
-        nWhichArray[0] = ATTR_CONDITIONAL;
-        nWhichArray[1] = 0;
-        for ( SCCOL i = nCol1; i <= nCol2; ++i)
-            aCol[i].ClearItems(nRow1, nRow2, nWhichArray);
+        if(nInsFlag != IDF_OBJECTS)
+        {
+            // make sure that there are no old references to the cond formats
+            sal_uInt16 nWhichArray[2];
+            nWhichArray[0] = ATTR_CONDITIONAL;
+            nWhichArray[1] = 0;
+            for ( SCCOL i = nCol1; i <= nCol2; ++i)
+                aCol[i].ClearItems(nRow1, nRow2, nWhichArray);
+        }
 
         //remove old notes
         if (nInsFlag & (IDF_NOTE|IDF_ADDNOTES))


More information about the Libreoffice-commits mailing list