diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-16 12:23:36 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-16 12:24:05 +0100 |
commit | 87d2c012ef51aca8bba127145c97409506217a4f (patch) | |
tree | a040ff3a2581166bb23940ceb770480a0de8118f | |
parent | 8c976b4544e6feac8e3db54461859d18e94cadaf (diff) |
tdf#96475 PasteSpecial EmptyDisplayedAsString as empty
Deactivating the assert in fillSortedColumnArray() was necessary for the bug's
Paste Special and Sort scenario, but actually the assert could had been hit
also earlier if some cell values were not pasted / skipped and Sort was invoked
after that.
Change-Id: I7b08bfb4104f4c7eb30815944bc87eec79a87334
-rw-r--r-- | sc/source/core/data/column3.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 8a81dcb47a16..3af350d2aaf9 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -953,6 +953,11 @@ public: } } } + else if (rSrcCell.IsEmptyDisplayedAsString()) + { + // Empty stays empty and doesn't become 0. + continue; + } else if (rSrcCell.IsValue()) { bool bCopy = mrCxt.isDateCell(mrSrcCol, nSrcRow) ? bDateTime : bNumeric; diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index cace30906f52..eb91b3c86935 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -780,7 +780,12 @@ void fillSortedColumnArray( } break; default: - assert(!rCell.mpAttr); + //assert(!rCell.mpAttr); + // This assert doesn't hold, for example + // CopyCellsFromClipHandler may omit copying cells during + // PasteSpecial for which CopyTextAttrsFromClipHandler + // still copies a CellTextAttr. So if that really is not + // expected then fix it there. rCellStore.push_back_empty(); } |