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

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Sep 25 23:08:05 UTC 2016


 sc/source/core/data/column4.cxx    |    8 +++++++-
 sc/source/core/data/document10.cxx |    9 ---------
 sc/source/core/data/table7.cxx     |    7 +++++++
 3 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 8a11d34c7e08218b5ff9da4870c460297f312332
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 25 01:01:16 2016 +0200

    tdf#91312, don't forget to delete the old cond format indices
    
    Change-Id: Ia3267bd52d2905cb332daa11b0e7c93251f43e55
    Reviewed-on: https://gerrit.libreoffice.org/29260
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index d403b79..e3cfb3d 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -160,7 +160,13 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
         {
             const ScPatternAttr* pAttr = (bSameDocPool ? rCxt.getSingleCellPattern(nColOffset) :
                     rCxt.getSingleCellPattern(nColOffset)->PutInPool( pDocument, rCxt.getClipDoc()));
-            pAttrArray->SetPatternArea(nRow1, nRow2, pAttr, true);
+
+            ScPatternAttr aNewPattern(*pAttr);
+            sal_uInt16 pItems[2];
+            pItems[0] = ATTR_CONDITIONAL;
+            pItems[1] = 0;
+            aNewPattern.ClearItems(pItems);
+            pAttrArray->SetPatternArea(nRow1, nRow2, &aNewPattern, true);
         }
     }
 
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 0bad66d..4d59838 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -123,15 +123,6 @@ bool ScDocument::CopyOneCellFromClip(
     for (SCTAB i = rCxt.getTabStart(); i <= nTabEnd && i < static_cast<SCTAB>(maTabs.size()); ++i)
     {
         maTabs[i]->CopyOneCellFromClip(rCxt, nCol1, nRow1, nCol2, nRow2,  aClipRange.aStart.Row(), pSrcTab);
-        if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
-            for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
-            {
-                for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
-                {
-                    maTabs[i]->CopyConditionalFormat(nCol, nRow, nCol, nRow, nCol - aClipRange.aStart.Col(),
-                            nRow - aClipRange.aStart.Row(), pSrcTab);
-                }
-            }
     }
 
     return true;
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index 067cbdc..d4cd767 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -64,6 +64,13 @@ void ScTable::CopyOneCellFromClip(
         nColOffset = nColOffset % nSrcColSize;
         assert(nColOffset >= 0);
         aCol[nCol].CopyOneCellFromClip(rCxt, nRow1, nRow2, nColOffset);
+
+        if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
+        {
+            for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
+                CopyConditionalFormat(nCol, nRow, nCol, nRow, nCol - aSrcRange.aStart.Col(),
+                        nRow - nSrcRow, pSrcTab);
+        }
     }
 
     if (nCol1 == 0 && nCol2 == MAXCOL && mpRowHeights)


More information about the Libreoffice-commits mailing list