diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-25 01:01:16 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-25 23:05:48 +0000 |
commit | 8a11d34c7e08218b5ff9da4870c460297f312332 (patch) | |
tree | 1aa048423a4773426fee571f050b02be55c58019 /sc/source/core | |
parent | cda8ce18310c2c32166e03acd5e2a852b960a892 (diff) |
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@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/column4.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/document10.cxx | 9 | ||||
-rw-r--r-- | sc/source/core/data/table7.cxx | 7 |
3 files changed, 14 insertions, 10 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index d403b797bf55..e3cfb3d193b6 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 0bad66d336ce..4d59838fa8ae 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 067cbdcd648b..d4cd767ec256 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) |