`WorksheetCopy_copy_cells` should copy comment width and height
Created originally on Bitbucket by Tantale (Laurent LAPORTE)
I saw in the code bellow that comment dimensions (width & height) are not copied. Why?
def _copy_cells(self):
for (row, col), source_cell in self.source._cells.items():
target_cell = self.target.cell(column=col, row=row)
target_cell._value = source_cell._value
target_cell.data_type = source_cell.data_type
if source_cell.has_style:
target_cell._style = copy(source_cell._style)
if source_cell.hyperlink:
target_cell._hyperlink = copy(source_cell.hyperlink)
if source_cell.comment:
target_cell.comment = Comment(source_cell.comment.text, source_cell.comment.author)
Here is a use case, where we should use copy.copy(comment)
and implement __copy__
in Comment
class as suggested in my PR 138.