Kaydet (Commit) f8eed7ad authored tarafından Markus Mohrhard's avatar Markus Mohrhard

support undoing conditional formats correctly

Change-Id: Ice698827b3bc559a1e5ad0ea929145fa8c0dfffe
üst ac5b0cd6
...@@ -1004,6 +1004,9 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -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); 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) if (pDBDataNoName)
{ {
ScDBData* pNewDBData = new ScDBData(*pDBDataNoName); ScDBData* pNewDBData = new ScDBData(*pDBDataNoName);
...@@ -1119,6 +1122,9 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -1119,6 +1122,9 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nFlags & IDF_CONTENTS) if (nFlags & IDF_CONTENTS)
pDestTab->maNotes.erase(nCol1, nRow1, nCol2, nRow2); 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); bool bAddNotes = nFlags & (IDF_NOTE | IDF_ADDNOTES);
if (bAddNotes) if (bAddNotes)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment