diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-23 17:19:51 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-23 17:27:48 +0100 |
commit | f8eed7ad9d4fda19578c13c8d2142005ff0023d7 (patch) | |
tree | ea43d9acd66d143521eb85ee403d57cf0c66519d /sc/source | |
parent | ac5b0cd66a0fa0158a8ec35b2853c18450d9965c (diff) |
support undoing conditional formats correctly
Change-Id: Ice698827b3bc559a1e5ad0ea929145fa8c0dfffe
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/table2.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index ea7f03986f75..ce11688b4d77 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1004,6 +1004,9 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pDestTab->maNotes.CopyFromClip(maNotes, pDestTab->pDocument, nCol1, nRow1, nCol2, nRow2, 0, 0, pDestTab->nTab, bCloneCaption); } + if(pDestTab->pDocument->IsUndo() && (nFlags & IDF_ATTRIB)) + pDestTab->mpCondFormatList.reset(new ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList)); + if (pDBDataNoName) { ScDBData* pNewDBData = new ScDBData(*pDBDataNoName); @@ -1119,6 +1122,9 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (nFlags & IDF_CONTENTS) pDestTab->maNotes.erase(nCol1, nRow1, nCol2, nRow2); + if (nFlags & IDF_ATTRIB) + pDestTab->mpCondFormatList.reset(new ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList)); + bool bAddNotes = nFlags & (IDF_NOTE | IDF_ADDNOTES); if (bAddNotes) { |