diff --git a/sources/titleblockcell.cpp b/sources/titleblockcell.cpp index 126897994..3f19b63ff 100644 --- a/sources/titleblockcell.cpp +++ b/sources/titleblockcell.cpp @@ -143,6 +143,22 @@ bool TitleBlockCell::spans() const { return(row_span || col_span); } +/** + Copy the content of another cell. + @param other_cell Another cell +*/ +void TitleBlockCell::loadContentFromCell(const TitleBlockCell &other_cell) { + value_name = other_cell.value_name; + cell_type = other_cell.cell_type; + logo_reference = other_cell.logo_reference; + value = other_cell.value; + label = other_cell.label; + display_label = other_cell.display_label; + font_size = other_cell.font_size; + alignment = other_cell.alignment; + hadjust = other_cell.hadjust; +} + /** @param cell_element XML element from which cell content will be read */ diff --git a/sources/titleblockcell.h b/sources/titleblockcell.h index d35de21dc..21f45eb0e 100644 --- a/sources/titleblockcell.h +++ b/sources/titleblockcell.h @@ -46,9 +46,11 @@ class TitleBlockCell { QVariant attribute(const QString &); static QString attributeName(const QString &); bool spans() const; + void loadContentFromCell(const TitleBlockCell &); void loadContentFromXml(const QDomElement &); void saveContentToXml(QDomElement &); + // attributes public: TemplateCellType cell_type; ///< Cell type: empty, text, logo?