[LyX/master] Explicit InsetTableCell copy constructor
Richard Kimberly Heck
rikiheck at lyx.org
Tue Oct 6 16:02:26 UTC 2020
commit bff97ba76d65da3f9048ef107b29ee642bdd5229
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Mon Oct 5 13:11:48 2020 -0400
Explicit InsetTableCell copy constructor
---
src/insets/InsetTabular.cpp | 7 +++++++
src/insets/InsetTabular.h | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index d24d174..78601a0 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -4205,6 +4205,13 @@ InsetTableCell::InsetTableCell(Buffer * buf)
isMultiColumn(false), isMultiRow(false), contentAlign(LYX_ALIGN_CENTER)
{}
+InsetTableCell::InsetTableCell(InsetTableCell const & in) : InsetText(in)
+{
+ isFixedWidth = in.isFixedWidth;
+ isMultiColumn = in.isMultiColumn;
+ isMultiRow = in.isMultiRow;
+ contentAlign = in.contentAlign;
+}
bool InsetTableCell::forcePlainLayout(idx_type) const
{
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index 30bc299..33d4974 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -54,6 +54,10 @@ class InsetTableCell : public InsetText
public:
///
explicit InsetTableCell(Buffer * buf);
+ /// We need this since generation of the default is deprecated
+ /// (since we declare the assignment constucture below).
+ /// Please make sure to adjust it if you add members!
+ InsetTableCell(InsetTableCell const &);
///
InsetCode lyxCode() const override { return CELL_CODE; }
///
@@ -113,7 +117,10 @@ private:
// iterating, since this information is needed quite often, and so may
// be quite slow.
// So, well, if someone can do better, please do!
- // --rgh
+ // --rkh
+ //
+ // NOTE: Make sure to adapt the construcors (especially the copy
+ // constructor) if you add members!
///
bool isFixedWidth;
///
More information about the lyx-cvs
mailing list