]> git.lyx.org Git - features.git/commitdiff
Explicit InsetTableCell copy constructor
authorRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 5 Oct 2020 17:11:48 +0000 (13:11 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 6 Oct 2020 16:20:31 +0000 (12:20 -0400)
src/insets/InsetTabular.cpp
src/insets/InsetTabular.h

index d24d174cbc74a9eeac2fac136d1d3edd6ae97ded..78601a0ed0dea2db7dab7d7eee46b07bd3c7add6 100644 (file)
@@ -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
 {
index 30bc29930141be2c8828df95bd3459629f002801..33d4974107355415263af672ec773d40e2f69d10 100644 (file)
@@ -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;
        ///